]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 21 Apr 2016 12:53:51 +0000 (06:53 -0600)
commit30e33a9b7957345aed131c26e2a84f24e90be48f
tree34473159115672ccd8ca26d8808daf4ade2d66fc
parent8528e08e887166307913bead43f694a3c1e72785
nfsd: fix deadlock secinfo+readdir compound

BugLink: http://bugs.launchpad.net/bugs/1572722
commit 2f6fc056e899bd0144a08da5cacaecbe8997cd74 upstream.

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.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/nfsd/nfs4proc.c