• Idan Kedar's avatar
    pnfs: defer release of pages in layoutget · 01bc11a7
    Idan Kedar authored
    commit 8554116e upstream.
    
    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: default avatarIdan Kedar <idank@tonian.com>
    Signed-off-by: default avatarBenny Halevy <bhalevy@tonian.com>
    Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    01bc11a7
nfs4proc.c 172 KB