]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfsd: fix deadlock secinfo+readdir compound
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 3 Mar 2016 00:36:21 +0000 (16:36 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:46:29 +0000 (15:46 -0700)
commitb68af51a678c1d7bf4075fff8eefffbac3b39277
tree41947e05e92ab1e13beaaf19b6a83206d602823f
parent96fd873ec7a37c6b5b602f50bcf5d4c2172d2e0f
nfsd: fix deadlock secinfo+readdir compound

Orabug: 23331119

[ Upstream commit 2f6fc056e899bd0144a08da5cacaecbe8997cd74 ]

nfsd_lookup_dentry exits with the parent filehandle locked.  fh_put also
unlocks if necessary (nfsd filehandle locking is probably too lenient),
so it gets unlocked eventually, but if the following op in the compound
needs to lock it again, we can deadlock.

A fuzzer ran into this; normal clients don't send a secinfo followed by
a readdir in the same compound.

Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 03d44e3d9dd7744fe97ca472fce1725b7179fa2f)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
fs/nfsd/nfs4proc.c