From 7d830d2f67045a4a6ba425dbe9f5dcc6f4ab72f1 Mon Sep 17 00:00:00 2001 From: eeb Date: Tue, 7 Dec 2004 14:11:39 +0000 Subject: [PATCH] * Moved the CDEBUG message in the exit path of log_commit_thread. It was possible for portals_debug_msg() to crash dereferencing the format string if the CDEBUG happened after the thread had signalled that it was about to exit. I guess the data segment got unloaded before the log_commit_thread had exited! --- lustre/ptlrpc/recov_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/ptlrpc/recov_thread.c b/lustre/ptlrpc/recov_thread.c index b806b1e..11d94e8 100644 --- a/lustre/ptlrpc/recov_thread.c +++ b/lustre/ptlrpc/recov_thread.c @@ -425,12 +425,13 @@ static int log_commit_thread(void *arg) spin_unlock(&lcm->lcm_thread_lock); OBD_FREE(lcd, sizeof(*lcd)); + CDEBUG(D_HA, "%s exiting\n", current->comm); + spin_lock(&lcm->lcm_thread_lock); atomic_dec(&lcm->lcm_thread_total); spin_unlock(&lcm->lcm_thread_lock); wake_up(&lcm->lcm_waitq); - CDEBUG(D_HA, "%s exiting\n", current->comm); return 0; } -- 1.8.3.1