android_kernel_motorola_sm6225/fs/nfsd
Chuck Lever ef481b262b NFSD: Fix possible sleep during nfsd4_release_lockowner()
commit ce3c4ad7f4ce5db7b4f08a1e237d8dd94b39180b upstream.

nfsd4_release_lockowner() holds clp->cl_lock when it calls
check_for_locks(). However, check_for_locks() calls nfsd_file_get()
/ nfsd_file_put() to access the backing inode's flc_posix list, and
nfsd_file_put() can sleep if the inode was recently removed.

Let's instead rely on the stateowner's reference count to gate
whether the release is permitted. This should be a reliable
indication of locks-in-use since file lock operations and
->lm_get_owner take appropriate references, which are released
appropriately when file locks are removed.

Reported-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06 08:24:22 +02:00
..
acl.h
auth.c
auth.h
blocklayout.c vfs/y2038: inode timestamps conversion to timespec64 2018-06-15 07:31:07 +09:00
blocklayoutxdr.c
blocklayoutxdr.h
cache.h
current_stateid.h
export.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
export.h
fault_inject.c
flexfilelayout.c
flexfilelayoutxdr.c
flexfilelayoutxdr.h
idmap.h
Kconfig
lockd.c
Makefile
netns.h nfsd4: extend reclaim period for reclaiming clients 2018-06-17 10:20:47 -04:00
nfs2acl.c
nfs3acl.c
nfs3proc.c NFSD: Clamp WRITE offsets 2022-02-16 12:51:44 +01:00
nfs3xdr.c nfsd4: readdirplus shouldn't return parent of export 2021-01-23 15:49:55 +01:00
nfs4acl.c
nfs4callback.c nfsd: Fix svc_xprt refcnt leak when setup callback client failed 2020-06-25 15:32:51 +02:00
nfs4idmap.c
nfs4layouts.c nfsd: fix delay timer on 32-bit architectures 2020-02-11 04:34:13 -08:00
nfs4proc.c NFSD: Clamp WRITE offsets 2022-02-16 12:51:44 +01:00
nfs4recover.c nfsd: fix a warning in __cld_pipe_upcall() 2019-12-13 08:52:09 +01:00
nfs4state.c NFSD: Fix possible sleep during nfsd4_release_lockowner() 2022-06-06 08:24:22 +02:00
nfs4xdr.c nfsd4: Handle the NFSv4 READDIR 'dircount' hint being zero 2021-10-13 10:10:50 +02:00
nfscache.c - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
nfsctl.c NFSD: Keep existing listeners on portlist error 2021-10-27 09:53:12 +02: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
nfsproc.c NFSD: prevent underflow in nfssvc_decode_writeargs() 2022-04-15 14:14:39 +02:00
nfssvc.c nfsd: Fix message level for normal termination 2020-12-30 11:26:02 +01:00
nfsxdr.c vfs: change inode times to use struct timespec64 2018-06-05 16:57:31 -07:00
pnfs.h
state.h nfsd: fix jiffies/time_t mixup in LRU list 2020-02-11 04:34:13 -08:00
stats.c
stats.h
trace.c
trace.h NFSD: Fix offset type in I/O trace points 2022-02-16 12:51:44 +01:00
vfs.c nfsd: apply umask on fs without ACL support 2020-07-09 09:37:11 +02:00
vfs.h nfsd: allow fh_want_write to be called twice 2019-06-15 11:54:07 +02:00
xdr.h NFSD: prevent underflow in nfssvc_decode_writeargs() 2022-04-15 14:14:39 +02:00
xdr3.h
xdr4.h
xdr4cb.h