android_kernel_oneplus_msm8998/fs/nfsd
Trond Myklebust 498e9066b4 nfsd: Don't release the callback slot unless it was actually held
commit e6abc8caa6deb14be2a206253f7e1c5e37e9515b upstream.

If there are multiple callbacks queued, waiting for the callback
slot when the callback gets shut down, then they all currently
end up acting as if they hold the slot, and call
nfsd4_cb_sequence_done() resulting in interesting side-effects.

In addition, the 'retry_nowait' path in nfsd4_cb_sequence_done()
causes a loop back to nfsd4_cb_prepare() without first freeing the
slot, which causes a deadlock when nfsd41_cb_get_slot() gets called
a second time.

This patch therefore adds a boolean to track whether or not the
callback did pick up the slot, so that it can do the right thing
in these 2 cases.

Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-16 19:44:44 +02:00
..
acl.h
auth.c nfsd: auth: Fix gid sorting when rootsquash enabled 2018-01-31 12:06:14 +01:00
auth.h
blocklayout.c fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
blocklayoutxdr.c
blocklayoutxdr.h
cache.h
current_stateid.h
export.c
export.h
fault_inject.c
idmap.h
Kconfig
lockd.c
Makefile
netns.h
nfs2acl.c
nfs3acl.c
nfs3proc.c nfsd: fix memory corruption caused by readdir 2019-03-23 08:44:39 +01:00
nfs3xdr.c nfsd: fix memory corruption caused by readdir 2019-03-23 08:44:39 +01:00
nfs4acl.c
nfs4callback.c nfsd: Don't release the callback slot unless it was actually held 2019-05-16 19:44:44 +02:00
nfs4idmap.c
nfs4layouts.c
nfs4proc.c nfsd: fix corrupted reply to badly ordered compound 2018-10-10 08:52:07 +02:00
nfs4recover.c
nfs4state.c lockd: fix "list_add double add" caused by legacy signal interface 2018-02-03 17:04:28 +01:00
nfs4xdr.c nfsd: fix potential use-after-free in nfsd4_decode_getdeviceinfo 2018-08-06 16:24:30 +02:00
nfscache.c
nfsctl.c nfsd: fix wrong check in write_v4_end_grace() 2019-03-23 08:44:39 +01:00
nfsd.h
nfsfh.c
nfsfh.h
nfsproc.c
nfssvc.c NFSD: fix nfsd_reset_versions for NFSv4. 2017-12-20 10:04:53 +01:00
nfsxdr.c
pnfs.h
state.h nfsd: Don't release the callback slot unless it was actually held 2019-05-16 19:44:44 +02:00
stats.c
stats.h
trace.c
trace.h
vfs.c NFS: don't try to cross a mountpount when there isn't one there. 2018-03-24 10:58:44 +01:00
vfs.h
xdr.h
xdr3.h
xdr4.h
xdr4cb.h