From 59b78c38318091e75f58ecf937aa176ee16fd523 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Wed, 4 Dec 2024 10:08:49 +0300 Subject: [PATCH] LU-18508 obdclass: llog test to set lpi_rc llog_test_process_thread() should set lpi_rc before signalling own completion, otherwise the caller can find uninitialized lpi_rc. Signed-off-by: Alex Zhuravlev Change-Id: Id49f10bb0454da2bdf047a2c83e4c0462b826018 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57274 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Alexander Boyko Reviewed-by: Andreas Dilger Reviewed-by: Mikhail Pershin --- lustre/kunit/llog_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/kunit/llog_test.c b/lustre/kunit/llog_test.c index a21567b..4fda745 100644 --- a/lustre/kunit/llog_test.c +++ b/lustre/kunit/llog_test.c @@ -1513,9 +1513,9 @@ static int llog_test_process_thread(void *arg) rc = llog_cat_process_or_fork(NULL, lpi->lpi_loghandle, lpi->lpi_cb, NULL, lpi->lpi_cbdata, 1, 0, true); + lpi->lpi_rc = rc; complete(&lpi->lpi_completion); msleep(MSEC_PER_SEC / 2); - lpi->lpi_rc = rc; if (rc) CWARN("10h: Error during catalog processing %d\n", rc); return rc; -- 1.8.3.1