Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Henriques <lhenriques@suse.com>2018-07-02 11:48:30 +0100
committerLuis Henriques <lhenriques@suse.com>2018-07-02 14:08:29 +0100
commitd9fe4474a4531bc07e02fc872ec826ed51bd4cd0 (patch)
tree97489407cc07aa5f06f825a6478c83839bd79abb
parent12be662b19faca07108af9da7cb0a7c11dac2fe2 (diff)
ceph: fix dentry leak in splice_dentry() (bsc#1098236).
-rw-r--r--patches.fixes/ceph-fix-dentry-leak-in-splice_dentry.patch28
-rw-r--r--series.conf1
2 files changed, 29 insertions, 0 deletions
diff --git a/patches.fixes/ceph-fix-dentry-leak-in-splice_dentry.patch b/patches.fixes/ceph-fix-dentry-leak-in-splice_dentry.patch
new file mode 100644
index 0000000000..d90c282a0d
--- /dev/null
+++ b/patches.fixes/ceph-fix-dentry-leak-in-splice_dentry.patch
@@ -0,0 +1,28 @@
+From: "Yan, Zheng" <zyan@redhat.com>
+Date: Tue, 19 Jun 2018 18:20:34 +0800
+Subject: ceph: fix dentry leak in splice_dentry()
+Git-commit: 8b8f53af1ed9df88a4c0fbfdf3db58f62060edf3
+Patch-mainline: v4.18-rc3
+References: bsc#1098236
+
+In any case, d_splice_alias() does not drop reference of original
+dentry.
+
+Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
+Reviewed-by: Jeff Layton <jlayton@redhat.com>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Acked-by: Luis Henriques <lhenriques@suse.com>
+---
+ fs/ceph/inode.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/ceph/inode.c
++++ b/fs/ceph/inode.c
+@@ -1109,6 +1109,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) {
diff --git a/series.conf b/series.conf
index dc7d65f143..edc1763457 100644
--- a/series.conf
+++ b/series.conf
@@ -11256,6 +11256,7 @@
patches.fixes/ceph-fix-wrong-check-for-the-case-of-updating-link-count.patch
patches.fixes/ceph-prevent-i_version-from-going-back.patch
patches.fixes/ceph-fix-use-after-free-in-ceph_statfs.patch
+ patches.fixes/ceph-fix-dentry-leak-in-splice_dentry.patch
# target driver
patches.drivers/target-make-target-db-location-configurable