Writing to v4_end_grace can race with server shutdown and result in UAF. The first patch fixes the problem in a way that is suitable for backport. The second patch improves is slightly (in my opinion) but in a way that cannot be backported very far. Note that I've used a different Closes: link to the one Chuck suggested in a recent email. NeilBrown [PATCH 1/2] nfsd: provide locking for v4_end_grace [PATCH 2/2] nfsd: discard client_tracking_active and instead disable