]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jan 2015 09:06:14 +0000 (17:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jan 2015 09:06:14 +0000 (17:06 +0800)
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

queue-3.14/clk-don-t-try-to-use-a-struct-clk-after-it-could-have-been-freed.patch [new file with mode: 0644]
queue-3.14/clk-really-fix-deadlock-with-mmap_sem.patch [new file with mode: 0644]
queue-3.14/clk-samsung-fix-double-add-of-syscore-ops-after-driver-rebind.patch [new file with mode: 0644]
queue-3.14/parisc-fix-out-of-register-compiler-error-in-ldcw-inline-assembler-function.patch [new file with mode: 0644]
queue-3.14/revert-mpt2sas-remove-phys-on-topology-change.patch [new file with mode: 0644]
queue-3.14/revert-mpt3sas-remove-phys-on-topology-change.patch [new file with mode: 0644]
queue-3.14/scsi-blacklist-rsoc-for-microsoft-iscsi-target-devices.patch [new file with mode: 0644]
queue-3.14/series

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 (file)
index 0000000..bb194bc
--- /dev/null
@@ -0,0 +1,43 @@
+From 10cdfe54dab034311c8e2fad9ba2dffbe616caa9 Mon Sep 17 00:00:00 2001
+From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
+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 <tomeu.vizoso@collabora.com>
+
+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 <tomeu.vizoso@collabora.com>
+Fixes: fcb0ee6a3d33 ("clk: Implement clk_unregister")
+Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
+Signed-off-by: Michael Turquette <mturquette@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..1036d3e
--- /dev/null
@@ -0,0 +1,56 @@
+From 89f7e9de59bf3e3cda2e00de12c66db22675a7cf Mon Sep 17 00:00:00 2001
+From: Stephen Boyd <sboyd@codeaurora.org>
+Date: Fri, 12 Dec 2014 15:04:16 -0800
+Subject: clk: Really fix deadlock with mmap_sem
+
+From: Stephen Boyd <sboyd@codeaurora.org>
+
+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 <rmk+kernel@arm.linux.org.uk>
+Fixes: 6314b6796e3c "clk: Don't hold prepare_lock across debugfs creation"
+Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
+Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Michael Turquette <mturquette@linaro.org>
+[mturquette@linaro.org: removed lockdep_assert]
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..eff630f
--- /dev/null
@@ -0,0 +1,60 @@
+From c31844ffdbd4e73a16c66e9d7df8ec290ab4b159 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Date: Wed, 26 Nov 2014 15:24:13 +0100
+Subject: clk: samsung: Fix double add of syscore ops after driver rebind
+
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+
+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] [<c0014e2c>] (unwind_backtrace) from [<c0011d80>] (show_stack+0x10/0x14)
+[ 1463.083046] [<c0011d80>] (show_stack) from [<c048bb70>] (dump_stack+0x70/0xbc)
+[ 1463.090236] [<c048bb70>] (dump_stack) from [<c00233d4>] (warn_slowpath_common+0x74/0xb0)
+[ 1463.098295] [<c00233d4>] (warn_slowpath_common) from [<c00234a4>] (warn_slowpath_fmt+0x30/0x40)
+[ 1463.106962] [<c00234a4>] (warn_slowpath_fmt) from [<c020fe80>] (__list_add+0x8c/0xc0)
+[ 1463.114760] [<c020fe80>] (__list_add) from [<c0282094>] (register_syscore_ops+0x30/0x3c)
+[ 1463.122819] [<c0282094>] (register_syscore_ops) from [<c0392f20>] (exynos_audss_clk_probe+0x36c/0x460)
+[ 1463.132091] [<c0392f20>] (exynos_audss_clk_probe) from [<c0283084>] (platform_drv_probe+0x48/0xa4)
+[ 1463.141013] [<c0283084>] (platform_drv_probe) from [<c0281a14>] (driver_probe_device+0x13c/0x37c)
+[ 1463.149852] [<c0281a14>] (driver_probe_device) from [<c0280560>] (bind_store+0x90/0xe0)
+[ 1463.157822] [<c0280560>] (bind_store) from [<c027fd10>] (drv_attr_store+0x20/0x2c)
+[ 1463.165363] [<c027fd10>] (drv_attr_store) from [<c0143898>] (sysfs_kf_write+0x4c/0x50)
+[ 1463.173252] [<c0143898>] (sysfs_kf_write) from [<c0142c80>] (kernfs_fop_write+0xbc/0x198)
+[ 1463.181395] [<c0142c80>] (kernfs_fop_write) from [<c00e2be0>] (vfs_write+0xa0/0x1a8)
+[ 1463.189104] [<c00e2be0>] (vfs_write) from [<c00e2f00>] (SyS_write+0x40/0x8c)
+[ 1463.196122] [<c00e2f00>] (SyS_write) from [<c000f2a0>] (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 <k.kozlowski@samsung.com>
+Fixes: 1241ef94ccc3 ("clk: samsung: register audio subsystem clocks using common clock framework")
+Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..a078a9b
--- /dev/null
@@ -0,0 +1,47 @@
+From 45db07382a5c78b0c43b3b0002b63757fb60e873 Mon Sep 17 00:00:00 2001
+From: John David Anglin <dave.anglin@bell.net>
+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 <dave.anglin@bell.net>
+
+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 <dave.anglin@bell.net>
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..f41e32f
--- /dev/null
@@ -0,0 +1,47 @@
+From 81a89c2d891b78695aa7e4cc0d5a7427785ae078 Mon Sep 17 00:00:00 2001
+From: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
+Date: Tue, 2 Dec 2014 20:58:46 +0530
+Subject: Revert "[SCSI] mpt2sas: Remove phys on topology change."
+
+From: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
+
+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 <Sreekanth.Reddy@avagotech.com>
+Reviewed-by: Tomas Henzl <thenzl@redhat.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..8b127a6
--- /dev/null
@@ -0,0 +1,47 @@
+From 2311ce4d9c91ed63a46e18f0378f3e406e7e888e Mon Sep 17 00:00:00 2001
+From: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
+Date: Tue, 2 Dec 2014 20:58:47 +0530
+Subject: Revert "[SCSI] mpt3sas: Remove phys on topology change"
+
+From: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
+
+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 <Sreekanth.Reddy@avagotech.com>
+Reviewed-by: Tomas Henzl <thenzl@redhat.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..dc8f890
--- /dev/null
@@ -0,0 +1,32 @@
+From 198a956a11b15b564ac06d1411881e215b587408 Mon Sep 17 00:00:00 2001
+From: "Martin K. Petersen" <martin.petersen@oracle.com>
+Date: Wed, 3 Dec 2014 21:18:10 -0500
+Subject: scsi: blacklist RSOC for Microsoft iSCSI target devices
+
+From: "Martin K. Petersen" <martin.petersen@oracle.com>
+
+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 <martin.petersen@oracle.com>
+Tested-by: Mike Christie <michaelc@cs.wisc.edu>
+Reported-by: jazz@deti74.ru
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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},
index 09a6043f17abbd8870f6aa8c72529a639bdc5090..7594ac2d74c1f8e5a10c6327d7aa029914ed5843 100644 (file)
@@ -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