From: Greg Kroah-Hartman Date: Tue, 25 Jul 2017 01:28:55 +0000 (-0700) Subject: 3.18-stable patches X-Git-Tag: v3.18.63~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d7df3c140c81a815d19a5ef2c9bac97bf5d83bd;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch f2fs-don-t-clear-sgid-when-inheriting-acls.patch raid5-should-update-rdev-sectors-after-reshape.patch s390-syscalls-fix-out-of-bounds-arguments-access.patch --- diff --git a/queue-3.18/drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch b/queue-3.18/drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch new file mode 100644 index 00000000000..a859387c9d6 --- /dev/null +++ b/queue-3.18/drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch @@ -0,0 +1,42 @@ +From ab03d9fe508f4e2914a8f4a9eef1b21051cacd0f Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 11 May 2017 13:14:14 -0400 +Subject: drm/radeon/ci: disable mclk switching for high refresh rates (v2) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alex Deucher + +commit ab03d9fe508f4e2914a8f4a9eef1b21051cacd0f upstream. + +Even if the vblank period would allow it, it still seems to +be problematic on some cards. + +v2: fix logic inversion (Nils) + +bug: https://bugs.freedesktop.org/show_bug.cgi?id=96868 + +Acked-by: Christian König +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/ci_dpm.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/gpu/drm/radeon/ci_dpm.c ++++ b/drivers/gpu/drm/radeon/ci_dpm.c +@@ -738,6 +738,12 @@ bool ci_dpm_vblank_too_short(struct rade + if (r600_dpm_get_vrefresh(rdev) > 120) + return true; + ++ /* disable mclk switching if the refresh is >120Hz, even if the ++ * blanking period would allow it ++ */ ++ if (r600_dpm_get_vrefresh(rdev) > 120) ++ return true; ++ + if (vblank_time < switch_limit) + return true; + else diff --git a/queue-3.18/f2fs-don-t-clear-sgid-when-inheriting-acls.patch b/queue-3.18/f2fs-don-t-clear-sgid-when-inheriting-acls.patch new file mode 100644 index 00000000000..2c2109389e3 --- /dev/null +++ b/queue-3.18/f2fs-don-t-clear-sgid-when-inheriting-acls.patch @@ -0,0 +1,34 @@ +From c925dc162f770578ff4a65ec9b08270382dba9e6 Mon Sep 17 00:00:00 2001 +From: Jaegeuk Kim +Date: Tue, 11 Jul 2017 14:56:49 -0700 +Subject: f2fs: Don't clear SGID when inheriting ACLs + +From: Jaegeuk Kim + +commit c925dc162f770578ff4a65ec9b08270382dba9e6 upstream. + +This patch copies commit b7f8a09f80: +"btrfs: Don't clear SGID when inheriting ACLs" written by Jan. + +Fixes: 073931017b49d9458aa351605b43a7e34598caef +Signed-off-by: Jan Kara +Reviewed-by: Chao Yu +Reviewed-by: Jan Kara +Signed-off-by: Jaegeuk Kim +Signed-off-by: Greg Kroah-Hartman + +--- + fs/f2fs/acl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/f2fs/acl.c ++++ b/fs/f2fs/acl.c +@@ -206,7 +206,7 @@ static int __f2fs_set_acl(struct inode * + switch (type) { + case ACL_TYPE_ACCESS: + name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS; +- if (acl) { ++ if (acl && !ipage) { + error = posix_acl_update_mode(inode, &inode->i_mode, &acl); + if (error) + return error; diff --git a/queue-3.18/raid5-should-update-rdev-sectors-after-reshape.patch b/queue-3.18/raid5-should-update-rdev-sectors-after-reshape.patch new file mode 100644 index 00000000000..da553dce067 --- /dev/null +++ b/queue-3.18/raid5-should-update-rdev-sectors-after-reshape.patch @@ -0,0 +1,53 @@ +From b5d27718f38843a74552e9a93d32e2391fd3999f Mon Sep 17 00:00:00 2001 +From: Xiao Ni +Date: Wed, 5 Jul 2017 17:34:04 +0800 +Subject: Raid5 should update rdev->sectors after reshape + +From: Xiao Ni + +commit b5d27718f38843a74552e9a93d32e2391fd3999f upstream. + +The raid5 md device is created by the disks which we don't use the total size. For example, +the size of the device is 5G and it just uses 3G of the devices to create one raid5 device. +Then change the chunksize and wait reshape to finish. After reshape finishing stop the raid +and assemble it again. It fails. +mdadm -CR /dev/md0 -l5 -n3 /dev/loop[0-2] --size=3G --chunk=32 --assume-clean +mdadm /dev/md0 --grow --chunk=64 +wait reshape to finish +mdadm -S /dev/md0 +mdadm -As +The error messages: +[197519.814302] md: loop1 does not have a valid v1.2 superblock, not importing! +[197519.821686] md: md_import_device returned -22 + +After reshape the data offset is changed. It selects backwards direction in this condition. +In function super_1_load it compares the available space of the underlying device with +sb->data_size. The new data offset gets bigger after reshape. So super_1_load returns -EINVAL. +rdev->sectors is updated in md_finish_reshape. Then sb->data_size is set in super_1_sync based +on rdev->sectors. So add md_finish_reshape in end_reshape. + +Signed-off-by: Xiao Ni +Acked-by: Guoqing Jiang +Signed-off-by: Shaohua Li +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/raid5.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/drivers/md/raid5.c ++++ b/drivers/md/raid5.c +@@ -6722,12 +6722,10 @@ static void end_reshape(struct r5conf *c + { + + if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { +- struct md_rdev *rdev; + + spin_lock_irq(&conf->device_lock); + conf->previous_raid_disks = conf->raid_disks; +- rdev_for_each(rdev, conf->mddev) +- rdev->data_offset = rdev->new_data_offset; ++ md_finish_reshape(conf->mddev); + smp_wmb(); + conf->reshape_progress = MaxSector; + spin_unlock_irq(&conf->device_lock); diff --git a/queue-3.18/s390-syscalls-fix-out-of-bounds-arguments-access.patch b/queue-3.18/s390-syscalls-fix-out-of-bounds-arguments-access.patch new file mode 100644 index 00000000000..b052ba2e6a6 --- /dev/null +++ b/queue-3.18/s390-syscalls-fix-out-of-bounds-arguments-access.patch @@ -0,0 +1,58 @@ +From c46fc0424ced3fb71208e72bd597d91b9169a781 Mon Sep 17 00:00:00 2001 +From: Jiri Olsa +Date: Thu, 29 Jun 2017 11:38:11 +0200 +Subject: s390/syscalls: Fix out of bounds arguments access + +From: Jiri Olsa + +commit c46fc0424ced3fb71208e72bd597d91b9169a781 upstream. + +Zorro reported following crash while having enabled +syscall tracing (CONFIG_FTRACE_SYSCALLS): + + Unable to handle kernel pointer dereference at virtual ... + Oops: 0011 [#1] SMP DEBUG_PAGEALLOC + + SNIP + + Call Trace: + ([<000000000024d79c>] ftrace_syscall_enter+0xec/0x1d8) + [<00000000001099c6>] do_syscall_trace_enter+0x236/0x2f8 + [<0000000000730f1c>] sysc_tracesys+0x1a/0x32 + [<000003fffcf946a2>] 0x3fffcf946a2 + INFO: lockdep is turned off. + Last Breaking-Event-Address: + [<000000000022dd44>] rb_event_data+0x34/0x40 + ---[ end trace 8c795f86b1b3f7b9 ]--- + +The crash happens in syscall_get_arguments function for +syscalls with zero arguments, that will try to access +first argument (args[0]) in event entry, but it's not +allocated. + +Bail out of there are no arguments. + +Reported-by: Zorro Lang +Signed-off-by: Jiri Olsa +Signed-off-by: Martin Schwidefsky +Signed-off-by: Greg Kroah-Hartman + +--- + arch/s390/include/asm/syscall.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/arch/s390/include/asm/syscall.h ++++ b/arch/s390/include/asm/syscall.h +@@ -64,6 +64,12 @@ static inline void syscall_get_arguments + { + unsigned long mask = -1UL; + ++ /* ++ * No arguments for this syscall, there's nothing to do. ++ */ ++ if (!n) ++ return; ++ + BUG_ON(i + n > 6); + #ifdef CONFIG_COMPAT + if (test_tsk_thread_flag(task, TIF_31BIT)) diff --git a/queue-3.18/series b/queue-3.18/series index 904faa2b93a..c5adf9e554a 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -28,3 +28,7 @@ usb-storage-return-on-error-to-avoid-a-null-pointer-dereference.patch usb-cdc-acm-add-device-id-for-quirky-printer.patch usb-renesas_usbhs-fix-usbhsc_resume-for-usbhsf_runtime_pwctrl.patch md-don-t-use-flush_signals-in-userspace-processes.patch +raid5-should-update-rdev-sectors-after-reshape.patch +s390-syscalls-fix-out-of-bounds-arguments-access.patch +drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch +f2fs-don-t-clear-sgid-when-inheriting-acls.patch