From: eeb Date: Tue, 7 Dec 2004 14:11:39 +0000 (+0000) Subject: * Moved the CDEBUG message in the exit path of log_commit_thread. It was X-Git-Tag: v1_8_0_110~486^5~86 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=7d830d2f67045a4a6ba425dbe9f5dcc6f4ab72f1;p=fs%2Flustre-release.git * 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! --- 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; }