Files
linux/fs/nfsd
J. Bruce Fields 198a54f07f nfsd: allow fh_want_write to be called twice
[ Upstream commit 0b8f62625d ]

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>
2019-06-22 08:18:20 +02:00
..
2014-07-08 17:14:27 -04:00
2017-06-14 13:16:24 +02:00
2014-08-17 12:00:12 -04:00
2015-02-05 14:35:18 +01:00
2015-04-21 16:16:02 -04:00
2015-02-16 11:43:13 -05:00
2015-02-02 18:09:43 +01:00