nfsd4: fix nfs4 stateid leak
commit977469fff176739539ac78e2977d50214e2bdcf6
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 29 Aug 2012 22:21:58 +0000 (29 15:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Oct 2012 16:32:38 +0000 (21 09:32 -0700)
tree31bc525a1bc100487be83adaf70368a208ea8af7
parent55db1c6363a84f7dcf9479ec791e390c0758aa05
nfsd4: fix nfs4 stateid leak

commit cf9182e90b2af04245ac4fae497fe73fc71285b4 upstream.

Processes that open and close multiple files may end up setting this
oo_last_closed_stid without freeing what was previously pointed to.
This can result in a major leak, visible for example by watching the
nfsd4_stateids line of /proc/slabinfo.

Reported-by: Cyril B. <cbay@excellency.fr>
Tested-by: Cyril B. <cbay@excellency.fr>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4state.c