Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / libcfs / libcfs / linux / linux-debug.c
index bdcd432..f08be51 100644 (file)
@@ -263,7 +263,9 @@ void libcfs_debug_dumpstack(struct task_struct *tsk)
 #elif defined(HAVE_DUMP_TRACE)
         /* dump_stack() */
         /* show_trace() */
-       printk("Pid: %d, comm: %.20s\n", current->pid, current->comm);
+        if (tsk == NULL)
+                tsk = current;
+       printk("Pid: %d, comm: %.20s\n", tsk->pid, tsk->comm);
         /* show_trace_log_lvl() */
        printk("\nCall Trace:\n");
        dump_trace(tsk, NULL, NULL,