diff options
author | Trond Myklebust <trondmy@gmail.com> | 2018-10-09 15:54:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:08:49 -0800 |
commit | 18c1d28f359cd6c7b26ef9856a61427d63bedfcc (patch) | |
tree | 85436de648954207b3e91375a75f0b72bdea6c9d /net | |
parent | b71f9663a7babdefdc54c7fdb83e89d2b2b9ec42 (diff) | |
download | linux-stable-18c1d28f359cd6c7b26ef9856a61427d63bedfcc.tar.gz linux-stable-18c1d28f359cd6c7b26ef9856a61427d63bedfcc.tar.bz2 linux-stable-18c1d28f359cd6c7b26ef9856a61427d63bedfcc.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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 5185efb9027b..83ccd0221c98 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -989,7 +989,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); |