Description:
rpc_show_tasks is invoked when changing the RPC client debug mode.
recent changes have allowed tk_msg.rpc_proc to be NULL, which caused
rpc_show_tasks to "oops." the following change fixes that, and
provides a little extra clean up as well.
Apply Against:
2.5.49
Test status:
Compiles, links, boots. Oops does not recur.
diff -Naur 07-counters/net/sunrpc/sched.c 08-debug-oops/net/sunrpc/sched.c
--- 07-counters/net/sunrpc/sched.c Fri Nov 22 16:40:44 2002
+++ 08-debug-oops/net/sunrpc/sched.c Mon Nov 25 13:33:24 2002
@@ -1123,11 +1123,12 @@
"-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 ? 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);
}