From: Greg Kroah-Hartman Date: Mon, 19 Feb 2018 16:43:59 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.15.5~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28f0cf623d699f27e5a79cc29e4663f5f52725db;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: alsa-seq-fix-regression-by-incorrect-ioctl_mutex-usages.patch arm-dts-sti-add-gpio-polarity-for-hdmi-hpd-gpio-property.patch arm-spear13xx-fix-dmas-cells.patch arm-spear13xx-fix-spics-gpio-controller-s-warning.patch arm-spear600-add-missing-interrupt-parent-of-rtc.patch pm-devfreq-propagate-error-from-devfreq_add_device.patch s390-fix-handling-of-1-in-set-fs-id16-syscalls.patch --- diff --git a/queue-4.4/alsa-seq-fix-regression-by-incorrect-ioctl_mutex-usages.patch b/queue-4.4/alsa-seq-fix-regression-by-incorrect-ioctl_mutex-usages.patch new file mode 100644 index 00000000000..14288dd5375 --- /dev/null +++ b/queue-4.4/alsa-seq-fix-regression-by-incorrect-ioctl_mutex-usages.patch @@ -0,0 +1,74 @@ +From tiwai@suse.de Mon Feb 19 17:39:59 2018 +From: Takashi Iwai +Date: Mon, 19 Feb 2018 17:16:01 +0100 +Subject: ALSA: seq: Fix regression by incorrect ioctl_mutex usages +To: Greg Kroah-Hartman +Cc: Andres Bertens , ben@decadent.org.uk, stable@vger.kernel.org +Message-ID: <20180219161601.24110-1-tiwai@suse.de> + +From: Takashi Iwai + +This is the revised backport of the upstream commit +b3defb791b26ea0683a93a4f49c77ec45ec96f10 + +We had another backport (e.g. 623e5c8ae32b in 4.4.115), but it applies +the new mutex also to the code paths that are invoked via faked +kernel-to-kernel ioctls. As reported recently, this leads to a +deadlock at suspend (or other scenarios triggering the kernel +sequencer client). + +This patch addresses the issue by taking the mutex only in the code +paths invoked by user-space, just like the original fix patch does. + +Reported-and-tested-by: Andres Bertens +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + +Tagged as 4.4.x, but should be applied to other older kernels, too. + + sound/core/seq/seq_clientmgr.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +--- a/sound/core/seq/seq_clientmgr.c ++++ b/sound/core/seq/seq_clientmgr.c +@@ -2196,7 +2196,6 @@ static int snd_seq_do_ioctl(struct snd_s + void __user *arg) + { + struct seq_ioctl_table *p; +- int ret; + + switch (cmd) { + case SNDRV_SEQ_IOCTL_PVERSION: +@@ -2210,12 +2209,8 @@ static int snd_seq_do_ioctl(struct snd_s + if (! arg) + return -EFAULT; + for (p = ioctl_tables; p->cmd; p++) { +- if (p->cmd == cmd) { +- mutex_lock(&client->ioctl_mutex); +- ret = p->func(client, arg); +- mutex_unlock(&client->ioctl_mutex); +- return ret; +- } ++ if (p->cmd == cmd) ++ return p->func(client, arg); + } + pr_debug("ALSA: seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n", + cmd, _IOC_TYPE(cmd), _IOC_NR(cmd)); +@@ -2226,11 +2221,15 @@ static int snd_seq_do_ioctl(struct snd_s + static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + { + struct snd_seq_client *client = file->private_data; ++ long ret; + + if (snd_BUG_ON(!client)) + return -ENXIO; + +- return snd_seq_do_ioctl(client, cmd, (void __user *) arg); ++ mutex_lock(&client->ioctl_mutex); ++ ret = snd_seq_do_ioctl(client, cmd, (void __user *) arg); ++ mutex_unlock(&client->ioctl_mutex); ++ return ret; + } + + #ifdef CONFIG_COMPAT diff --git a/queue-4.4/arm-dts-sti-add-gpio-polarity-for-hdmi-hpd-gpio-property.patch b/queue-4.4/arm-dts-sti-add-gpio-polarity-for-hdmi-hpd-gpio-property.patch new file mode 100644 index 00000000000..7f1f3a8149f --- /dev/null +++ b/queue-4.4/arm-dts-sti-add-gpio-polarity-for-hdmi-hpd-gpio-property.patch @@ -0,0 +1,73 @@ +From 7ac1f59c09a61e6af6622df6809e003b0af07f3d Mon Sep 17 00:00:00 2001 +From: Patrice Chotard +Date: Wed, 10 Jan 2018 09:21:02 +0100 +Subject: ARM: dts: STi: Add gpio polarity for "hdmi,hpd-gpio" property + +From: Patrice Chotard + +commit 7ac1f59c09a61e6af6622df6809e003b0af07f3d upstream. + +The GPIO polarity is missing in the hdmi,hpd-gpio property, this +fixes the following DT warnings: + +arch/arm/boot/dts/stih410-b2120.dtb: Warning (gpios_property): hdmi,hpd-gpio property +size (8) too small for cell size 2 in /soc/sti-display-subsystem/sti-hdmi@8d04000 + +arch/arm/boot/dts/stih407-b2120.dtb: Warning (gpios_property): hdmi,hpd-gpio property +size (8) too small for cell size 2 in /soc/sti-display-subsystem/sti-hdmi@8d04000 + +arch/arm/boot/dts/stih410-b2260.dtb: Warning (gpios_property): hdmi,hpd-gpio property +size (8) too small for cell size 2 in /soc/sti-display-subsystem/sti-hdmi@8d04000 + +[arnd: marked Cc:stable since this warning shows up with the latest dtc + by default, and is more likely to actually cause problems than the + other patches from this series] + +Cc: stable@vger.kernel.org +Signed-off-by: Patrice Chotard +Signed-off-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/stih407.dtsi | 3 ++- + arch/arm/boot/dts/stih410.dtsi | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/stih407.dtsi ++++ b/arch/arm/boot/dts/stih407.dtsi +@@ -8,6 +8,7 @@ + */ + #include "stih407-clock.dtsi" + #include "stih407-family.dtsi" ++#include + / { + soc { + sti-display-subsystem { +@@ -112,7 +113,7 @@ + <&clk_s_d2_quadfs 0>, + <&clk_s_d2_quadfs 1>; + +- hdmi,hpd-gpio = <&pio5 3>; ++ hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>; + reset-names = "hdmi"; + resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; + ddc = <&hdmiddc>; +--- a/arch/arm/boot/dts/stih410.dtsi ++++ b/arch/arm/boot/dts/stih410.dtsi +@@ -9,6 +9,7 @@ + #include "stih410-clock.dtsi" + #include "stih407-family.dtsi" + #include "stih410-pinctrl.dtsi" ++#include + / { + aliases { + bdisp0 = &bdisp0; +@@ -203,7 +204,7 @@ + <&clk_s_d2_quadfs 0>, + <&clk_s_d2_quadfs 1>; + +- hdmi,hpd-gpio = <&pio5 3>; ++ hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>; + reset-names = "hdmi"; + resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; + ddc = <&hdmiddc>; diff --git a/queue-4.4/arm-spear13xx-fix-dmas-cells.patch b/queue-4.4/arm-spear13xx-fix-dmas-cells.patch new file mode 100644 index 00000000000..b475035744a --- /dev/null +++ b/queue-4.4/arm-spear13xx-fix-dmas-cells.patch @@ -0,0 +1,72 @@ +From cdd10409914184c7eee5ae3e11beb890c9c16c61 Mon Sep 17 00:00:00 2001 +From: Viresh Kumar +Date: Thu, 11 Jan 2018 11:28:52 +0530 +Subject: arm: spear13xx: Fix dmas cells + +From: Viresh Kumar + +commit cdd10409914184c7eee5ae3e11beb890c9c16c61 upstream. + +The "dmas" cells for the designware DMA controller need to have only 3 +properties apart from the phandle: request line, src master and +destination master. But the commit 6e8887f60f60 updated it incorrectly +while moving from platform code to DT. Fix it. + +Cc: stable@vger.kernel.org # v3.10+ +Fixes: 6e8887f60f60 ("ARM: SPEAr13xx: Pass generic DW DMAC platform data from DT") +Reported-by: Arnd Bergmann +Signed-off-by: Viresh Kumar +Signed-off-by: Olof Johansson +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/devicetree/bindings/dma/snps-dma.txt | 2 +- + arch/arm/boot/dts/spear1340.dtsi | 4 ++-- + arch/arm/boot/dts/spear13xx.dtsi | 6 +++--- + 3 files changed, 6 insertions(+), 6 deletions(-) + +--- a/Documentation/devicetree/bindings/dma/snps-dma.txt ++++ b/Documentation/devicetree/bindings/dma/snps-dma.txt +@@ -58,6 +58,6 @@ Example: + interrupts = <0 35 0x4>; + status = "disabled"; + dmas = <&dmahost 12 0 1>, +- <&dmahost 13 0 1 0>; ++ <&dmahost 13 1 0>; + dma-names = "rx", "rx"; + }; +--- a/arch/arm/boot/dts/spear1340.dtsi ++++ b/arch/arm/boot/dts/spear1340.dtsi +@@ -141,8 +141,8 @@ + reg = <0xb4100000 0x1000>; + interrupts = <0 105 0x4>; + status = "disabled"; +- dmas = <&dwdma0 0x600 0 0 1>, /* 0xC << 11 */ +- <&dwdma0 0x680 0 1 0>; /* 0xD << 7 */ ++ dmas = <&dwdma0 12 0 1>, ++ <&dwdma0 13 1 0>; + dma-names = "tx", "rx"; + }; + +--- a/arch/arm/boot/dts/spear13xx.dtsi ++++ b/arch/arm/boot/dts/spear13xx.dtsi +@@ -100,7 +100,7 @@ + reg = <0xb2800000 0x1000>; + interrupts = <0 29 0x4>; + status = "disabled"; +- dmas = <&dwdma0 0 0 0 0>; ++ dmas = <&dwdma0 0 0 0>; + dma-names = "data"; + }; + +@@ -288,8 +288,8 @@ + #size-cells = <0>; + interrupts = <0 31 0x4>; + status = "disabled"; +- dmas = <&dwdma0 0x2000 0 0 0>, /* 0x4 << 11 */ +- <&dwdma0 0x0280 0 0 0>; /* 0x5 << 7 */ ++ dmas = <&dwdma0 4 0 0>, ++ <&dwdma0 5 0 0>; + dma-names = "tx", "rx"; + }; + diff --git a/queue-4.4/arm-spear13xx-fix-spics-gpio-controller-s-warning.patch b/queue-4.4/arm-spear13xx-fix-spics-gpio-controller-s-warning.patch new file mode 100644 index 00000000000..d858bb4761f --- /dev/null +++ b/queue-4.4/arm-spear13xx-fix-spics-gpio-controller-s-warning.patch @@ -0,0 +1,37 @@ +From f8975cb1b8a36d0839b6365235778dd9df1d04ca Mon Sep 17 00:00:00 2001 +From: Viresh Kumar +Date: Thu, 11 Jan 2018 11:28:53 +0530 +Subject: arm: spear13xx: Fix spics gpio controller's warning + +From: Viresh Kumar + +commit f8975cb1b8a36d0839b6365235778dd9df1d04ca upstream. + +This fixes the following warning by also sending the flags argument for +gpio controllers: + +Property 'cs-gpios', cell 6 is not a phandle reference in +/ahb/apb/spi@e0100000 + +Fixes: 8113ba917dfa ("ARM: SPEAr: DT: Update device nodes") +Cc: stable@vger.kernel.org # v3.8+ +Reported-by: Arnd Bergmann +Signed-off-by: Viresh Kumar +Signed-off-by: Olof Johansson +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/spear1310-evb.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/spear1310-evb.dts ++++ b/arch/arm/boot/dts/spear1310-evb.dts +@@ -349,7 +349,7 @@ + spi0: spi@e0100000 { + status = "okay"; + num-cs = <3>; +- cs-gpios = <&gpio1 7 0>, <&spics 0>, <&spics 1>; ++ cs-gpios = <&gpio1 7 0>, <&spics 0 0>, <&spics 1 0>; + + stmpe610@0 { + compatible = "st,stmpe610"; diff --git a/queue-4.4/arm-spear600-add-missing-interrupt-parent-of-rtc.patch b/queue-4.4/arm-spear600-add-missing-interrupt-parent-of-rtc.patch new file mode 100644 index 00000000000..74a39dea080 --- /dev/null +++ b/queue-4.4/arm-spear600-add-missing-interrupt-parent-of-rtc.patch @@ -0,0 +1,32 @@ +From 6ffb5b4f248fe53e0361b8cbc2a523b432566442 Mon Sep 17 00:00:00 2001 +From: Viresh Kumar +Date: Thu, 11 Jan 2018 11:28:51 +0530 +Subject: arm: spear600: Add missing interrupt-parent of rtc + +From: Viresh Kumar + +commit 6ffb5b4f248fe53e0361b8cbc2a523b432566442 upstream. + +The interrupt-parent of rtc was missing, add it. + +Fixes: 8113ba917dfa ("ARM: SPEAr: DT: Update device nodes") +Cc: stable@vger.kernel.org # v3.8+ +Reported-by: Arnd Bergmann +Signed-off-by: Viresh Kumar +Signed-off-by: Olof Johansson +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/spear600.dtsi | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/boot/dts/spear600.dtsi ++++ b/arch/arm/boot/dts/spear600.dtsi +@@ -194,6 +194,7 @@ + rtc@fc900000 { + compatible = "st,spear600-rtc"; + reg = <0xfc900000 0x1000>; ++ interrupt-parent = <&vic0>; + interrupts = <10>; + status = "disabled"; + }; diff --git a/queue-4.4/pm-devfreq-propagate-error-from-devfreq_add_device.patch b/queue-4.4/pm-devfreq-propagate-error-from-devfreq_add_device.patch new file mode 100644 index 00000000000..d380103524f --- /dev/null +++ b/queue-4.4/pm-devfreq-propagate-error-from-devfreq_add_device.patch @@ -0,0 +1,35 @@ +From d1bf2d30728f310f72296b54f0651ecdb09cbb12 Mon Sep 17 00:00:00 2001 +From: Bjorn Andersson +Date: Sun, 5 Nov 2017 21:27:41 -0800 +Subject: PM / devfreq: Propagate error from devfreq_add_device() + +From: Bjorn Andersson + +commit d1bf2d30728f310f72296b54f0651ecdb09cbb12 upstream. + +Propagate the error of devfreq_add_device() in devm_devfreq_add_device() +rather than statically returning ENOMEM. This makes it slightly faster +to pinpoint the cause of a returned error. + +Fixes: 8cd84092d35e ("PM / devfreq: Add resource-managed function for devfreq device") +Cc: stable@vger.kernel.org +Acked-by: Chanwoo Choi +Signed-off-by: Bjorn Andersson +Signed-off-by: MyungJoo Ham +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/devfreq/devfreq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/devfreq/devfreq.c ++++ b/drivers/devfreq/devfreq.c +@@ -583,7 +583,7 @@ struct devfreq *devm_devfreq_add_device( + devfreq = devfreq_add_device(dev, profile, governor_name, data); + if (IS_ERR(devfreq)) { + devres_free(ptr); +- return ERR_PTR(-ENOMEM); ++ return devfreq; + } + + *ptr = devfreq; diff --git a/queue-4.4/s390-fix-handling-of-1-in-set-fs-id16-syscalls.patch b/queue-4.4/s390-fix-handling-of-1-in-set-fs-id16-syscalls.patch new file mode 100644 index 00000000000..bda9348d1ab --- /dev/null +++ b/queue-4.4/s390-fix-handling-of-1-in-set-fs-id16-syscalls.patch @@ -0,0 +1,62 @@ +From 6dd0d2d22aa363fec075cb2577ba273ac8462e94 Mon Sep 17 00:00:00 2001 +From: Eugene Syromiatnikov +Date: Mon, 15 Jan 2018 20:38:17 +0100 +Subject: s390: fix handling of -1 in set{,fs}[gu]id16 syscalls + +From: Eugene Syromiatnikov + +commit 6dd0d2d22aa363fec075cb2577ba273ac8462e94 upstream. + +For some reason, the implementation of some 16-bit ID system calls +(namely, setuid16/setgid16 and setfsuid16/setfsgid16) used type cast +instead of low2highgid/low2highuid macros for converting [GU]IDs, which +led to incorrect handling of value of -1 (which ought to be considered +invalid). + +Discovered by strace test suite. + +Cc: stable@vger.kernel.org +Signed-off-by: Eugene Syromiatnikov +Signed-off-by: Heiko Carstens +Signed-off-by: Martin Schwidefsky +Signed-off-by: Greg Kroah-Hartman + +--- + arch/s390/kernel/compat_linux.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/s390/kernel/compat_linux.c ++++ b/arch/s390/kernel/compat_linux.c +@@ -110,7 +110,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setregid16, + + COMPAT_SYSCALL_DEFINE1(s390_setgid16, u16, gid) + { +- return sys_setgid((gid_t)gid); ++ return sys_setgid(low2highgid(gid)); + } + + COMPAT_SYSCALL_DEFINE2(s390_setreuid16, u16, ruid, u16, euid) +@@ -120,7 +120,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setreuid16, + + COMPAT_SYSCALL_DEFINE1(s390_setuid16, u16, uid) + { +- return sys_setuid((uid_t)uid); ++ return sys_setuid(low2highuid(uid)); + } + + COMPAT_SYSCALL_DEFINE3(s390_setresuid16, u16, ruid, u16, euid, u16, suid) +@@ -173,12 +173,12 @@ COMPAT_SYSCALL_DEFINE3(s390_getresgid16, + + COMPAT_SYSCALL_DEFINE1(s390_setfsuid16, u16, uid) + { +- return sys_setfsuid((uid_t)uid); ++ return sys_setfsuid(low2highuid(uid)); + } + + COMPAT_SYSCALL_DEFINE1(s390_setfsgid16, u16, gid) + { +- return sys_setfsgid((gid_t)gid); ++ return sys_setfsgid(low2highgid(gid)); + } + + static int groups16_to_user(u16 __user *grouplist, struct group_info *group_info) diff --git a/queue-4.4/series b/queue-4.4/series index 5e90424b68c..db4d29f1cd3 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1 +1,8 @@ ib-mlx4-fix-incorrectly-releasing-steerable-ud-qps-when-have-only-eth-ports.patch +pm-devfreq-propagate-error-from-devfreq_add_device.patch +s390-fix-handling-of-1-in-set-fs-id16-syscalls.patch +arm-dts-sti-add-gpio-polarity-for-hdmi-hpd-gpio-property.patch +arm-spear600-add-missing-interrupt-parent-of-rtc.patch +arm-spear13xx-fix-dmas-cells.patch +arm-spear13xx-fix-spics-gpio-controller-s-warning.patch +alsa-seq-fix-regression-by-incorrect-ioctl_mutex-usages.patch