svc.c: Check for a non-NULL xp_socket
Commit a16ff32f04 added support to the kernel RPC to set
TCP_USE_DDP.
However, for the unusual case of a NFSv4.1/4.2 non-NULL callback,
the xp_socket field of SVCXPRT is NULL, since it uses the same
socket as the client->server connection.
This patch adds the check for this to avoid crashes.
This only affects NFSv4.1/4.2 mounts where either pNFS or
delegations are in use.
MFC after: 3 days
This commit is contained in:
@@ -996,6 +996,7 @@ svc_getreq(SVCXPRT *xprt, struct svc_req **rqstp_ret)
|
|||||||
* enable TLS offload first.
|
* enable TLS offload first.
|
||||||
*/
|
*/
|
||||||
if (xprt->xp_doneddp == 0 && r->rq_proc != NULLPROC &&
|
if (xprt->xp_doneddp == 0 && r->rq_proc != NULLPROC &&
|
||||||
|
xprt->xp_socket != NULL &&
|
||||||
atomic_cmpset_int(&xprt->xp_doneddp, 0, 1)) {
|
atomic_cmpset_int(&xprt->xp_doneddp, 0, 1)) {
|
||||||
if (xprt->xp_socket->so_proto->pr_protocol ==
|
if (xprt->xp_socket->so_proto->pr_protocol ==
|
||||||
IPPROTO_TCP) {
|
IPPROTO_TCP) {
|
||||||
|
|||||||
Reference in New Issue
Block a user