* re: SUNRPC: Fail over more quickly on connect errors
@ 2010-05-22 20:23 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-05-22 20:23 UTC (permalink / raw)
To: Trond.Myklebust; +Cc: linux-nfs
I'm going through some smatch stuff and it complains about a potential
null dereference from a8ce4a8f37: "SUNRPC: Fail over more quickly on
connect errors"
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -710,7 +710,7 @@ void xprt_connect(struct rpc_task *task)
if (task->tk_rqstp)
^^^^^^^^^^^^^^^^^^^
We assume task->tk_rqstp can be null here.
task->tk_rqstp->rq_bytes_sent = 0;
- task->tk_timeout = xprt->connect_timeout;
+ task->tk_timeout = task->tk_rqstp->rq_timeout;
^^^^^^^^^^^^^^^^^^^^^^^^^^^
We dereference it here.
rpc_sleep_on(&xprt->pending, task, xprt_connect_status);
if (test_bit(XPRT_CLOSING, &xprt->state))
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-22 20:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 20:23 SUNRPC: Fail over more quickly on connect errors Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).