From: NeilBrown <neilb@suse.de>
Subject: SUNRPC: fix breakage caused by introduction of rq_xprt_ctxt
Patch-mainline: Not yet, discussion started.
References: bsc#1210775
Patch
SUNRPC: Fix NFSD's request deferral on RDMA transports
Introduced a double-free for UDP if a request is deferred twice.
This patch is a band-aid to stop the double free. There are also
possible memory leaks introduced by that patch so a proper fix
will be needed eventually. This is being discussed upstream.
The memory leaks aren't severe and don't require an urgent fix.
Signed-off-by: NeilBrown <neilb@suse.de>
---
net/sunrpc/svc_xprt.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -1194,6 +1194,7 @@ static struct cache_deferred_req *svc_de
if (rqstp->rq_deferred) {
dr = rqstp->rq_deferred;
rqstp->rq_deferred = NULL;
+ rqstp->rq_xprt_ctxt = NULL;
} else {
size_t skip;
size_t size;