]> git.baikalelectronics.ru Git - kernel.git/commit
pnfs: defer release of pages in layoutget
authorIdan Kedar <idank@tonian.com>
Thu, 2 Aug 2012 08:47:10 +0000 (11:47 +0300)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 2 Aug 2012 21:38:54 +0000 (17:38 -0400)
commitba4b13ebbe912bd4dc76bd55c4ca17df83f5f38c
tree75cb529c3ab86a496536a285542d79d064284d48
parentfc9c00b8c4407d54b9161eb1bb42131fc9b1a0d9
pnfs: defer release of pages in layoutget

we have encountered a bug whereby reading a lot of files (copying
fedora's /bin) from a pNFS mount and hitting Ctrl+C in the middle caused
a general protection fault in xdr_shrink_bufhead. this function is
called when decoding the response from LAYOUTGET. the decoding is done
by a worker thread, and the caller of LAYOUTGET waits for the worker
thread to complete.

hitting Ctrl+C caused the synchronous wait to end and the next thing the
caller does is to free the pages, so when the worker thread calls
xdr_shrink_bufhead, the pages are gone. therefore, the cleanup of these
pages has been moved to nfs4_layoutget_release.

Signed-off-by: Idan Kedar <idank@tonian.com>
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c
fs/nfs/pnfs.c
fs/nfs/pnfs.h