linux-stable/fs/nfsd
Trond Myklebust b4d4b5e4b8 nfsd: Don't release the callback slot unless it was actually held
commit e6abc8caa6 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-02 09:58:54 +02:00
..
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acl.h
auth.c nfsd: auth: Fix gid sorting when rootsquash enabled 2018-01-22 20:13:07 -08:00
auth.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
blocklayout.c vfs/y2038: inode timestamps conversion to timespec64 2018-06-15 07:31:07 +09:00
blocklayoutxdr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
blocklayoutxdr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cache.h nfsd: Do not refuse to serve out of cache 2018-05-11 15:48:57 -04:00
current_stateid.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
export.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
export.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fault_inject.c Lots of good bugfixes, including: 2017-11-18 11:22:04 -08:00
flexfilelayout.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
flexfilelayoutxdr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
flexfilelayoutxdr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idmap.h
lockd.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netns.h nfsd4: extend reclaim period for reclaiming clients 2018-06-17 10:20:47 -04:00
nfs2acl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfs3acl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfs3proc.c nfsd: fix memory corruption caused by readdir 2019-03-23 20:10:09 +01:00
nfs3xdr.c nfsd: fix memory corruption caused by readdir 2019-03-23 20:10:09 +01:00
nfs4acl.c
nfs4callback.c nfsd: Don't release the callback slot unless it was actually held 2019-05-02 09:58:54 +02:00
nfs4idmap.c NFSD: make cache_detail structures const 2017-11-27 16:45:11 -05:00
nfs4layouts.c nfsd: don't advertise a SCSI layout for an unsupported request_queue 2018-06-19 10:12:31 -04:00
nfs4proc.c nfsd4: zero-length WRITE should succeed 2019-01-13 09:51:08 +01:00
nfs4recover.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
nfs4state.c nfsd: fix performance-limiting session calculation 2019-03-23 20:10:09 +01:00
nfs4xdr.c fs/nfsd: Delete invalid assignment statements in nfsd4_decode_exchange_id 2018-08-09 16:11:21 -04:00
nfscache.c - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
nfsctl.c nfsd: fix wrong check in write_v4_end_grace() 2019-03-23 20:10:09 +01:00
nfsd.h nfsd4: support change_attr_type attribute 2018-06-17 10:41:31 -04:00
nfsfh.c nfsd: use true and false for boolean values 2018-08-09 16:11:21 -04:00
nfsfh.h This request is late, apologies. 2018-02-08 15:18:32 -08:00
nfsproc.c NFSD: Handle full-length symlinks 2018-08-09 16:11:21 -04:00
nfssvc.c race of nfsd inetaddr notifiers vs nn->nfsd_serv change 2017-11-27 16:45:11 -05:00
nfsxdr.c vfs: change inode times to use struct timespec64 2018-06-05 16:57:31 -07:00
pnfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
state.h nfsd: Don't release the callback slot unless it was actually held 2019-05-02 09:58:54 +02:00
stats.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stats.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.c
trace.h nfsd: Trace NFSv4 COMPOUND execution 2018-04-03 15:08:15 -04:00
vfs.c vfs: swap names of {do,vfs}_clone_file_range() 2018-09-24 10:54:01 +02:00
vfs.h nfsd: Add I/O trace points in the NFSv4 read proc 2018-04-03 15:08:15 -04:00
xdr.h NFSD: Clean up legacy NFS SYMLINK argument XDR decoders 2018-04-03 15:08:16 -04:00
xdr3.h NFSD: Clean up legacy NFS SYMLINK argument XDR decoders 2018-04-03 15:08:16 -04:00
xdr4.h nfsd: fix incorrect umasks 2018-04-03 16:27:08 -04:00
xdr4cb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00