lkml.org 
[lkml]   [2020]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 191/232] NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
    Date
    From: Trond Myklebust <trond.myklebust@hammerspace.com>

    commit add42de31721fa29ed77a7ce388674d69f9d31a4 upstream.

    When we detach a subrequest from the list, we must also release the
    reference it holds to the parent.

    Fixes: 5b2b5187fa85 ("NFS: Fix nfs_page_group_destroy() and nfs_lock_and_join_requests() race cases")
    Cc: stable@vger.kernel.org # v4.14+
    Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/nfs/write.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/fs/nfs/write.c
    +++ b/fs/nfs/write.c
    @@ -441,6 +441,7 @@ nfs_destroy_unlinked_subrequests(struct
    }

    subreq->wb_head = subreq;
    + nfs_release_request(old_head);

    if (test_and_clear_bit(PG_INODE_REF, &subreq->wb_flags)) {
    nfs_release_request(subreq);

    \
     
     \ /
      Last update: 2020-04-16 17:15    [W:4.045 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site