Home Home > GIT Browse > SLE12-SP3-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2019-06-22 07:00:27 +0200
committerKernel Build Daemon <kbuild@suse.de>2019-06-22 07:00:27 +0200
commitf2e23dd2c0612c2f5acf88031d5e5e482a614370 (patch)
treee9343a6b6dfcc6e32921fde6f77175f7c44e1387
parent3cee8bd7f645911ec481baf1e80a3c608223d001 (diff)
parenta9bc8cb865fd3d57a74bc127d921b70246d8d5a2 (diff)
Merge branch 'SLE12-SP3' into SLE12-SP3-AZURESLE12-SP3-AZURE
-rw-r--r--patches.fixes/ceph-fix-potential-use-after-free-in-ceph_mdsc_build_path.patch57
-rw-r--r--patches.fixes/ceph-flush-dirty-inodes-before-proceeding-with-remount.patch48
-rw-r--r--patches.fixes/ceph-print-inode-number-in-_caps_issued_mask-debugging-messages.patch55
-rw-r--r--series.conf3
4 files changed, 163 insertions, 0 deletions
diff --git a/patches.fixes/ceph-fix-potential-use-after-free-in-ceph_mdsc_build_path.patch b/patches.fixes/ceph-fix-potential-use-after-free-in-ceph_mdsc_build_path.patch
new file mode 100644
index 0000000000..b6a76128c2
--- /dev/null
+++ b/patches.fixes/ceph-fix-potential-use-after-free-in-ceph_mdsc_build_path.patch
@@ -0,0 +1,57 @@
+From: Jeff Layton <jlayton@kernel.org>
+Date: Fri, 26 Apr 2019 13:33:39 -0400
+Subject: ceph: fix potential use-after-free in ceph_mdsc_build_path
+Git-commit: 69a10fb3f4b8769ffd44e4eaa662ab691fa61f4c
+Patch-mainline: v5.2-rc1
+References: bsc#1138681
+
+temp is not defined outside of the RCU critical section here. Ensure
+we grab that value before we drop the rcu_read_lock.
+
+Reported-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Jeff Layton <jlayton@kernel.org>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Acked-by: Luis Henriques <lhenriques@suse.com>
+---
+ fs/ceph/mds_client.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/fs/ceph/mds_client.c
++++ b/fs/ceph/mds_client.c
+@@ -1802,13 +1802,14 @@ static inline u64 __get_oldest_tid(stru
+ * Encode hidden .snap dirs as a double /, i.e.
+ * foo/.snap/bar -> foo//bar
+ */
+-char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *base,
++char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *pbase,
+ int stop_on_nosnap)
+ {
+ struct dentry *temp;
+ char *path;
+ int len, pos;
+ unsigned seq;
++ u64 base;
+
+ if (dentry == NULL)
+ return ERR_PTR(-EINVAL);
+@@ -1864,6 +1865,7 @@ retry:
+ path[--pos] = '/';
+ temp = temp->d_parent;
+ }
++ base = ceph_ino(d_inode(temp));
+ rcu_read_unlock();
+ if (pos != 0 || read_seqretry(&rename_lock, seq)) {
+ pr_err("build_path did not end path lookup where "
+@@ -1876,10 +1878,10 @@ retry:
+ goto retry;
+ }
+
+- *base = ceph_ino(d_inode(temp));
++ *pbase = base;
+ *plen = len;
+ dout("build_path on %p %d built %llx '%.*s'\n",
+- dentry, d_count(dentry), *base, len, path);
++ dentry, d_count(dentry), base, len, path);
+ return path;
+ }
+
diff --git a/patches.fixes/ceph-flush-dirty-inodes-before-proceeding-with-remount.patch b/patches.fixes/ceph-flush-dirty-inodes-before-proceeding-with-remount.patch
new file mode 100644
index 0000000000..5614ca34ae
--- /dev/null
+++ b/patches.fixes/ceph-flush-dirty-inodes-before-proceeding-with-remount.patch
@@ -0,0 +1,48 @@
+From: Jeff Layton <jlayton@kernel.org>
+Date: Tue, 7 May 2019 09:20:54 -0400
+Subject: ceph: flush dirty inodes before proceeding with remount
+Git-commit: 00abf69dd24f4444d185982379c5cc3bb7b6d1fc
+Patch-mainline: v5.2-rc1
+References: bsc#1138681
+
+xfstest generic/452 was triggering a "Busy inodes after umount" warning.
+ceph was allowing the mount to go read-only without first flushing out
+dirty inodes in the cache. Ensure we sync out the filesystem before
+allowing a remount to proceed.
+
+Cc: stable@vger.kernel.org
+Link: http://tracker.ceph.com/issues/39571
+Signed-off-by: Jeff Layton <jlayton@kernel.org>
+Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Acked-by: Luis Henriques <lhenriques@suse.com>
+---
+ fs/ceph/super.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/fs/ceph/super.c b/fs/ceph/super.c
+index 6d5bb2f74612..01113c86e469 100644
+--- a/fs/ceph/super.c
++++ b/fs/ceph/super.c
+@@ -845,6 +845,12 @@ static void ceph_umount_begin(struct super_block *sb)
+ return;
+ }
+
++static int ceph_remount(struct super_block *sb, int *flags, char *data)
++{
++ sync_filesystem(sb);
++ return 0;
++}
++
+ static const struct super_operations ceph_super_ops = {
+ .alloc_inode = ceph_alloc_inode,
+ .destroy_inode = ceph_destroy_inode,
+@@ -852,6 +858,7 @@ static const struct super_operations ceph_super_ops = {
+ .drop_inode = ceph_drop_inode,
+ .sync_fs = ceph_sync_fs,
+ .put_super = ceph_put_super,
++ .remount_fs = ceph_remount,
+ .show_options = ceph_show_options,
+ .statfs = ceph_statfs,
+ .umount_begin = ceph_umount_begin,
+
diff --git a/patches.fixes/ceph-print-inode-number-in-_caps_issued_mask-debugging-messages.patch b/patches.fixes/ceph-print-inode-number-in-_caps_issued_mask-debugging-messages.patch
new file mode 100644
index 0000000000..a822ab0883
--- /dev/null
+++ b/patches.fixes/ceph-print-inode-number-in-_caps_issued_mask-debugging-messages.patch
@@ -0,0 +1,55 @@
+From: Jeff Layton <jlayton@kernel.org>
+Date: Tue, 23 Apr 2019 13:40:02 -0400
+Subject: ceph: print inode number in __caps_issued_mask debugging messages
+Git-commit: 5ddc61fc145861e4e542c9273a4088b627ba9b8d
+Patch-mainline: v5.2-rc1
+References: bsc#1138681
+
+To make it easier to correlate with MDS logs.
+
+Signed-off-by: Jeff Layton <jlayton@kernel.org>
+Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Acked-by: Luis Henriques <lhenriques@suse.com>
+---
+ fs/ceph/caps.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
+index 9e0b464d374f..72f8e1311392 100644
+--- a/fs/ceph/caps.c
++++ b/fs/ceph/caps.c
+@@ -892,8 +892,8 @@ int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int touch)
+ int have = ci->i_snap_caps;
+
+ if ((have & mask) == mask) {
+- dout("__ceph_caps_issued_mask %p snap issued %s"
+- " (mask %s)\n", &ci->vfs_inode,
++ dout("__ceph_caps_issued_mask ino 0x%lx snap issued %s"
++ " (mask %s)\n", ci->vfs_inode.i_ino,
+ ceph_cap_string(have),
+ ceph_cap_string(mask));
+ return 1;
+@@ -904,8 +904,8 @@ int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int touch)
+ if (!__cap_is_valid(cap))
+ continue;
+ if ((cap->issued & mask) == mask) {
+- dout("__ceph_caps_issued_mask %p cap %p issued %s"
+- " (mask %s)\n", &ci->vfs_inode, cap,
++ dout("__ceph_caps_issued_mask ino 0x%lx cap %p issued %s"
++ " (mask %s)\n", ci->vfs_inode.i_ino, cap,
+ ceph_cap_string(cap->issued),
+ ceph_cap_string(mask));
+ if (touch)
+@@ -916,8 +916,8 @@ int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int touch)
+ /* does a combination of caps satisfy mask? */
+ have |= cap->issued;
+ if ((have & mask) == mask) {
+- dout("__ceph_caps_issued_mask %p combo issued %s"
+- " (mask %s)\n", &ci->vfs_inode,
++ dout("__ceph_caps_issued_mask ino 0x%lx combo issued %s"
++ " (mask %s)\n", ci->vfs_inode.i_ino,
+ ceph_cap_string(cap->issued),
+ ceph_cap_string(mask));
+ if (touch) {
+
diff --git a/series.conf b/series.conf
index e2fb0becdc..07d7fdc079 100644
--- a/series.conf
+++ b/series.conf
@@ -25812,6 +25812,9 @@
patches.fixes/0003-drm-bridge-adv7511-Fix-low-refresh-rate-selection.patch
patches.suse/perf-x86-intel-Allow-PEBS-multi-entry-in-watermark-m.patch
patches.fixes/0001-ntp-Allow-TAI-UTC-offset-to-be-set-to-zero.patch
+ patches.fixes/ceph-fix-potential-use-after-free-in-ceph_mdsc_build_path.patch
+ patches.fixes/ceph-print-inode-number-in-_caps_issued_mask-debugging-messages.patch
+ patches.fixes/ceph-flush-dirty-inodes-before-proceeding-with-remount.patch
patches.fixes/ext4-zero-out-the-unused-memory-region-in-the-extent.patch
patches.fixes/ext4-avoid-panic-during-forced-reboot-due-to-aborted.patch
patches.fixes/0001-btrfs-extent-tree-Fix-a-bug-that-btrfs-is-unable-to-.patch