From: Greg Kroah-Hartman Date: Fri, 7 Sep 2018 11:52:12 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.18.7~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8c1d7759667e81aac936ac39b35c4f5bb2a67e1;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: arm-tegra-fix-tegra30-cardhu-pca954x-reset.patch pm-sleep-wakeup-fix-build-error-caused-by-missing-srcu-support.patch pnfs-blocklayout-off-by-one-in-bl_map_stripe.patch --- diff --git a/queue-4.4/arm-tegra-fix-tegra30-cardhu-pca954x-reset.patch b/queue-4.4/arm-tegra-fix-tegra30-cardhu-pca954x-reset.patch new file mode 100644 index 00000000000..19a85354d6a --- /dev/null +++ b/queue-4.4/arm-tegra-fix-tegra30-cardhu-pca954x-reset.patch @@ -0,0 +1,44 @@ +From 6e1811900b6fe6f2b4665dba6bd6ed32c6b98575 Mon Sep 17 00:00:00 2001 +From: Jon Hunter +Date: Tue, 3 Jul 2018 09:59:47 +0100 +Subject: ARM: tegra: Fix Tegra30 Cardhu PCA954x reset + +From: Jon Hunter + +commit 6e1811900b6fe6f2b4665dba6bd6ed32c6b98575 upstream. + +On all versions of Tegra30 Cardhu, the reset signal to the NXP PCA9546 +I2C mux is connected to the Tegra GPIO BB0. Currently, this pin on the +Tegra is not configured as a GPIO but as a special-function IO (SFIO) +that is multiplexing the pin to an I2S controller. On exiting system +suspend, I2C commands sent to the PCA9546 are failing because there is +no ACK. Although it is not possible to see exactly what is happening +to the reset during suspend, by ensuring it is configured as a GPIO +and driven high, to de-assert the reset, the failures are no longer +seen. + +Please note that this GPIO is also used to drive the reset signal +going to the camera connector on the board. However, given that there +is no camera support currently for Cardhu, this should not have any +impact. + +Fixes: 40431d16ff11 ("ARM: tegra: enable PCA9546 on Cardhu") +Cc: stable@vger.kernel.org +Signed-off-by: Jon Hunter +Signed-off-by: Thierry Reding +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/tegra30-cardhu.dtsi | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi ++++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi +@@ -201,6 +201,7 @@ + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; ++ reset-gpio = <&gpio TEGRA_GPIO(BB, 0) GPIO_ACTIVE_LOW>; + }; + }; + diff --git a/queue-4.4/pm-sleep-wakeup-fix-build-error-caused-by-missing-srcu-support.patch b/queue-4.4/pm-sleep-wakeup-fix-build-error-caused-by-missing-srcu-support.patch new file mode 100644 index 00000000000..501fac318c2 --- /dev/null +++ b/queue-4.4/pm-sleep-wakeup-fix-build-error-caused-by-missing-srcu-support.patch @@ -0,0 +1,53 @@ +From 3df6f61fff49632492490fb6e42646b803a9958a Mon Sep 17 00:00:00 2001 +From: "zhangyi (F)" +Date: Tue, 14 Aug 2018 10:34:42 +0800 +Subject: PM / sleep: wakeup: Fix build error caused by missing SRCU support + +From: zhangyi (F) + +commit 3df6f61fff49632492490fb6e42646b803a9958a upstream. + +Commit ea0212f40c6 (power: auto select CONFIG_SRCU) made the code in +drivers/base/power/wakeup.c use SRCU instead of RCU, but it forgot to +select CONFIG_SRCU in Kconfig, which leads to the following build +error if CONFIG_SRCU is not selected somewhere else: + +drivers/built-in.o: In function `wakeup_source_remove': +(.text+0x3c6fc): undefined reference to `synchronize_srcu' +drivers/built-in.o: In function `pm_print_active_wakeup_sources': +(.text+0x3c7a8): undefined reference to `__srcu_read_lock' +drivers/built-in.o: In function `pm_print_active_wakeup_sources': +(.text+0x3c84c): undefined reference to `__srcu_read_unlock' +drivers/built-in.o: In function `device_wakeup_arm_wake_irqs': +(.text+0x3d1d8): undefined reference to `__srcu_read_lock' +drivers/built-in.o: In function `device_wakeup_arm_wake_irqs': +(.text+0x3d228): undefined reference to `__srcu_read_unlock' +drivers/built-in.o: In function `device_wakeup_disarm_wake_irqs': +(.text+0x3d24c): undefined reference to `__srcu_read_lock' +drivers/built-in.o: In function `device_wakeup_disarm_wake_irqs': +(.text+0x3d29c): undefined reference to `__srcu_read_unlock' +drivers/built-in.o:(.data+0x4158): undefined reference to `process_srcu' + +Fix this error by selecting CONFIG_SRCU when PM_SLEEP is enabled. + +Fixes: ea0212f40c6 (power: auto select CONFIG_SRCU) +Cc: 4.2+ # 4.2+ +Signed-off-by: zhangyi (F) +[ rjw: Minor subject/changelog fixups ] +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/power/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/kernel/power/Kconfig ++++ b/kernel/power/Kconfig +@@ -105,6 +105,7 @@ config PM_SLEEP + def_bool y + depends on SUSPEND || HIBERNATE_CALLBACKS + select PM ++ select SRCU + + config PM_SLEEP_SMP + def_bool y diff --git a/queue-4.4/pnfs-blocklayout-off-by-one-in-bl_map_stripe.patch b/queue-4.4/pnfs-blocklayout-off-by-one-in-bl_map_stripe.patch new file mode 100644 index 00000000000..8458f29253c --- /dev/null +++ b/queue-4.4/pnfs-blocklayout-off-by-one-in-bl_map_stripe.patch @@ -0,0 +1,37 @@ +From 0914bb965e38a055e9245637aed117efbe976e91 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Wed, 4 Jul 2018 12:59:58 +0300 +Subject: pnfs/blocklayout: off by one in bl_map_stripe() + +From: Dan Carpenter + +commit 0914bb965e38a055e9245637aed117efbe976e91 upstream. + +"dev->nr_children" is the number of children which were parsed +successfully in bl_parse_stripe(). It could be all of them and then, in +that case, it is equal to v->stripe.volumes_count. Either way, the > +should be >= so that we don't go beyond the end of what we're supposed +to. + +Fixes: 5c83746a0cf2 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing") +Signed-off-by: Dan Carpenter +Reviewed-by: Christoph Hellwig +Cc: stable@vger.kernel.org # 3.17+ +Signed-off-by: Anna Schumaker +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/blocklayout/dev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/nfs/blocklayout/dev.c ++++ b/fs/nfs/blocklayout/dev.c +@@ -162,7 +162,7 @@ static bool bl_map_stripe(struct pnfs_bl + chunk = div_u64(offset, dev->chunk_size); + div_u64_rem(chunk, dev->nr_children, &chunk_idx); + +- if (chunk_idx > dev->nr_children) { ++ if (chunk_idx >= dev->nr_children) { + dprintk("%s: invalid chunk idx %d (%lld/%lld)\n", + __func__, chunk_idx, offset, dev->chunk_size); + /* error, should not happen */ diff --git a/queue-4.4/series b/queue-4.4/series index 70a1ddf8104..61bf3d5ed3f 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -23,3 +23,6 @@ tracing-blktrace-fix-to-allow-setting-same-value.patch kthread-tracing-don-t-expose-half-written-comm-when-creating-kthreads.patch uprobes-use-synchronize_rcu-not-synchronize_sched.patch 9p-fix-multiple-null-pointer-dereferences.patch +pm-sleep-wakeup-fix-build-error-caused-by-missing-srcu-support.patch +pnfs-blocklayout-off-by-one-in-bl_map_stripe.patch +arm-tegra-fix-tegra30-cardhu-pca954x-reset.patch