]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Jul 2014 18:12:05 +0000 (11:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Jul 2014 18:12:05 +0000 (11:12 -0700)
added patches:
dm-cache-metadata-do-not-allow-the-data-block-size-to-change.patch
dm-thin-metadata-do-not-allow-the-data-block-size-to-change.patch
locking-mutex-disable-optimistic-spinning-on-some-architectures.patch
pm-sleep-fix-request_firmware-error-at-resume.patch
rdma-cxgb4-initialize-the-device-status-page.patch

queue-3.15/dm-cache-metadata-do-not-allow-the-data-block-size-to-change.patch [new file with mode: 0644]
queue-3.15/dm-thin-metadata-do-not-allow-the-data-block-size-to-change.patch [new file with mode: 0644]
queue-3.15/locking-mutex-disable-optimistic-spinning-on-some-architectures.patch [new file with mode: 0644]
queue-3.15/pm-sleep-fix-request_firmware-error-at-resume.patch [new file with mode: 0644]
queue-3.15/rdma-cxgb4-initialize-the-device-status-page.patch [new file with mode: 0644]
queue-3.15/series

diff --git a/queue-3.15/dm-cache-metadata-do-not-allow-the-data-block-size-to-change.patch b/queue-3.15/dm-cache-metadata-do-not-allow-the-data-block-size-to-change.patch
new file mode 100644 (file)
index 0000000..376cf9b
--- /dev/null
@@ -0,0 +1,39 @@
+From 048e5a07f282c57815b3901d4a68a77fa131ce0a Mon Sep 17 00:00:00 2001
+From: Mike Snitzer <snitzer@redhat.com>
+Date: Mon, 14 Jul 2014 16:59:39 -0400
+Subject: dm cache metadata: do not allow the data block size to change
+
+From: Mike Snitzer <snitzer@redhat.com>
+
+commit 048e5a07f282c57815b3901d4a68a77fa131ce0a upstream.
+
+The block size for the dm-cache's data device must remained fixed for
+the life of the cache.  Disallow any attempt to change the cache's data
+block size.
+
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Acked-by: Joe Thornber <ejt@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-cache-metadata.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/md/dm-cache-metadata.c
++++ b/drivers/md/dm-cache-metadata.c
+@@ -425,6 +425,15 @@ static int __open_metadata(struct dm_cac
+       disk_super = dm_block_data(sblock);
++      /* Verify the data block size hasn't changed */
++      if (le32_to_cpu(disk_super->data_block_size) != cmd->data_block_size) {
++              DMERR("changing the data block size (from %u to %llu) is not supported",
++                    le32_to_cpu(disk_super->data_block_size),
++                    (unsigned long long)cmd->data_block_size);
++              r = -EINVAL;
++              goto bad;
++      }
++
+       r = __check_incompat_features(disk_super, cmd);
+       if (r < 0)
+               goto bad;
diff --git a/queue-3.15/dm-thin-metadata-do-not-allow-the-data-block-size-to-change.patch b/queue-3.15/dm-thin-metadata-do-not-allow-the-data-block-size-to-change.patch
new file mode 100644 (file)
index 0000000..2866dd6
--- /dev/null
@@ -0,0 +1,54 @@
+From 9aec8629ec829fc9403788cd959e05dd87988bd1 Mon Sep 17 00:00:00 2001
+From: Mike Snitzer <snitzer@redhat.com>
+Date: Mon, 14 Jul 2014 16:35:54 -0400
+Subject: dm thin metadata: do not allow the data block size to change
+
+From: Mike Snitzer <snitzer@redhat.com>
+
+commit 9aec8629ec829fc9403788cd959e05dd87988bd1 upstream.
+
+The block size for the thin-pool's data device must remained fixed for
+the life of the thin-pool.  Disallow any attempt to change the
+thin-pool's data block size.
+
+It should be noted that attempting to change the data block size via
+thin-pool table reload will be ignored as a side-effect of the thin-pool
+handover that the thin-pool target does during thin-pool table reload.
+
+Here is an example outcome of attempting to load a thin-pool table that
+reduced the thin-pool's data block size from 1024K to 512K.
+
+Before:
+kernel: device-mapper: thin: 253:4: growing the data device from 204800 to 409600 blocks
+
+After:
+kernel: device-mapper: thin metadata: changing the data block size (from 2048 to 1024) is not supported
+kernel: device-mapper: table: 253:4: thin-pool: Error creating metadata object
+kernel: device-mapper: ioctl: error adding target to table
+
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Acked-by: Joe Thornber <ejt@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-thin-metadata.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/md/dm-thin-metadata.c
++++ b/drivers/md/dm-thin-metadata.c
+@@ -613,6 +613,15 @@ static int __open_metadata(struct dm_poo
+       disk_super = dm_block_data(sblock);
++      /* Verify the data block size hasn't changed */
++      if (le32_to_cpu(disk_super->data_block_size) != pmd->data_block_size) {
++              DMERR("changing the data block size (from %u to %llu) is not supported",
++                    le32_to_cpu(disk_super->data_block_size),
++                    (unsigned long long)pmd->data_block_size);
++              r = -EINVAL;
++              goto bad_unlock_sblock;
++      }
++
+       r = __check_incompat_features(disk_super, pmd);
+       if (r < 0)
+               goto bad_unlock_sblock;
diff --git a/queue-3.15/locking-mutex-disable-optimistic-spinning-on-some-architectures.patch b/queue-3.15/locking-mutex-disable-optimistic-spinning-on-some-architectures.patch
new file mode 100644 (file)
index 0000000..3ef1a66
--- /dev/null
@@ -0,0 +1,116 @@
+From 4badad352a6bb202ec68afa7a574c0bb961e5ebc Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <peterz@infradead.org>
+Date: Fri, 6 Jun 2014 19:53:16 +0200
+Subject: locking/mutex: Disable optimistic spinning on some architectures
+
+From: Peter Zijlstra <peterz@infradead.org>
+
+commit 4badad352a6bb202ec68afa7a574c0bb961e5ebc upstream.
+
+The optimistic spin code assumes regular stores and cmpxchg() play nice;
+this is found to not be true for at least: parisc, sparc32, tile32,
+metag-lock1, arc-!llsc and hexagon.
+
+There is further wreckage, but this in particular seemed easy to
+trigger, so blacklist this.
+
+Opt in for known good archs.
+
+Signed-off-by: Peter Zijlstra <peterz@infradead.org>
+Reported-by: Mikulas Patocka <mpatocka@redhat.com>
+Cc: David Miller <davem@davemloft.net>
+Cc: Chris Metcalf <cmetcalf@tilera.com>
+Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
+Cc: Vineet Gupta <vgupta@synopsys.com>
+Cc: Jason Low <jason.low2@hp.com>
+Cc: Waiman Long <waiman.long@hp.com>
+Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
+Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
+Cc: John David Anglin <dave.anglin@bell.net>
+Cc: James Hogan <james.hogan@imgtec.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Davidlohr Bueso <davidlohr@hp.com>
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Catalin Marinas <catalin.marinas@arm.com>
+Cc: Russell King <linux@arm.linux.org.uk>
+Cc: Will Deacon <will.deacon@arm.com>
+Cc: linux-arm-kernel@lists.infradead.org
+Cc: linux-kernel@vger.kernel.org
+Cc: linuxppc-dev@lists.ozlabs.org
+Cc: sparclinux@vger.kernel.org
+Link: http://lkml.kernel.org/r/20140606175316.GV13930@laptop.programming.kicks-ass.net
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/Kconfig     |    1 +
+ arch/arm64/Kconfig   |    1 +
+ arch/powerpc/Kconfig |    1 +
+ arch/sparc/Kconfig   |    1 +
+ arch/x86/Kconfig     |    1 +
+ kernel/Kconfig.locks |    5 ++++-
+ 6 files changed, 9 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -6,6 +6,7 @@ config ARM
+       select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
+       select ARCH_HAVE_CUSTOM_GPIO_H
+       select ARCH_MIGHT_HAVE_PC_PARPORT
++      select ARCH_SUPPORTS_ATOMIC_RMW
+       select ARCH_USE_BUILTIN_BSWAP
+       select ARCH_USE_CMPXCHG_LOCKREF
+       select ARCH_WANT_IPC_PARSE_VERSION
+--- a/arch/arm64/Kconfig
++++ b/arch/arm64/Kconfig
+@@ -2,6 +2,7 @@ config ARM64
+       def_bool y
+       select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
+       select ARCH_USE_CMPXCHG_LOCKREF
++      select ARCH_SUPPORTS_ATOMIC_RMW
+       select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
+       select ARCH_WANT_OPTIONAL_GPIOLIB
+       select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
+--- a/arch/powerpc/Kconfig
++++ b/arch/powerpc/Kconfig
+@@ -145,6 +145,7 @@ config PPC
+       select HAVE_IRQ_EXIT_ON_IRQ_STACK
+       select ARCH_USE_CMPXCHG_LOCKREF if PPC64
+       select HAVE_ARCH_AUDITSYSCALL
++      select ARCH_SUPPORTS_ATOMIC_RMW
+ config GENERIC_CSUM
+       def_bool CPU_LITTLE_ENDIAN
+--- a/arch/sparc/Kconfig
++++ b/arch/sparc/Kconfig
+@@ -78,6 +78,7 @@ config SPARC64
+       select HAVE_C_RECORDMCOUNT
+       select NO_BOOTMEM
+       select HAVE_ARCH_AUDITSYSCALL
++      select ARCH_SUPPORTS_ATOMIC_RMW
+ config ARCH_DEFCONFIG
+       string
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -130,6 +130,7 @@ config X86
+       select HAVE_CC_STACKPROTECTOR
+       select GENERIC_CPU_AUTOPROBE
+       select HAVE_ARCH_AUDITSYSCALL
++      select ARCH_SUPPORTS_ATOMIC_RMW
+ config INSTRUCTION_DECODER
+       def_bool y
+--- a/kernel/Kconfig.locks
++++ b/kernel/Kconfig.locks
+@@ -220,6 +220,9 @@ config INLINE_WRITE_UNLOCK_IRQRESTORE
+ endif
++config ARCH_SUPPORTS_ATOMIC_RMW
++      bool
++
+ config MUTEX_SPIN_ON_OWNER
+       def_bool y
+-      depends on SMP && !DEBUG_MUTEXES
++      depends on SMP && !DEBUG_MUTEXES && ARCH_SUPPORTS_ATOMIC_RMW
diff --git a/queue-3.15/pm-sleep-fix-request_firmware-error-at-resume.patch b/queue-3.15/pm-sleep-fix-request_firmware-error-at-resume.patch
new file mode 100644 (file)
index 0000000..0c97ae8
--- /dev/null
@@ -0,0 +1,51 @@
+From 4320f6b1d9db4ca912c5eb6ecb328b2e090e1586 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 15 Jul 2014 08:51:27 +0200
+Subject: PM / sleep: Fix request_firmware() error at resume
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 4320f6b1d9db4ca912c5eb6ecb328b2e090e1586 upstream.
+
+The commit [247bc037: PM / Sleep: Mitigate race between the freezer
+and request_firmware()] introduced the finer state control, but it
+also leads to a new bug; for example, a bug report regarding the
+firmware loading of intel BT device at suspend/resume:
+  https://bugzilla.novell.com/show_bug.cgi?id=873790
+
+The root cause seems to be a small window between the process resume
+and the clear of usermodehelper lock.  The request_firmware() function
+checks the UMH lock and gives up when it's in UMH_DISABLE state.  This
+is for avoiding the invalid  f/w loading during suspend/resume phase.
+The problem is, however, that usermodehelper_enable() is called at the
+end of thaw_processes().  Thus, a thawed process in between can kick
+off the f/w loader code path (in this case, via btusb_setup_intel())
+even before the call of usermodehelper_enable().  Then
+usermodehelper_read_trylock() returns an error and request_firmware()
+spews WARN_ON() in the end.
+
+This oneliner patch fixes the issue just by setting to UMH_FREEZING
+state again before restarting tasks, so that the call of
+request_firmware() will be blocked until the end of this function
+instead of returning an error.
+
+Fixes: 247bc0374254 (PM / Sleep: Mitigate race between the freezer and request_firmware())
+Link: https://bugzilla.novell.com/show_bug.cgi?id=873790
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/power/process.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/power/process.c
++++ b/kernel/power/process.c
+@@ -184,6 +184,7 @@ void thaw_processes(void)
+       printk("Restarting tasks ... ");
++      __usermodehelper_set_disable_depth(UMH_FREEZING);
+       thaw_workqueues();
+       read_lock(&tasklist_lock);
diff --git a/queue-3.15/rdma-cxgb4-initialize-the-device-status-page.patch b/queue-3.15/rdma-cxgb4-initialize-the-device-status-page.patch
new file mode 100644 (file)
index 0000000..dbf795c
--- /dev/null
@@ -0,0 +1,34 @@
+From 6b54d54dea82ae214e4a45a503c4ef755a8ecee8 Mon Sep 17 00:00:00 2001
+From: Steve Wise <swise@opengridcomputing.com>
+Date: Tue, 8 Jul 2014 10:20:35 -0500
+Subject: RDMA/cxgb4: Initialize the device status page
+
+From: Steve Wise <swise@opengridcomputing.com>
+
+commit 6b54d54dea82ae214e4a45a503c4ef755a8ecee8 upstream.
+
+The status page is mapped to user processes and allows sharing the
+device state between the kernel and user processes.  This state isn't
+getting initialized and thus intermittently causes problems.  Namely,
+the user process can mistakenly think the user doorbell writes are
+disabled which causes SQ work requests to never get fetched by HW.
+
+Fixes: 05eb23893c2c ("cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes").
+Signed-off-by: Steve Wise <swise@opengridcomputing.com>
+Signed-off-by: Roland Dreier <roland@purestorage.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/infiniband/hw/cxgb4/device.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/infiniband/hw/cxgb4/device.c
++++ b/drivers/infiniband/hw/cxgb4/device.c
+@@ -654,6 +654,7 @@ static int c4iw_rdev_open(struct c4iw_rd
+               pr_err(MOD "error allocating status page\n");
+               goto err4;
+       }
++      rdev->status_page->db_off = 0;
+       return 0;
+ err4:
+       c4iw_rqtpool_destroy(rdev);
index 91aabcbb1feb65d0b0830a97147d2ef888604158..400d9d9dde9583e6825727bb426acc34c3e345d1 100644 (file)
@@ -93,3 +93,8 @@ x86-tsc-fix-cpufreq-lockup.patch
 cpufreq-move-policy-kobj-to-policy-cpu-at-resume.patch
 random-check-for-increase-of-entropy_count-because-of-signed-conversion.patch
 mtd-devices-elm-fix-elm_context_save-and-elm_context_restore-functions.patch
+dm-thin-metadata-do-not-allow-the-data-block-size-to-change.patch
+dm-cache-metadata-do-not-allow-the-data-block-size-to-change.patch
+rdma-cxgb4-initialize-the-device-status-page.patch
+pm-sleep-fix-request_firmware-error-at-resume.patch
+locking-mutex-disable-optimistic-spinning-on-some-architectures.patch