[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180823075002.147366525@linuxfoundation.org>
Date: Thu, 23 Aug 2018 09:53:11 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, "Yan, Zheng" <zyan@...hat.com>,
Jeff Layton <jlayton@...hat.com>,
Ilya Dryomov <idryomov@...il.com>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.17 125/324] ceph: fix dentry leak in splice_dentry()
4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Yan, Zheng" <zyan@...hat.com>
[ Upstream commit 8b8f53af1ed9df88a4c0fbfdf3db58f62060edf3 ]
In any case, d_splice_alias() does not drop reference of original
dentry.
Signed-off-by: "Yan, Zheng" <zyan@...hat.com>
Reviewed-by: Jeff Layton <jlayton@...hat.com>
Signed-off-by: Ilya Dryomov <idryomov@...il.com>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
fs/ceph/inode.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1123,6 +1123,7 @@ static struct dentry *splice_dentry(stru
if (IS_ERR(realdn)) {
pr_err("splice_dentry error %ld %p inode %p ino %llx.%llx\n",
PTR_ERR(realdn), dn, in, ceph_vinop(in));
+ dput(dn);
dn = realdn; /* note realdn contains the error */
goto out;
} else if (realdn) {
Powered by blists - more mailing lists