]> rtime.felk.cvut.cz Git - linux-imx.git/commit
nfsd4: fix use-after-free of 4.1 client on connection loss
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 8 Mar 2013 14:30:43 +0000 (09:30 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 3 Apr 2013 15:48:32 +0000 (11:48 -0400)
commit2e4b7239a62a0c58664bf0cf73aea951b7e046fc
treed8db12040e66611836a47b9851c53ee72250d335
parentb0a9d3ab577464529f6649ec54f8a0de160866e3
nfsd4: fix use-after-free of 4.1 client on connection loss

Once we drop the lock here there's nothing keeping the client around:
the only lock still held is the xpt_lock on this socket, but this socket
no longer has any connection with the client so there's no way for other
code to know we're still using the client.

The solution is simple: all nfsd4_probe_callback does is set a few
variables and queue some work, so there's no reason we can't just keep
it under the lock.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c