This is a note to let you know that I've just added the patch titled nfsd: return correct lockowner when there is a race on hash insert to the 3.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nfsd-return-correct-lockowner-when-there-is-a-race-on-hash-insert.patch and it can be found in the queue-3.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 340f0ba1c6c8412aa35fd6476044836b84361ea6 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" <bfields@xxxxxxxxxx> Date: Mon, 23 Mar 2015 11:02:30 -0400 Subject: nfsd: return correct lockowner when there is a race on hash insert From: "J. Bruce Fields" <bfields@xxxxxxxxxx> commit 340f0ba1c6c8412aa35fd6476044836b84361ea6 upstream. alloc_init_lock_stateowner can return an already freed entry if there is a race to put openowners in the hashtable. Noticed by inspection after Jeff Layton fixed the same bug for open owners. Depending on client behavior, this one may be trickier to trigger in practice. Fixes: c58c6610ec24 "nfsd: Protect adding/removing lock owners using client_lock" Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> Acked-by: Jeff Layton <jeff.layton@xxxxxxxxxxxxxxx> Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/nfsd/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5065,7 +5065,7 @@ alloc_init_lock_stateowner(unsigned int } else nfs4_free_lockowner(&lo->lo_owner); spin_unlock(&clp->cl_lock); - return lo; + return ret; } static void Patches currently in stable-queue which might be from bfields@xxxxxxxxxx are queue-3.19/nfsd-return-correct-lockowner-when-there-is-a-race-on-hash-insert.patch queue-3.19/sunrpc-make-debugfs-file-creation-failure-non-fatal.patch queue-3.19/nfsd-return-correct-openowner-when-there-is-a-race-to-put-one-in-the-hash.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html