From e290a3941102e85441ef1045b558ae9ab9656e3a Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Thu, 27 Mar 2003 20:42:16 +0100 Subject: [PATCH] Fix the RPC debugging code so that it doesn't Oops if a task has a null 'p_proc' procedure pointer. --- net/sunrpc/sched.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 87186b5fef428..1cc8c2fedd40d 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -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) : " ", + rpc_qname(t->tk_rpcwait), t->tk_action, t->tk_exit); spin_unlock(&rpc_sched_lock); } -- 2.53.0