summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2018-10-09 15:54:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-13 11:15:10 -0800
commiteecd97e13c1553dfff1c159513b6ab041f53a70a (patch)
treeb28b7cb10840dfb4e0f8a3ead211c28fee792d04
parenteecbf2c22b3f0dca05a199a8992ac2158266dfbd (diff)
downloadlinux-exynos-eecd97e13c1553dfff1c159513b6ab041f53a70a.tar.gz
linux-exynos-eecd97e13c1553dfff1c159513b6ab041f53a70a.tar.bz2
linux-exynos-eecd97e13c1553dfff1c159513b6ab041f53a70a.zip
nfsd: Fix an Oops in free_session()
commit bb6ad5572c0022e17e846b382d7413cdcf8055be upstream. In call_xpt_users(), we delete the entry from the list, but we do not reinitialise it. This triggers the list poisoning when we later call unregister_xpt_user() in nfsd4_del_conns(). Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/sunrpc/svc_xprt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index d16a8b423c20..ea7b5a3a53f0 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -1040,7 +1040,7 @@ static void call_xpt_users(struct svc_xprt *xprt)
spin_lock(&xprt->xpt_lock);
while (!list_empty(&xprt->xpt_users)) {
u = list_first_entry(&xprt->xpt_users, struct svc_xpt_user, list);
- list_del(&u->list);
+ list_del_init(&u->list);
u->callback(u);
}
spin_unlock(&xprt->xpt_lock);