Skip to content
Commit 5b2b5187 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Fix nfs_page_group_destroy() and nfs_lock_and_join_requests() race cases



Since nfs_page_group_destroy() does not take any locks on the requests
to be freed, we need to ensure that we don't inadvertently free the
request in nfs_destroy_unlinked_subrequests() while the last reference
is being released elsewhere.

Do this by:

1) Taking a reference to the request unless it is already being freed
2) Checking (under the page group lock) if PG_TEARDOWN is already set before
   freeing an unreferenced request in nfs_destroy_unlinked_subrequests()

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 74a6d4b5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment