From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:38084 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967346AbdEWShj (ORCPT ); Tue, 23 May 2017 14:37:39 -0400 Subject: Patch "NFSv4: Fix an rcu lock leak" has been added to the 4.11-stable tree To: trond.myklebust@primarydata.com, gregkh@linuxfoundation.org, yanaijie@huawei.com Cc: , From: Date: Tue, 23 May 2017 20:36:53 +0200 Message-ID: <149556461362246@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled NFSv4: Fix an rcu lock leak to the 4.11-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: nfsv4-fix-an-rcu-lock-leak.patch and it can be found in the queue-4.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 2e84611b3f4fa50e1f4c12f2966fcc7fb955d944 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Fri, 5 May 2017 13:02:42 -0400 Subject: NFSv4: Fix an rcu lock leak From: Trond Myklebust commit 2e84611b3f4fa50e1f4c12f2966fcc7fb955d944 upstream. The intention in the original patch was to release the lock when we put the inode, however something got screwed up. Reported-by: Jason Yan Fixes: 7b410d9ce460f ("pNFS: Delay getting the layout header in..") Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/callback_proc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -131,10 +131,11 @@ restart: if (!inode) continue; if (!nfs_sb_active(inode->i_sb)) { - rcu_read_lock(); + rcu_read_unlock(); spin_unlock(&clp->cl_lock); iput(inode); spin_lock(&clp->cl_lock); + rcu_read_lock(); goto restart; } return inode; @@ -170,10 +171,11 @@ restart: if (!inode) continue; if (!nfs_sb_active(inode->i_sb)) { - rcu_read_lock(); + rcu_read_unlock(); spin_unlock(&clp->cl_lock); iput(inode); spin_lock(&clp->cl_lock); + rcu_read_lock(); goto restart; } return inode; Patches currently in stable-queue which might be from trond.myklebust@primarydata.com are queue-4.11/nfs-use-gfp_noio-for-two-allocations-in-writeback.patch queue-4.11/nfsv4-fix-an-rcu-lock-leak.patch queue-4.11/nfsv4-fix-a-hang-in-open-related-to-server-reboot.patch queue-4.11/nfsd-fix-up-the-supattr_exclcreat-attributes.patch queue-4.11/pnfs-flexfiles-check-the-result-of-nfs4_pnfs_ds_connect.patch queue-4.11/nfs-fix-use-after-free-in-write-error-path.patch