From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:45202 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932212AbdJJPNg (ORCPT ); Tue, 10 Oct 2017 11:13:36 -0400 Subject: Patch "ovl: fix dput() of ERR_PTR in ovl_cleanup_index()" has been added to the 4.13-stable tree To: amir73il@gmail.com, gregkh@linuxfoundation.org, mszeredi@redhat.com Cc: , From: Date: Tue, 10 Oct 2017 17:12:58 +0200 Message-ID: <1507648378237166@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 ovl: fix dput() of ERR_PTR in ovl_cleanup_index() to the 4.13-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: ovl-fix-dput-of-err_ptr-in-ovl_cleanup_index.patch and it can be found in the queue-4.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 9f4ec904dbd4eb1a2db10d5e7dc16eae386fe64d Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Sun, 24 Sep 2017 17:36:26 +0300 Subject: ovl: fix dput() of ERR_PTR in ovl_cleanup_index() From: Amir Goldstein commit 9f4ec904dbd4eb1a2db10d5e7dc16eae386fe64d upstream. Fixes: caf70cb2ba5d ("ovl: cleanup orphan index entries") Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman --- fs/overlayfs/util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c @@ -418,7 +418,7 @@ void ovl_inuse_unlock(struct dentry *den } } -/* Called must hold OVL_I(inode)->oi_lock */ +/* Caller must hold OVL_I(inode)->lock */ static void ovl_cleanup_index(struct dentry *dentry) { struct inode *dir = ovl_indexdir(dentry->d_sb)->d_inode; @@ -457,6 +457,9 @@ static void ovl_cleanup_index(struct den err = PTR_ERR(index); if (!IS_ERR(index)) err = ovl_cleanup(dir, index); + else + index = NULL; + inode_unlock(dir); if (err) goto fail; Patches currently in stable-queue which might be from amir73il@gmail.com are queue-4.13/ovl-fix-missing-unlock_rename-in-ovl_do_copy_up.patch queue-4.13/ovl-fix-error-value-printed-in-ovl_lookup_index.patch queue-4.13/ovl-fix-dput-of-err_ptr-in-ovl_cleanup_index.patch queue-4.13/ovl-fix-regression-caused-by-exclusive-upper-work-dir-protection.patch queue-4.13/ovl-fix-dentry-leak-in-ovl_indexdir_cleanup.patch