From: Greg Kroah-Hartman Date: Tue, 20 Jan 2015 09:06:14 +0000 (+0800) Subject: 3.14-stable patches X-Git-Tag: v3.10.66~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad18f1b514699bd1af31d87d1c546b738661769f;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: clk-don-t-try-to-use-a-struct-clk-after-it-could-have-been-freed.patch clk-really-fix-deadlock-with-mmap_sem.patch clk-samsung-fix-double-add-of-syscore-ops-after-driver-rebind.patch parisc-fix-out-of-register-compiler-error-in-ldcw-inline-assembler-function.patch revert-mpt2sas-remove-phys-on-topology-change.patch revert-mpt3sas-remove-phys-on-topology-change.patch scsi-blacklist-rsoc-for-microsoft-iscsi-target-devices.patch --- diff --git a/queue-3.14/clk-don-t-try-to-use-a-struct-clk-after-it-could-have-been-freed.patch b/queue-3.14/clk-don-t-try-to-use-a-struct-clk-after-it-could-have-been-freed.patch new file mode 100644 index 00000000000..bb194bcb177 --- /dev/null +++ b/queue-3.14/clk-don-t-try-to-use-a-struct-clk-after-it-could-have-been-freed.patch @@ -0,0 +1,43 @@ +From 10cdfe54dab034311c8e2fad9ba2dffbe616caa9 Mon Sep 17 00:00:00 2001 +From: Tomeu Vizoso +Date: Tue, 2 Dec 2014 08:54:19 +0100 +Subject: clk: Don't try to use a struct clk* after it could have been freed + +From: Tomeu Vizoso + +commit 10cdfe54dab034311c8e2fad9ba2dffbe616caa9 upstream. + +As __clk_release could call kfree on clk and then we wouldn't have a safe way +of getting the module that owns the clock. + +Signed-off-by: Tomeu Vizoso +Fixes: fcb0ee6a3d33 ("clk: Implement clk_unregister") +Reviewed-by: Stephen Boyd +Signed-off-by: Michael Turquette +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/clk.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/clk/clk.c ++++ b/drivers/clk/clk.c +@@ -2233,14 +2233,17 @@ int __clk_get(struct clk *clk) + + void __clk_put(struct clk *clk) + { ++ struct module *owner; ++ + if (!clk || WARN_ON_ONCE(IS_ERR(clk))) + return; + + clk_prepare_lock(); ++ owner = clk->owner; + kref_put(&clk->ref, __clk_release); + clk_prepare_unlock(); + +- module_put(clk->owner); ++ module_put(owner); + } + + /*** clk rate change notifiers ***/ diff --git a/queue-3.14/clk-really-fix-deadlock-with-mmap_sem.patch b/queue-3.14/clk-really-fix-deadlock-with-mmap_sem.patch new file mode 100644 index 00000000000..1036d3e2539 --- /dev/null +++ b/queue-3.14/clk-really-fix-deadlock-with-mmap_sem.patch @@ -0,0 +1,56 @@ +From 89f7e9de59bf3e3cda2e00de12c66db22675a7cf Mon Sep 17 00:00:00 2001 +From: Stephen Boyd +Date: Fri, 12 Dec 2014 15:04:16 -0800 +Subject: clk: Really fix deadlock with mmap_sem + +From: Stephen Boyd + +commit 89f7e9de59bf3e3cda2e00de12c66db22675a7cf upstream. + +Commit 6314b6796e3c (clk: Don't hold prepare_lock across debugfs +creation, 2014-09-04) forgot to update one place where we hold +the prepare_lock while creating debugfs directories. This means +we still have the chance of a deadlock that the commit was trying +to fix. Actually fix it by moving the debugfs creation outside +the prepare_lock. + +Reported-by: Russell King +Fixes: 6314b6796e3c "clk: Don't hold prepare_lock across debugfs creation" +Signed-off-by: Stephen Boyd +Reviewed-by: Thomas Gleixner +Signed-off-by: Michael Turquette +[mturquette@linaro.org: removed lockdep_assert] +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/clk.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/clk/clk.c ++++ b/drivers/clk/clk.c +@@ -230,7 +230,6 @@ static const struct file_operations clk_ + .release = single_release, + }; + +-/* caller must hold prepare_lock */ + static int clk_debug_create_one(struct clk *clk, struct dentry *pdentry) + { + struct dentry *d; +@@ -1902,7 +1901,6 @@ int __clk_init(struct device *dev, struc + else + clk->rate = 0; + +- clk_debug_register(clk); + /* + * walk the list of orphan clocks and reparent any that are children of + * this clock +@@ -1937,6 +1935,9 @@ int __clk_init(struct device *dev, struc + out: + clk_prepare_unlock(); + ++ if (!ret) ++ clk_debug_register(clk); ++ + return ret; + } + diff --git a/queue-3.14/clk-samsung-fix-double-add-of-syscore-ops-after-driver-rebind.patch b/queue-3.14/clk-samsung-fix-double-add-of-syscore-ops-after-driver-rebind.patch new file mode 100644 index 00000000000..eff630f7b06 --- /dev/null +++ b/queue-3.14/clk-samsung-fix-double-add-of-syscore-ops-after-driver-rebind.patch @@ -0,0 +1,60 @@ +From c31844ffdbd4e73a16c66e9d7df8ec290ab4b159 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Wed, 26 Nov 2014 15:24:13 +0100 +Subject: clk: samsung: Fix double add of syscore ops after driver rebind + +From: Krzysztof Kozlowski + +commit c31844ffdbd4e73a16c66e9d7df8ec290ab4b159 upstream. + +During driver unbind the syscore ops were not unregistered which lead to +double add on syscore list: + +$ echo "3810000.audss-clock-controller" > /sys/bus/platform/drivers/exynos-audss-clk/unbind +$ echo "3810000.audss-clock-controller" > /sys/bus/platform/drivers/exynos-audss-clk/bind +[ 1463.044061] ------------[ cut here ]------------ +[ 1463.047255] WARNING: CPU: 0 PID: 1 at lib/list_debug.c:36 __list_add+0x8c/0xc0() +[ 1463.054613] list_add double add: new=c06e52c0, prev=c06e52c0, next=c06d5f84. +[ 1463.061625] Modules linked in: +[ 1463.064623] CPU: 0 PID: 1 Comm: bash Tainted: G W 3.18.0-rc5-next-20141121-00005-ga8fab06eab42-dirty #1022 +[ 1463.075338] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) +[ 1463.083046] [] (show_stack) from [] (dump_stack+0x70/0xbc) +[ 1463.090236] [] (dump_stack) from [] (warn_slowpath_common+0x74/0xb0) +[ 1463.098295] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) +[ 1463.106962] [] (warn_slowpath_fmt) from [] (__list_add+0x8c/0xc0) +[ 1463.114760] [] (__list_add) from [] (register_syscore_ops+0x30/0x3c) +[ 1463.122819] [] (register_syscore_ops) from [] (exynos_audss_clk_probe+0x36c/0x460) +[ 1463.132091] [] (exynos_audss_clk_probe) from [] (platform_drv_probe+0x48/0xa4) +[ 1463.141013] [] (platform_drv_probe) from [] (driver_probe_device+0x13c/0x37c) +[ 1463.149852] [] (driver_probe_device) from [] (bind_store+0x90/0xe0) +[ 1463.157822] [] (bind_store) from [] (drv_attr_store+0x20/0x2c) +[ 1463.165363] [] (drv_attr_store) from [] (sysfs_kf_write+0x4c/0x50) +[ 1463.173252] [] (sysfs_kf_write) from [] (kernfs_fop_write+0xbc/0x198) +[ 1463.181395] [] (kernfs_fop_write) from [] (vfs_write+0xa0/0x1a8) +[ 1463.189104] [] (vfs_write) from [] (SyS_write+0x40/0x8c) +[ 1463.196122] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x48) +[ 1463.203655] ---[ end trace 08f6710c9bc8d8f3 ]--- +[ 1463.208244] exynos-audss-clk 3810000.audss-clock-controller: setup completed + +Signed-off-by: Krzysztof Kozlowski +Fixes: 1241ef94ccc3 ("clk: samsung: register audio subsystem clocks using common clock framework") +Signed-off-by: Sylwester Nawrocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/samsung/clk-exynos-audss.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/clk/samsung/clk-exynos-audss.c ++++ b/drivers/clk/samsung/clk-exynos-audss.c +@@ -210,6 +210,10 @@ static int exynos_audss_clk_remove(struc + { + int i; + ++#ifdef CONFIG_PM_SLEEP ++ unregister_syscore_ops(&exynos_audss_clk_syscore_ops); ++#endif ++ + of_clk_del_provider(pdev->dev.of_node); + + for (i = 0; i < clk_data.clk_num; i++) { diff --git a/queue-3.14/parisc-fix-out-of-register-compiler-error-in-ldcw-inline-assembler-function.patch b/queue-3.14/parisc-fix-out-of-register-compiler-error-in-ldcw-inline-assembler-function.patch new file mode 100644 index 00000000000..a078a9b8f69 --- /dev/null +++ b/queue-3.14/parisc-fix-out-of-register-compiler-error-in-ldcw-inline-assembler-function.patch @@ -0,0 +1,47 @@ +From 45db07382a5c78b0c43b3b0002b63757fb60e873 Mon Sep 17 00:00:00 2001 +From: John David Anglin +Date: Sun, 14 Dec 2014 10:49:11 -0500 +Subject: parisc: fix out-of-register compiler error in ldcw inline assembler function + +From: John David Anglin + +commit 45db07382a5c78b0c43b3b0002b63757fb60e873 upstream. + +The __ldcw macro has a problem when its argument needs to be reloaded from +memory. The output memory operand and the input register operand both need to +be reloaded using a register in class R1_REGS when generating 64-bit code. +This fails because there's only a single register in the class. Instead, use a +memory clobber. This also makes the __ldcw macro a compiler memory barrier. + +Signed-off-by: John David Anglin +Signed-off-by: Helge Deller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/parisc/include/asm/ldcw.h | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +--- a/arch/parisc/include/asm/ldcw.h ++++ b/arch/parisc/include/asm/ldcw.h +@@ -33,11 +33,18 @@ + + #endif /*!CONFIG_PA20*/ + +-/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ ++/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. ++ We don't explicitly expose that "*a" may be written as reload ++ fails to find a register in class R1_REGS when "a" needs to be ++ reloaded when generating 64-bit PIC code. Instead, we clobber ++ memory to indicate to the compiler that the assembly code reads ++ or writes to items other than those listed in the input and output ++ operands. This may pessimize the code somewhat but __ldcw is ++ usually used within code blocks surrounded by memory barriors. */ + #define __ldcw(a) ({ \ + unsigned __ret; \ +- __asm__ __volatile__(__LDCW " 0(%2),%0" \ +- : "=r" (__ret), "+m" (*(a)) : "r" (a)); \ ++ __asm__ __volatile__(__LDCW " 0(%1),%0" \ ++ : "=r" (__ret) : "r" (a) : "memory"); \ + __ret; \ + }) + diff --git a/queue-3.14/revert-mpt2sas-remove-phys-on-topology-change.patch b/queue-3.14/revert-mpt2sas-remove-phys-on-topology-change.patch new file mode 100644 index 00000000000..f41e32f9429 --- /dev/null +++ b/queue-3.14/revert-mpt2sas-remove-phys-on-topology-change.patch @@ -0,0 +1,47 @@ +From 81a89c2d891b78695aa7e4cc0d5a7427785ae078 Mon Sep 17 00:00:00 2001 +From: Sreekanth Reddy +Date: Tue, 2 Dec 2014 20:58:46 +0530 +Subject: Revert "[SCSI] mpt2sas: Remove phys on topology change." + +From: Sreekanth Reddy + +commit 81a89c2d891b78695aa7e4cc0d5a7427785ae078 upstream. + +This reverts commit 3520f9c779bed098ca76dd3fb6377264301d57ed +("mpt2sas: Remove phys on topology change") + +Reverting the previous mpt2sas drives patch changes, +since we will observe below issue + +Issue: +Drives connected Enclosure/Expander will unregister with +SCSI Transport Layer, if any one remove and add expander +cable with in DMD (Device Missing Delay) time period or +even any one power-off and power-on the Enclosure with in +the DMD period. + +Signed-off-by: Sreekanth Reddy +Reviewed-by: Tomas Henzl +Signed-off-by: Christoph Hellwig +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt2sas/mpt2sas_transport.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/drivers/scsi/mpt2sas/mpt2sas_transport.c ++++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c +@@ -1006,12 +1006,9 @@ mpt2sas_transport_update_links(struct MP + &mpt2sas_phy->remote_identify); + _transport_add_phy_to_an_existing_port(ioc, sas_node, + mpt2sas_phy, mpt2sas_phy->remote_identify.sas_address); +- } else { ++ } else + memset(&mpt2sas_phy->remote_identify, 0 , sizeof(struct + sas_identify)); +- _transport_del_phy_from_an_existing_port(ioc, sas_node, +- mpt2sas_phy); +- } + + if (mpt2sas_phy->phy) + mpt2sas_phy->phy->negotiated_linkrate = diff --git a/queue-3.14/revert-mpt3sas-remove-phys-on-topology-change.patch b/queue-3.14/revert-mpt3sas-remove-phys-on-topology-change.patch new file mode 100644 index 00000000000..8b127a6eafc --- /dev/null +++ b/queue-3.14/revert-mpt3sas-remove-phys-on-topology-change.patch @@ -0,0 +1,47 @@ +From 2311ce4d9c91ed63a46e18f0378f3e406e7e888e Mon Sep 17 00:00:00 2001 +From: Sreekanth Reddy +Date: Tue, 2 Dec 2014 20:58:47 +0530 +Subject: Revert "[SCSI] mpt3sas: Remove phys on topology change" + +From: Sreekanth Reddy + +commit 2311ce4d9c91ed63a46e18f0378f3e406e7e888e upstream. + +This reverts commit 963ba22b90a955363644cd397b20226928eab976 +("mpt3sas: Remove phys on topology change") + +Reverting the previous mpt3sas drives patch changes, +since we will observe below issue + +Issue: +Drives connected Enclosure/Expander will unregister with +SCSI Transport Layer, if any one remove and add expander +cable with in DMD (Device Missing Delay) time period or +even any one power-off and power-on the Enclosure with in +the DMD period. + +Signed-off-by: Sreekanth Reddy +Reviewed-by: Tomas Henzl +Signed-off-by: Christoph Hellwig +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt3sas/mpt3sas_transport.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/drivers/scsi/mpt3sas/mpt3sas_transport.c ++++ b/drivers/scsi/mpt3sas/mpt3sas_transport.c +@@ -1003,12 +1003,9 @@ mpt3sas_transport_update_links(struct MP + &mpt3sas_phy->remote_identify); + _transport_add_phy_to_an_existing_port(ioc, sas_node, + mpt3sas_phy, mpt3sas_phy->remote_identify.sas_address); +- } else { ++ } else + memset(&mpt3sas_phy->remote_identify, 0 , sizeof(struct + sas_identify)); +- _transport_del_phy_from_an_existing_port(ioc, sas_node, +- mpt3sas_phy); +- } + + if (mpt3sas_phy->phy) + mpt3sas_phy->phy->negotiated_linkrate = diff --git a/queue-3.14/scsi-blacklist-rsoc-for-microsoft-iscsi-target-devices.patch b/queue-3.14/scsi-blacklist-rsoc-for-microsoft-iscsi-target-devices.patch new file mode 100644 index 00000000000..dc8f890261b --- /dev/null +++ b/queue-3.14/scsi-blacklist-rsoc-for-microsoft-iscsi-target-devices.patch @@ -0,0 +1,32 @@ +From 198a956a11b15b564ac06d1411881e215b587408 Mon Sep 17 00:00:00 2001 +From: "Martin K. Petersen" +Date: Wed, 3 Dec 2014 21:18:10 -0500 +Subject: scsi: blacklist RSOC for Microsoft iSCSI target devices + +From: "Martin K. Petersen" + +commit 198a956a11b15b564ac06d1411881e215b587408 upstream. + +The Microsoft iSCSI target does not support REPORT SUPPORTED OPERATION +CODES. Blacklist these devices so we don't attempt to send the command. + +Signed-off-by: Martin K. Petersen +Tested-by: Mike Christie +Reported-by: jazz@deti74.ru +Signed-off-by: Christoph Hellwig +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/scsi_devinfo.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/scsi/scsi_devinfo.c ++++ b/drivers/scsi/scsi_devinfo.c +@@ -211,6 +211,7 @@ static struct { + {"Medion", "Flash XL MMC/SD", "2.6D", BLIST_FORCELUN}, + {"MegaRAID", "LD", NULL, BLIST_FORCELUN}, + {"MICROP", "4110", NULL, BLIST_NOTQ}, ++ {"MSFT", "Virtual HD", NULL, BLIST_NO_RSOC}, + {"MYLEX", "DACARMRB", "*", BLIST_REPORTLUN2}, + {"nCipher", "Fastness Crypto", NULL, BLIST_FORCELUN}, + {"NAKAMICH", "MJ-4.8S", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, diff --git a/queue-3.14/series b/queue-3.14/series index 09a6043f17a..7594ac2d74c 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -34,3 +34,10 @@ hp_accel-add-support-for-hp-zbook-15.patch tick-powerclamp-remove-tick_nohz_idle-abuse.patch genirq-prevent-proc-race-against-freeing-of-irq-descriptors.patch iscsi-target-fail-connection-on-short-sendmsg-writes.patch +revert-mpt2sas-remove-phys-on-topology-change.patch +revert-mpt3sas-remove-phys-on-topology-change.patch +scsi-blacklist-rsoc-for-microsoft-iscsi-target-devices.patch +clk-samsung-fix-double-add-of-syscore-ops-after-driver-rebind.patch +clk-really-fix-deadlock-with-mmap_sem.patch +clk-don-t-try-to-use-a-struct-clk-after-it-could-have-been-freed.patch +parisc-fix-out-of-register-compiler-error-in-ldcw-inline-assembler-function.patch