re: SUNRPC: Fail over more quickly on connect errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux