android_kernel_samsung_a7y1.../fs/nfsd
J. Bruce Fields 52a9c506d9 nfsd: allow fh_want_write to be called twice
[ Upstream commit 0b8f62625dc309651d0efcb6a6247c933acd8b45 ]

A fuzzer recently triggered lockdep warnings about potential sb_writers
deadlocks caused by fh_want_write().

Looks like we aren't careful to pair each fh_want_write() with an
fh_drop_write().

It's not normally a problem since fh_put() will call fh_drop_write() for
us.  And was OK for NFSv3 where we'd do one operation that might call
fh_want_write(), and then put the filehandle.

But an NFSv4 protocol fuzzer can do weird things like call unlink twice
in a compound, and then we get into trouble.

I'm a little worried about this approach of just leaving everything to
fh_put().  But I think there are probably a lot of
fh_want_write()/fh_drop_write() imbalances so for now I think we need it
to be more forgiving.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-06 19:02:07 +02:00
..
acl.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
auth.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
auth.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blocklayout.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blocklayoutxdr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blocklayoutxdr.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cache.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
current_stateid.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
export.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
export.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fault_inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idmap.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lockd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
netns.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs2acl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs3acl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs3proc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs3xdr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs4acl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs4callback.c nfsd: Don't release the callback slot unless it was actually held 2020-04-06 16:38:48 +02:00
nfs4idmap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs4layouts.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs4proc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs4recover.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs4state.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfs4xdr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfscache.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfsctl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfsd.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfsfh.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfsfh.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfsproc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfssvc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfsxdr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pnfs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
state.h nfsd: Don't release the callback slot unless it was actually held 2020-04-06 16:38:48 +02:00
stats.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stats.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vfs.h nfsd: allow fh_want_write to be called twice 2020-04-06 19:02:07 +02:00
xdr3.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xdr4.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xdr4cb.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xdr.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30