]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2014 23:52:26 +0000 (16:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2014 23:52:26 +0000 (16:52 -0700)
added patches:
acpi-rtc-fix-cmos-rtc-opregion-handler-accesses-to-wrong-addresses.patch
iommu-arm-smmu-fix-programming-of-smmu_cbn_tcr-for-stage-1.patch
iommu-fsl-fix-warning-resulting-from-adding-pci-device-twice.patch
nfsv4-fix-another-bug-in-the-close-open_downgrade-code.patch
nfsv4-nfs4_state_manager-vs.-nfs_server_remove_lists.patch

queue-3.14/acpi-rtc-fix-cmos-rtc-opregion-handler-accesses-to-wrong-addresses.patch [new file with mode: 0644]
queue-3.14/iommu-arm-smmu-fix-programming-of-smmu_cbn_tcr-for-stage-1.patch [new file with mode: 0644]
queue-3.14/iommu-fsl-fix-warning-resulting-from-adding-pci-device-twice.patch [new file with mode: 0644]
queue-3.14/nfsv4-fix-another-bug-in-the-close-open_downgrade-code.patch [new file with mode: 0644]
queue-3.14/nfsv4-nfs4_state_manager-vs.-nfs_server_remove_lists.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/acpi-rtc-fix-cmos-rtc-opregion-handler-accesses-to-wrong-addresses.patch b/queue-3.14/acpi-rtc-fix-cmos-rtc-opregion-handler-accesses-to-wrong-addresses.patch
new file mode 100644 (file)
index 0000000..8ba6ce3
--- /dev/null
@@ -0,0 +1,35 @@
+From 9389f46e9782ea5e56fbd7b2e59ba7c08f3ba86b Mon Sep 17 00:00:00 2001
+From: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>
+Date: Thu, 4 Sep 2014 15:13:39 +0800
+Subject: ACPI / RTC: Fix CMOS RTC opregion handler accesses to wrong addresses
+
+From: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>
+
+commit 9389f46e9782ea5e56fbd7b2e59ba7c08f3ba86b upstream.
+
+The value64 parameter is an u64 point that used to transfer the value
+for write to CMOS, or used to return the value that's read from CMOS.
+
+The value64 is an u64 point, so don't need get address again. It causes
+acpi_cmos_rtc_space_handler always return 0 to reader and didn't write
+expected value to CMOS.
+
+Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/acpi_cmos_rtc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/acpi/acpi_cmos_rtc.c
++++ b/drivers/acpi/acpi_cmos_rtc.c
+@@ -35,7 +35,7 @@ acpi_cmos_rtc_space_handler(u32 function
+                     void *handler_context, void *region_context)
+ {
+       int i;
+-      u8 *value = (u8 *)&value64;
++      u8 *value = (u8 *)value64;
+       if (address > 0xff || !value64)
+               return AE_BAD_PARAMETER;
diff --git a/queue-3.14/iommu-arm-smmu-fix-programming-of-smmu_cbn_tcr-for-stage-1.patch b/queue-3.14/iommu-arm-smmu-fix-programming-of-smmu_cbn_tcr-for-stage-1.patch
new file mode 100644 (file)
index 0000000..7109e3d
--- /dev/null
@@ -0,0 +1,39 @@
+From 1fc870c7efa364862c3bc792cfbdb38afea26742 Mon Sep 17 00:00:00 2001
+From: Olav Haugan <ohaugan@codeaurora.org>
+Date: Mon, 4 Aug 2014 19:01:02 +0100
+Subject: iommu/arm-smmu: fix programming of SMMU_CBn_TCR for stage 1
+
+From: Olav Haugan <ohaugan@codeaurora.org>
+
+commit 1fc870c7efa364862c3bc792cfbdb38afea26742 upstream.
+
+Stage-1 context banks do not have the SMMU_CBn_TCR[SL0] field since it
+is only applicable to stage-2 context banks.
+
+This patch ensures that we don't set the reserved TCR bits for stage-1
+translations.
+
+Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iommu/arm-smmu.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/iommu/arm-smmu.c
++++ b/drivers/iommu/arm-smmu.c
+@@ -794,8 +794,11 @@ static void arm_smmu_init_context_bank(s
+       reg |= TTBCR_EAE |
+             (TTBCR_SH_IS << TTBCR_SH0_SHIFT) |
+             (TTBCR_RGN_WBWA << TTBCR_ORGN0_SHIFT) |
+-            (TTBCR_RGN_WBWA << TTBCR_IRGN0_SHIFT) |
+-            (TTBCR_SL0_LVL_1 << TTBCR_SL0_SHIFT);
++            (TTBCR_RGN_WBWA << TTBCR_IRGN0_SHIFT);
++
++      if (!stage1)
++              reg |= (TTBCR_SL0_LVL_1 << TTBCR_SL0_SHIFT);
++
+       writel_relaxed(reg, cb_base + ARM_SMMU_CB_TTBCR);
+       /* MAIR0 (stage-1 only) */
diff --git a/queue-3.14/iommu-fsl-fix-warning-resulting-from-adding-pci-device-twice.patch b/queue-3.14/iommu-fsl-fix-warning-resulting-from-adding-pci-device-twice.patch
new file mode 100644 (file)
index 0000000..fa4b058
--- /dev/null
@@ -0,0 +1,92 @@
+From 5a9137a66b521d667236e95c307b92af532fe600 Mon Sep 17 00:00:00 2001
+From: Varun Sethi <Varun.Sethi@freescale.com>
+Date: Thu, 4 Sep 2014 17:08:45 +0530
+Subject: iommu/fsl: Fix warning resulting from adding PCI device twice
+
+From: Varun Sethi <Varun.Sethi@freescale.com>
+
+commit 5a9137a66b521d667236e95c307b92af532fe600 upstream.
+
+iommu_group_get_for_dev determines the iommu group for the PCI device and adds
+the device to the group.
+
+In the PAMU driver we were again adding the device to the same group without checking
+if the device already had an iommu group. This resulted in the following warning.
+
+sysfs: cannot create duplicate filename '/devices/ffe200000.pcie/pci0000:00/0000:00:00.0/iommu_group'
+------------[ cut here ]------------
+WARNING: at fs/sysfs/dir.c:31
+Modules linked in:
+CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.0-rc3-00002-g7505cea-dirty #126
+task: c0000001fe0a0000 ti: c0000001fe044000 task.ti: c0000001fe044000
+NIP: c00000000018879c LR: c000000000188798 CTR: c00000000001ea50
+REGS: c0000001fe047040 TRAP: 0700   Not tainted  (3.17.0-rc3-00002-g7505cea-dirty)
+MSR: 0000000080029000 <CE,EE,ME>  CR: 24ad8e22  XER: 20000000
+SOFTE: 1
+GPR00: c000000000188798 c0000001fe0472c0 c0000000009a52e0 0000000000000065
+GPR04: 0000000000000001 0000000000000000 3a30303a00000000 0000000027000000
+GPR08: 2f696f6d00000000 c0000000008d3830 c0000000009b3938 c0000000009bb3d0
+GPR12: 0000000028ad8e24 c00000000fff4000 c00000000000205c 0000000000000000
+GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+GPR20: 0000000000000000 0000000000000000 0000000000000000 c0000000008a4c70
+GPR24: c0000000007e9010 c0000001fe0140a8 ffffffffffffffef 0000000000000001
+GPR28: c0000001fe22ebb8 c0000000007e9010 c00000000090bf10 c0000001fe220000
+NIP [c00000000018879c] .sysfs_warn_dup+0x74/0xa4
+LR [c000000000188798] .sysfs_warn_dup+0x70/0xa4
+Call Trace:
+[c0000001fe0472c0] [c000000000188798] .sysfs_warn_dup+0x70/0xa4 (unreliable)
+[c0000001fe047350] [c000000000188d34] .sysfs_do_create_link_sd.clone.2+0x168/0x174
+[c0000001fe047400] [c0000000004b3cf8] .iommu_group_add_device+0x78/0x244
+[c0000001fe0474b0] [c0000000004b6964] .fsl_pamu_add_device+0x88/0x1a8
+[c0000001fe047570] [c0000000004b3960] .iommu_bus_notifier+0xdc/0x15c
+[c0000001fe047600] [c000000000059848] .notifier_call_chain+0x8c/0xe8
+[c0000001fe0476a0] [c000000000059d04] .__blocking_notifier_call_chain+0x58/0x84
+[c0000001fe047750] [c00000000036619c] .device_add+0x464/0x5c8
+[c0000001fe047820] [c000000000300ebc] .pci_device_add+0x14c/0x17c
+[c0000001fe0478c0] [c000000000300fbc] .pci_scan_single_device+0xd0/0xf4
+[c0000001fe047970] [c00000000030104c] .pci_scan_slot+0x6c/0x18c
+[c0000001fe047a10] [c00000000030226c] .pci_scan_child_bus+0x40/0x114
+[c0000001fe047ac0] [c000000000021974] .pcibios_scan_phb+0x240/0x2c8
+[c0000001fe047b70] [c00000000085a970] .pcibios_init+0x64/0xc8
+[c0000001fe047c00] [c000000000001884] .do_one_initcall+0xbc/0x224
+[c0000001fe047d00] [c000000000852d50] .kernel_init_freeable+0x14c/0x21c
+[c0000001fe047db0] [c000000000002078] .kernel_init+0x1c/0xfa4
+[c0000001fe047e30] [c000000000000884] .ret_from_kernel_thread+0x58/0xd4
+Instruction dump:
+7c7f1b79 4182001c 7fe4fb78 7f83e378 38a01000 4bffc905 60000000 7c641b78
+e87e8008 7fa5eb78 48482ff5 60000000 <0fe00000> 7fe3fb78 4bf7bd39 60000000
+
+Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
+Signed-off-by: Joerg Roedel <jroedel@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iommu/fsl_pamu_domain.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/drivers/iommu/fsl_pamu_domain.c
++++ b/drivers/iommu/fsl_pamu_domain.c
+@@ -1050,7 +1050,7 @@ static int fsl_pamu_add_device(struct de
+       struct iommu_group *group = NULL;
+       struct pci_dev *pdev;
+       const u32 *prop;
+-      int ret, len;
++      int ret = 0, len;
+       /*
+        * For platform devices we allocate a separate group for
+@@ -1073,7 +1073,13 @@ static int fsl_pamu_add_device(struct de
+       if (!group || IS_ERR(group))
+               return PTR_ERR(group);
+-      ret = iommu_group_add_device(group, dev);
++      /*
++       * Check if device has already been added to an iommu group.
++       * Group could have already been created for a PCI device in
++       * the iommu_group_get_for_dev path.
++       */
++      if (!dev->iommu_group)
++              ret = iommu_group_add_device(group, dev);
+       iommu_group_put(group);
+       return ret;
diff --git a/queue-3.14/nfsv4-fix-another-bug-in-the-close-open_downgrade-code.patch b/queue-3.14/nfsv4-fix-another-bug-in-the-close-open_downgrade-code.patch
new file mode 100644 (file)
index 0000000..45f7f69
--- /dev/null
@@ -0,0 +1,65 @@
+From cd9288ffaea4359d5cfe2b8d264911506aed26a4 Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <trond.myklebust@primarydata.com>
+Date: Thu, 18 Sep 2014 11:51:32 -0400
+Subject: NFSv4: Fix another bug in the close/open_downgrade code
+
+From: Trond Myklebust <trond.myklebust@primarydata.com>
+
+commit cd9288ffaea4359d5cfe2b8d264911506aed26a4 upstream.
+
+James Drew reports another bug whereby the NFS client is now sending
+an OPEN_DOWNGRADE in a situation where it should really have sent a
+CLOSE: the client is opening the file for O_RDWR, but then trying to
+do a downgrade to O_RDONLY, which is not allowed by the NFSv4 spec.
+
+Reported-by: James Drews <drews@engr.wisc.edu>
+Link: http://lkml.kernel.org/r/541AD7E5.8020409@engr.wisc.edu
+Fixes: aee7af356e15 (NFSv4: Fix problems with close in the presence...)
+Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfs/nfs4proc.c |   30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -2558,23 +2558,23 @@ static void nfs4_close_prepare(struct rp
+       is_rdwr = test_bit(NFS_O_RDWR_STATE, &state->flags);
+       is_rdonly = test_bit(NFS_O_RDONLY_STATE, &state->flags);
+       is_wronly = test_bit(NFS_O_WRONLY_STATE, &state->flags);
+-      /* Calculate the current open share mode */
+-      calldata->arg.fmode = 0;
+-      if (is_rdonly || is_rdwr)
+-              calldata->arg.fmode |= FMODE_READ;
+-      if (is_wronly || is_rdwr)
+-              calldata->arg.fmode |= FMODE_WRITE;
+       /* Calculate the change in open mode */
++      calldata->arg.fmode = 0;
+       if (state->n_rdwr == 0) {
+-              if (state->n_rdonly == 0) {
+-                      call_close |= is_rdonly || is_rdwr;
+-                      calldata->arg.fmode &= ~FMODE_READ;
+-              }
+-              if (state->n_wronly == 0) {
+-                      call_close |= is_wronly || is_rdwr;
+-                      calldata->arg.fmode &= ~FMODE_WRITE;
+-              }
+-      }
++              if (state->n_rdonly == 0)
++                      call_close |= is_rdonly;
++              else if (is_rdonly)
++                      calldata->arg.fmode |= FMODE_READ;
++              if (state->n_wronly == 0)
++                      call_close |= is_wronly;
++              else if (is_wronly)
++                      calldata->arg.fmode |= FMODE_WRITE;
++      } else if (is_rdwr)
++              calldata->arg.fmode |= FMODE_READ|FMODE_WRITE;
++
++      if (calldata->arg.fmode == 0)
++              call_close |= is_rdwr;
++
+       if (!nfs4_valid_open_stateid(state))
+               call_close = 0;
+       spin_unlock(&state->owner->so_lock);
diff --git a/queue-3.14/nfsv4-nfs4_state_manager-vs.-nfs_server_remove_lists.patch b/queue-3.14/nfsv4-nfs4_state_manager-vs.-nfs_server_remove_lists.patch
new file mode 100644 (file)
index 0000000..3afe4e5
--- /dev/null
@@ -0,0 +1,101 @@
+From 080af20cc945d110f9912d01cf6b66f94a375b8d Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Thu, 18 Sep 2014 09:13:17 -0400
+Subject: NFSv4: nfs4_state_manager() vs. nfs_server_remove_lists()
+
+From: Steve Dickson <steved@redhat.com>
+
+commit 080af20cc945d110f9912d01cf6b66f94a375b8d upstream.
+
+There is a race between nfs4_state_manager() and
+nfs_server_remove_lists() that happens during a nfsv3 mount.
+
+The v3 mount notices there is already a supper block so
+nfs_server_remove_lists() called which uses the nfs_client_lock
+spin lock to synchronize access to the client list.
+
+At the same time nfs4_state_manager() is running through
+the client list looking for work to do, using the same
+lock. When nfs4_state_manager() wins the race to the
+list, a v3 client pointer is found and not ignored
+properly which causes the panic.
+
+Moving some protocol checks before the state checking
+avoids the panic.
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfs/nfs4client.c |   38 ++++++++++++++++++++------------------
+ 1 file changed, 20 insertions(+), 18 deletions(-)
+
+--- a/fs/nfs/nfs4client.c
++++ b/fs/nfs/nfs4client.c
+@@ -482,6 +482,16 @@ int nfs40_walk_client_list(struct nfs_cl
+       spin_lock(&nn->nfs_client_lock);
+       list_for_each_entry(pos, &nn->nfs_client_list, cl_share_link) {
++
++              if (pos->rpc_ops != new->rpc_ops)
++                      continue;
++
++              if (pos->cl_proto != new->cl_proto)
++                      continue;
++
++              if (pos->cl_minorversion != new->cl_minorversion)
++                      continue;
++
+               /* If "pos" isn't marked ready, we can't trust the
+                * remaining fields in "pos" */
+               if (pos->cl_cons_state > NFS_CS_READY) {
+@@ -501,15 +511,6 @@ int nfs40_walk_client_list(struct nfs_cl
+               if (pos->cl_cons_state != NFS_CS_READY)
+                       continue;
+-              if (pos->rpc_ops != new->rpc_ops)
+-                      continue;
+-
+-              if (pos->cl_proto != new->cl_proto)
+-                      continue;
+-
+-              if (pos->cl_minorversion != new->cl_minorversion)
+-                      continue;
+-
+               if (pos->cl_clientid != new->cl_clientid)
+                       continue;
+@@ -615,6 +616,16 @@ int nfs41_walk_client_list(struct nfs_cl
+       spin_lock(&nn->nfs_client_lock);
+       list_for_each_entry(pos, &nn->nfs_client_list, cl_share_link) {
++
++              if (pos->rpc_ops != new->rpc_ops)
++                      continue;
++
++              if (pos->cl_proto != new->cl_proto)
++                      continue;
++
++              if (pos->cl_minorversion != new->cl_minorversion)
++                      continue;
++
+               /* If "pos" isn't marked ready, we can't trust the
+                * remaining fields in "pos", especially the client
+                * ID and serverowner fields.  Wait for CREATE_SESSION
+@@ -640,15 +651,6 @@ int nfs41_walk_client_list(struct nfs_cl
+               if (pos->cl_cons_state != NFS_CS_READY)
+                       continue;
+-              if (pos->rpc_ops != new->rpc_ops)
+-                      continue;
+-
+-              if (pos->cl_proto != new->cl_proto)
+-                      continue;
+-
+-              if (pos->cl_minorversion != new->cl_minorversion)
+-                      continue;
+-
+               if (!nfs4_match_clientids(pos, new))
+                       continue;
index b4245d13bb5239cca4ca955cbf9aea143682fd1a..ddc236cb6bacb932572e377aef74c5e5dfcc9de3 100644 (file)
@@ -100,3 +100,8 @@ usb-storage-add-quirk-for-ariston-technologies-iconnect-usb-to-scsi-adapter.patc
 usb-storage-add-quirks-for-entrega-xircom-usb-to-scsi-converters.patch
 usb-ehci-unlink-qhs-even-after-the-controller-has-stopped.patch
 usb-dwc3-omap-fix-ordering-for-runtime-pm-calls.patch
+acpi-rtc-fix-cmos-rtc-opregion-handler-accesses-to-wrong-addresses.patch
+iommu-fsl-fix-warning-resulting-from-adding-pci-device-twice.patch
+iommu-arm-smmu-fix-programming-of-smmu_cbn_tcr-for-stage-1.patch
+nfsv4-nfs4_state_manager-vs.-nfs_server_remove_lists.patch
+nfsv4-fix-another-bug-in-the-close-open_downgrade-code.patch