]> git.hungrycats.org Git - linux/commitdiff
Fix the RPC debugging code so that it doesn't Oops if a task has
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Thu, 27 Mar 2003 19:42:16 +0000 (20:42 +0100)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Thu, 27 Mar 2003 19:42:16 +0000 (20:42 +0100)
a null 'p_proc' procedure pointer.

net/sunrpc/sched.c

index 87186b5fef42865c03f25d054ac6e93c3888f33e..1cc8c2fedd40d97ee7327c0922f0c560b75be264 100644 (file)
@@ -1115,11 +1115,12 @@ void rpc_show_tasks(void)
                "-rpcwait -action- --exit--\n");
        alltask_for_each(t, le, &all_tasks)
                printk("%05d %04d %04x %06d %8p %6d %8p %08ld %8s %8p %8p\n",
-                       t->tk_pid, t->tk_msg.rpc_proc->p_proc,
+                       t->tk_pid,
+                       (t->tk_msg.rpc_proc->p_proc ? t->tk_msg.rpc_proc->p_proc : -1),
                        t->tk_flags, t->tk_status,
                        t->tk_client, t->tk_client->cl_prog,
                        t->tk_rqstp, t->tk_timeout,
-                       t->tk_rpcwait ? rpc_qname(t->tk_rpcwait) : " <NULL> ",
+                       rpc_qname(t->tk_rpcwait),
                        t->tk_action, t->tk_exit);
        spin_unlock(&rpc_sched_lock);
 }