linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [01/27] i2c-algo-bit: Generate correct i2c address sequence for 10-bit target
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [02/27] eCryptfs: Extend array bounds for all filename chars Greg KH
                   ` (25 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Sheng-Hui J. Chu, Jean Delvare

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: "Jeffrey (Sheng-Hui) Chu" <jeffchu@broadcom.com>

commit cc6bcf7d2ec2234e7b41770185e4dc826390185e upstream.

The wrong bits were put on the wire, fix that.

This fixes kernel bug #42562.

Signed-off-by: Sheng-Hui J. Chu <jeffchu@broadcom.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/i2c/algos/i2c-algo-bit.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -471,7 +471,7 @@ static int bit_doAddress(struct i2c_adap
 
 	if (flags & I2C_M_TEN) {
 		/* a ten bit address */
-		addr = 0xf0 | ((msg->addr >> 7) & 0x03);
+		addr = 0xf0 | ((msg->addr >> 7) & 0x06);
 		bit_dbg(2, &i2c_adap->dev, "addr0: %d\n", addr);
 		/* try extended address code...*/
 		ret = try_address(i2c_adap, addr, retries);
@@ -481,7 +481,7 @@ static int bit_doAddress(struct i2c_adap
 			return -EREMOTEIO;
 		}
 		/* the remaining 8 bit address */
-		ret = i2c_outb(i2c_adap, msg->addr & 0x7f);
+		ret = i2c_outb(i2c_adap, msg->addr & 0xff);
 		if ((ret != 1) && !nak_ok) {
 			/* the chip did not ack / xmission error occurred */
 			dev_err(&i2c_adap->dev, "died at 2nd address code\n");



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [02/27] eCryptfs: Extend array bounds for all filename chars
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
  2011-12-07 16:54 ` [01/27] i2c-algo-bit: Generate correct i2c address sequence for 10-bit target Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [03/27] PCI hotplug: shpchp: dont blindly claim non-AMD 0x7450 device IDs Greg KH
                   ` (24 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Tyler Hicks

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Tyler Hicks <tyhicks@canonical.com>

commit 0f751e641a71157aa584c2a2e22fda52b52b8a56 upstream.

>From mhalcrow's original commit message:

    Characters with ASCII values greater than the size of
    filename_rev_map[] are valid filename characters.
    ecryptfs_decode_from_filename() will access kernel memory beyond
    that array, and ecryptfs_parse_tag_70_packet() will then decrypt
    those characters. The attacker, using the FNEK of the crafted file,
    can then re-encrypt the characters to reveal the kernel memory past
    the end of the filename_rev_map[] array. I expect low security
    impact since this array is statically allocated in the text area,
    and the amount of memory past the array that is accessible is
    limited by the largest possible ASCII filename character.

This patch solves the issue reported by mhalcrow but with an
implementation suggested by Linus to simply extend the length of
filename_rev_map[] to 256. Characters greater than 0x7A are mapped to
0x00, which is how invalid characters less than 0x7A were previously
being handled.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Michael Halcrow <mhalcrow@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/ecryptfs/crypto.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -1934,7 +1934,7 @@ static unsigned char *portable_filename_
 
 /* We could either offset on every reverse map or just pad some 0x00's
  * at the front here */
-static const unsigned char filename_rev_map[] = {
+static const unsigned char filename_rev_map[256] = {
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 7 */
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 15 */
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 23 */
@@ -1950,7 +1950,7 @@ static const unsigned char filename_rev_
 	0x00, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, /* 103 */
 	0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, /* 111 */
 	0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, /* 119 */
-	0x3D, 0x3E, 0x3F
+	0x3D, 0x3E, 0x3F /* 123 - 255 initialized to 0x00 */
 };
 
 /**



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [03/27] PCI hotplug: shpchp: dont blindly claim non-AMD 0x7450 device IDs
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
  2011-12-07 16:54 ` [01/27] i2c-algo-bit: Generate correct i2c address sequence for 10-bit target Greg KH
  2011-12-07 16:54 ` [02/27] eCryptfs: Extend array bounds for all filename chars Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [04/27] ARM: 7161/1: errata: no automatic store buffer drain Greg KH
                   ` (23 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Joerg Roedel, Bjorn Helgaas, Jesse Barnes

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Bjorn Helgaas <bhelgaas@google.com>

commit 4cac2eb158c6da0c761689345c6cc5df788a6292 upstream.

Previously we claimed device ID 0x7450, regardless of the vendor, which is
clearly wrong.  Now we'll claim that device ID only for AMD.

I suspect this was just a typo in the original code, but it's possible this
change will break shpchp on non-7450 AMD bridges.  If so, we'll have to fix
them as we find them.

Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638863
Reported-by: Ralf Jung <ralfjung-e@gmx.de>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/pci/hotplug/shpchp_core.c |    4 ++--
 drivers/pci/hotplug/shpchp_hpc.c  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -312,8 +312,8 @@ static int get_cur_bus_speed (struct hot
 
 static int is_shpc_capable(struct pci_dev *dev)
 {
-	if ((dev->vendor == PCI_VENDOR_ID_AMD) || (dev->device ==
-						PCI_DEVICE_ID_AMD_GOLAM_7450))
+	if (dev->vendor == PCI_VENDOR_ID_AMD &&
+	    dev->device == PCI_DEVICE_ID_AMD_GOLAM_7450)
 		return 1;
 	if (!pci_find_capability(dev, PCI_CAP_ID_SHPC))
 		return 0;
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -951,8 +951,8 @@ int shpc_init(struct controller *ctrl, s
 	ctrl->pci_dev = pdev;  /* pci_dev of the P2P bridge */
 	ctrl_dbg(ctrl, "Hotplug Controller:\n");
 
-	if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device ==
-				PCI_DEVICE_ID_AMD_GOLAM_7450)) {
+	if (pdev->vendor == PCI_VENDOR_ID_AMD &&
+	    pdev->device == PCI_DEVICE_ID_AMD_GOLAM_7450) {
 		/* amd shpc driver doesn't use Base Offset; assume 0 */
 		ctrl->mmio_base = pci_resource_start(pdev, 0);
 		ctrl->mmio_size = pci_resource_len(pdev, 0);



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [04/27] ARM: 7161/1: errata: no automatic store buffer drain
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (2 preceding siblings ...)
  2011-12-07 16:54 ` [03/27] PCI hotplug: shpchp: dont blindly claim non-AMD 0x7450 device IDs Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [05/27] ALSA: lx6464es - fix device communication via command bus Greg KH
                   ` (22 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Catalin Marinas, Will Deacon, Russell King

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Will Deacon <will.deacon@arm.com>

commit 11ed0ba1754841316d4095478944300acf19acc3 upstream.

This patch implements a workaround for PL310 erratum 769419. On
revisions of the PL310 prior to r3p2, the Store Buffer does not
automatically drain. This can cause normal, non-cacheable writes to be
retained when the memory system is idle, leading to suboptimal I/O
performance for drivers using coherent DMA.

This patch adds an optional wmb() call to the cpu_idle loop. On systems
with an outer cache, this causes an explicit flush of the store buffer.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/arm/Kconfig          |   12 ++++++++++++
 arch/arm/kernel/process.c |    3 +++
 2 files changed, 15 insertions(+)

--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1332,6 +1332,18 @@ config ATAGS_PROC
 	  Should the atags used to boot the kernel be exported in an "atags"
 	  file in procfs. Useful with kexec.
 
+config PL310_ERRATA_769419
+	bool "PL310 errata: no automatic Store Buffer drain"
+	depends on CACHE_L2X0
+	help
+	  On revisions of the PL310 prior to r3p2, the Store Buffer does
+	  not automatically drain. This can cause normal, non-cacheable
+	  writes to be retained when the memory system is idle, leading
+	  to suboptimal I/O performance for drivers using coherent DMA.
+	  This option adds a write barrier to the cpu_idle loop so that,
+	  on systems with an outer cache, the store buffer is drained
+	  explicitly.
+
 endmenu
 
 menu "CPU Power Management"
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -156,6 +156,9 @@ void cpu_idle(void)
 #endif
 
 			local_irq_disable();
+#ifdef CONFIG_PL310_ERRATA_769419
+			wmb();
+#endif
 			if (hlt_counter) {
 				local_irq_enable();
 				cpu_relax();



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [05/27] ALSA: lx6464es - fix device communication via command bus
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (3 preceding siblings ...)
  2011-12-07 16:54 ` [04/27] ARM: 7161/1: errata: no automatic store buffer drain Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 17:13   ` Tim Blechmann
  2011-12-07 16:54 ` [06/27] SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared Greg KH
                   ` (21 subsequent siblings)
  26 siblings, 1 reply; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Tim Blechmann, Takashi Iwai

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Tim Blechmann <tim@klingt.org>

commit a29878553a9a7b4c06f93c7e383527cf014d4ceb upstream.

commit 6175ddf06b6172046a329e3abfd9c901a43efd2e optimized the mem*io
functions that have been used to send commands to the device. these
optimizations somehow corrupted the communication with the lx6464es,
that resulted the device to be unusable with kernels after 2.6.33.

this patch emulates the memcpy_*_io functions via a loop to avoid these
problems.

Signed-off-by: Tim Blechmann <tim@klingt.org>
LKML-Reference: <4ECB5257.4040600@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/pci/lx6464es/lx_core.c |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -80,8 +80,12 @@ unsigned long lx_dsp_reg_read(struct lx6
 
 void lx_dsp_reg_readbuf(struct lx6464es *chip, int port, u32 *data, u32 len)
 {
-	void __iomem *address = lx_dsp_register(chip, port);
-	memcpy_fromio(data, address, len*sizeof(u32));
+	u32 __iomem *address = lx_dsp_register(chip, port);
+	int i;
+
+	/* we cannot use memcpy_fromio */
+	for (i = 0; i != len; ++i)
+		data[i] = ioread32(address + i);
 }
 
 
@@ -94,8 +98,12 @@ void lx_dsp_reg_write(struct lx6464es *c
 void lx_dsp_reg_writebuf(struct lx6464es *chip, int port, const u32 *data,
 			 u32 len)
 {
-	void __iomem *address = lx_dsp_register(chip, port);
-	memcpy_toio(address, data, len*sizeof(u32));
+	u32 __iomem *address = lx_dsp_register(chip, port);
+	int i;
+
+	/* we cannot use memcpy_to */
+	for (i = 0; i != len; ++i)
+		iowrite32(data[i], address + i);
 }
 
 



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [06/27] SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (4 preceding siblings ...)
  2011-12-07 16:54 ` [05/27] ALSA: lx6464es - fix device communication via command bus Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [07/27] timekeeping: add arch_offset hook to ktime_get functions Greg KH
                   ` (20 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Trond Myklebust

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Trond Myklebust <Trond.Myklebust@netapp.com>

commit 24ca9a847791fd53d9b217330b15f3c285827a18 upstream.

By returning '0' instead of 'EAGAIN' when the tests in xs_nospace() fail
to find evidence of socket congestion, we are making the RPC engine believe
that the message was incorrectly sent and so it disconnects the socket
instead of just retrying.

The bug appears to have been introduced by commit
5e3771ce2d6a69e10fcc870cdf226d121d868491 (SUNRPC: Ensure that xs_nospace
return values are propagated).

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/sunrpc/xprtsock.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -493,7 +493,7 @@ static int xs_nospace(struct rpc_task *t
 	struct rpc_rqst *req = task->tk_rqstp;
 	struct rpc_xprt *xprt = req->rq_xprt;
 	struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
-	int ret = 0;
+	int ret = -EAGAIN;
 
 	dprintk("RPC: %5u xmit incomplete (%u left of %u)\n",
 			task->tk_pid, req->rq_slen - req->rq_bytes_sent,
@@ -505,7 +505,6 @@ static int xs_nospace(struct rpc_task *t
 	/* Don't race with disconnect */
 	if (xprt_connected(xprt)) {
 		if (test_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags)) {
-			ret = -EAGAIN;
 			/*
 			 * Notify TCP that we're limited by the application
 			 * window size



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [07/27] timekeeping: add arch_offset hook to ktime_get functions
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (5 preceding siblings ...)
  2011-12-07 16:54 ` [06/27] SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [08/27] p54spi: Add missing spin_lock_init Greg KH
                   ` (19 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Hector Palacios, John Stultz

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Hector Palacios <hector.palacios@digi.com>

commit d004e024058a0eaca097513ce62cbcf978913e0a upstream.

ktime_get and ktime_get_ts were calling timekeeping_get_ns()
but later they were not calling arch_gettimeoffset() so architectures
using this mechanism returned 0 ns when calling these functions.

This happened for example when running Busybox's ping which calls
syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts) which eventually
calls ktime_get. As a result the returned ping travel time was zero.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/time/timekeeping.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -264,6 +264,8 @@ ktime_t ktime_get(void)
 		secs = xtime.tv_sec + wall_to_monotonic.tv_sec;
 		nsecs = xtime.tv_nsec + wall_to_monotonic.tv_nsec;
 		nsecs += timekeeping_get_ns();
+		/* If arch requires, add in gettimeoffset() */
+		nsecs += arch_gettimeoffset();
 
 	} while (read_seqretry(&xtime_lock, seq));
 	/*
@@ -295,6 +297,8 @@ void ktime_get_ts(struct timespec *ts)
 		*ts = xtime;
 		tomono = wall_to_monotonic;
 		nsecs = timekeeping_get_ns();
+		/* If arch requires, add in gettimeoffset() */
+		nsecs += arch_gettimeoffset();
 
 	} while (read_seqretry(&xtime_lock, seq));
 



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [08/27] p54spi: Add missing spin_lock_init
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (6 preceding siblings ...)
  2011-12-07 16:54 ` [07/27] timekeeping: add arch_offset hook to ktime_get functions Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [09/27] p54spi: Fix workqueue deadlock Greg KH
                   ` (18 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Michael Buesch, Christian Lamparter,
	John W. Linville

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: =?UTF-8?q?Michael=20B=C3=BCsch?= <m@bues.ch>

commit 32d3a3922d617a5a685a5e2d24b20d0e88f192a9 upstream.

The tx_lock is not initialized properly. Add spin_lock_init().

Signed-off-by: Michael Buesch <m@bues.ch>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/p54/p54spi.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -650,6 +650,7 @@ static int __devinit p54spi_probe(struct
 	init_completion(&priv->fw_comp);
 	INIT_LIST_HEAD(&priv->tx_pending);
 	mutex_init(&priv->mutex);
+	spin_lock_init(&priv->tx_lock);
 	SET_IEEE80211_DEV(hw, &spi->dev);
 	priv->common.open = p54spi_op_start;
 	priv->common.stop = p54spi_op_stop;



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [09/27] p54spi: Fix workqueue deadlock
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (7 preceding siblings ...)
  2011-12-07 16:54 ` [08/27] p54spi: Add missing spin_lock_init Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [10/27] nl80211: fix MAC address validation Greg KH
                   ` (17 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Michael Buesch, Christian Lamparter,
	John W. Linville

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: =?UTF-8?q?Michael=20B=C3=BCsch?= <m@bues.ch>

commit 2d1618170eb493d18f66f2ac03775409a6fb97c6 upstream.

priv->work must not be synced while priv->mutex is locked, because
the mutex is taken in the work handler.
Move cancel_work_sync down to after the device shutdown code.
This is safe, because the work handler checks fw_state and bails out
early in case of a race.

Signed-off-by: Michael Buesch <m@bues.ch>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/p54/p54spi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -581,8 +581,6 @@ static void p54spi_op_stop(struct ieee80
 
 	WARN_ON(priv->fw_state != FW_STATE_READY);
 
-	cancel_work_sync(&priv->work);
-
 	p54spi_power_off(priv);
 	spin_lock_irqsave(&priv->tx_lock, flags);
 	INIT_LIST_HEAD(&priv->tx_pending);
@@ -590,6 +588,8 @@ static void p54spi_op_stop(struct ieee80
 
 	priv->fw_state = FW_STATE_OFF;
 	mutex_unlock(&priv->mutex);
+
+	cancel_work_sync(&priv->work);
 }
 
 static int __devinit p54spi_probe(struct spi_device *spi)



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [10/27] nl80211: fix MAC address validation
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (8 preceding siblings ...)
  2011-12-07 16:54 ` [09/27] p54spi: Fix workqueue deadlock Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [11/27] gro: reset vlan_tci on reuse Greg KH
                   ` (16 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Eliad Peller, John W. Linville

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Eliad Peller <eliad@wizery.com>

commit e007b857e88097c96c45620bf3b04a4e309053d1 upstream.

MAC addresses have a fixed length. The current
policy allows passing < ETH_ALEN bytes, which
might result in reading beyond the buffer.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/wireless/nl80211.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -74,8 +74,8 @@ static struct nla_policy nl80211_policy[
 	[NL80211_ATTR_IFINDEX] = { .type = NLA_U32 },
 	[NL80211_ATTR_IFNAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ-1 },
 
-	[NL80211_ATTR_MAC] = { .type = NLA_BINARY, .len = ETH_ALEN },
-	[NL80211_ATTR_PREV_BSSID] = { .type = NLA_BINARY, .len = ETH_ALEN },
+	[NL80211_ATTR_MAC] = { .len = ETH_ALEN },
+	[NL80211_ATTR_PREV_BSSID] = { .len = ETH_ALEN },
 
 	[NL80211_ATTR_KEY] = { .type = NLA_NESTED, },
 	[NL80211_ATTR_KEY_DATA] = { .type = NLA_BINARY,



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [11/27] gro: reset vlan_tci on reuse
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (9 preceding siblings ...)
  2011-12-07 16:54 ` [10/27] nl80211: fix MAC address validation Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [12/27] staging: usbip: bugfix for deadlock Greg KH
                   ` (15 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable, davem
  Cc: torvalds, akpm, alan, netdev, Jesse Gross, Benjamin Poirier

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

This one liner is part of upstream
commit 3701e51382a026cba10c60b03efabe534fba4ca4
Author: Jesse Gross <jesse@nicira.com>

    vlan: Centralize handling of hardware acceleration.

The bulk of that commit is a rework of the hardware assisted vlan tagging
driver interface, and as such doesn't classify for -stable inclusion. The fix
that is needed is a part of that commit but can work independently of the
rest.

This patch can avoid panics on the 2.6.32.y -stable kernels and is in the same
spirit as mainline commits
66c46d7 gro: Reset dev pointer on reuse
6d152e2 gro: reset skb_iif on reuse
which are already in -stable.

For drivers using the vlan_gro_frags() interface, a packet with an invalid tci
leads to GRO_DROP and napi_reuse_skb(). The skb has to be sanitized before
being reused or we may send an skb with an invalid vlan_tci field up the stack
where it is not expected.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Cc: Jesse Gross <jesse@nicira.com>
Acked-by: David S. Miller <davem@davemloft.net>

---
 net/core/dev.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2614,6 +2614,7 @@ void napi_reuse_skb(struct napi_struct *
 {
 	__skb_pull(skb, skb_headlen(skb));
 	skb_reserve(skb, NET_IP_ALIGN - skb_headroom(skb));
+	skb->vlan_tci = 0;
 	skb->dev = napi->dev;
 	skb->iif = 0;
 



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [12/27] staging: usbip: bugfix for deadlock
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (10 preceding siblings ...)
  2011-12-07 16:54 ` [11/27] gro: reset vlan_tci on reuse Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [13/27] staging: comedi: fix oops for USB DAQ devices Greg KH
                   ` (14 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Bart Westgeest

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Bart Westgeest <bart@elbrys.com>

commit 438957f8d4a84daa7fa5be6978ad5897a2e9e5e5 upstream.

Interrupts must be disabled prior to calling usb_hcd_unlink_urb_from_ep.
If interrupts are not disabled, it can potentially lead to a deadlock.
The deadlock is readily reproduceable on a slower (ARM based) device
such as the TI Pandaboard.

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/usbip/vhci_rx.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--- a/drivers/staging/usbip/vhci_rx.c
+++ b/drivers/staging/usbip/vhci_rx.c
@@ -67,6 +67,7 @@ static void vhci_recv_ret_submit(struct
 {
 	struct usbip_device *ud = &vdev->ud;
 	struct urb *urb;
+	unsigned long flags;
 
 	spin_lock(&vdev->priv_lock);
 
@@ -107,9 +108,9 @@ static void vhci_recv_ret_submit(struct
 
 	usbip_dbg_vhci_rx("now giveback urb %p\n", urb);
 
-	spin_lock(&the_controller->lock);
+	spin_lock_irqsave(&the_controller->lock, flags);
 	usb_hcd_unlink_urb_from_ep(vhci_to_hcd(the_controller), urb);
-	spin_unlock(&the_controller->lock);
+	spin_unlock_irqrestore(&the_controller->lock, flags);
 
 	usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb, urb->status);
 
@@ -150,6 +151,7 @@ static void vhci_recv_ret_unlink(struct
 {
 	struct vhci_unlink *unlink;
 	struct urb *urb;
+	unsigned long flags;
 
 	usbip_dump_header(pdu);
 
@@ -181,9 +183,9 @@ static void vhci_recv_ret_unlink(struct
 		urb->status = pdu->u.ret_unlink.status;
 		usbip_uinfo("%d\n", urb->status);
 
-		spin_lock(&the_controller->lock);
+		spin_lock_irqsave(&the_controller->lock, flags);
 		usb_hcd_unlink_urb_from_ep(vhci_to_hcd(the_controller), urb);
-		spin_unlock(&the_controller->lock);
+		spin_unlock_irqrestore(&the_controller->lock, flags);
 
 		usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb,
 								urb->status);



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [13/27] staging: comedi: fix oops for USB DAQ devices.
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (11 preceding siblings ...)
  2011-12-07 16:54 ` [12/27] staging: usbip: bugfix for deadlock Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [14/27] Staging: comedi: fix signal handling in read and write Greg KH
                   ` (13 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Bernd Porr

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Bernd Porr <berndporr@f2s.com>

commit 3ffab428f40849ed5f21bcfd7285bdef7902f9ca upstream.

This fixes kernel oops when an USB DAQ device is plugged out while it's
communicating with the userspace software.

Signed-off-by: Bernd Porr <berndporr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/comedi/comedi_fops.c |   73 +++++++++++++++++++++++++----------
 1 file changed, 54 insertions(+), 19 deletions(-)

--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -1396,9 +1396,6 @@ static struct vm_operations_struct comed
 static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
 {
 	const unsigned minor = iminor(file->f_dentry->d_inode);
-	struct comedi_device_file_info *dev_file_info =
-	    comedi_get_device_file_info(minor);
-	struct comedi_device *dev = dev_file_info->device;
 	struct comedi_async *async = NULL;
 	unsigned long start = vma->vm_start;
 	unsigned long size;
@@ -1406,6 +1403,15 @@ static int comedi_mmap(struct file *file
 	int i;
 	int retval;
 	struct comedi_subdevice *s;
+	struct comedi_device_file_info *dev_file_info;
+	struct comedi_device *dev;
+
+	dev_file_info = comedi_get_device_file_info(minor);
+	if (dev_file_info == NULL)
+	        return -ENODEV;
+	dev = dev_file_info->device;
+	if (dev == NULL)
+	        return -ENODEV;
 
 	mutex_lock(&dev->mutex);
 	if (!dev->attached) {
@@ -1472,11 +1478,17 @@ static unsigned int comedi_poll(struct f
 {
 	unsigned int mask = 0;
 	const unsigned minor = iminor(file->f_dentry->d_inode);
-	struct comedi_device_file_info *dev_file_info =
-	    comedi_get_device_file_info(minor);
-	struct comedi_device *dev = dev_file_info->device;
 	struct comedi_subdevice *read_subdev;
 	struct comedi_subdevice *write_subdev;
+	struct comedi_device_file_info *dev_file_info;
+	struct comedi_device *dev;
+	dev_file_info = comedi_get_device_file_info(minor);
+
+	if (dev_file_info == NULL)
+	        return -ENODEV;
+	dev = dev_file_info->device;
+	if (dev == NULL)
+	        return -ENODEV;
 
 	mutex_lock(&dev->mutex);
 	if (!dev->attached) {
@@ -1522,9 +1534,15 @@ static ssize_t comedi_write(struct file
 	int n, m, count = 0, retval = 0;
 	DECLARE_WAITQUEUE(wait, current);
 	const unsigned minor = iminor(file->f_dentry->d_inode);
-	struct comedi_device_file_info *dev_file_info =
-	    comedi_get_device_file_info(minor);
-	struct comedi_device *dev = dev_file_info->device;
+	struct comedi_device_file_info *dev_file_info;
+	struct comedi_device *dev;
+	dev_file_info = comedi_get_device_file_info(minor);
+
+	if (dev_file_info == NULL)
+	        return -ENODEV;
+	dev = dev_file_info->device;
+	if (dev == NULL)
+	        return -ENODEV;
 
 	if (!dev->attached) {
 		DPRINTK("no driver configured on comedi%i\n", dev->minor);
@@ -1624,9 +1642,15 @@ static ssize_t comedi_read(struct file *
 	int n, m, count = 0, retval = 0;
 	DECLARE_WAITQUEUE(wait, current);
 	const unsigned minor = iminor(file->f_dentry->d_inode);
-	struct comedi_device_file_info *dev_file_info =
-	    comedi_get_device_file_info(minor);
-	struct comedi_device *dev = dev_file_info->device;
+	struct comedi_device_file_info *dev_file_info;
+	struct comedi_device *dev;
+	dev_file_info = comedi_get_device_file_info(minor);
+
+	if (dev_file_info == NULL)
+	        return -ENODEV;
+	dev = dev_file_info->device;
+	if (dev == NULL)
+	        return -ENODEV;
 
 	if (!dev->attached) {
 		DPRINTK("no driver configured on comedi%i\n", dev->minor);
@@ -1819,11 +1843,17 @@ ok:
 static int comedi_close(struct inode *inode, struct file *file)
 {
 	const unsigned minor = iminor(inode);
-	struct comedi_device_file_info *dev_file_info =
-	    comedi_get_device_file_info(minor);
-	struct comedi_device *dev = dev_file_info->device;
 	struct comedi_subdevice *s = NULL;
 	int i;
+	struct comedi_device_file_info *dev_file_info;
+	struct comedi_device *dev;
+	dev_file_info = comedi_get_device_file_info(minor);
+
+	if (dev_file_info == NULL)
+	        return -ENODEV;
+	dev = dev_file_info->device;
+	if (dev == NULL)
+	        return -ENODEV;
 
 	mutex_lock(&dev->mutex);
 
@@ -1857,10 +1887,15 @@ static int comedi_close(struct inode *in
 static int comedi_fasync(int fd, struct file *file, int on)
 {
 	const unsigned minor = iminor(file->f_dentry->d_inode);
-	struct comedi_device_file_info *dev_file_info =
-	    comedi_get_device_file_info(minor);
-
-	struct comedi_device *dev = dev_file_info->device;
+	struct comedi_device_file_info *dev_file_info;
+	struct comedi_device *dev;
+	dev_file_info = comedi_get_device_file_info(minor);
+
+	if (dev_file_info == NULL)
+	        return -ENODEV;
+	dev = dev_file_info->device;
+	if (dev == NULL)
+	        return -ENODEV;
 
 	return fasync_helper(fd, file, on, &dev->async_queue);
 }



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [14/27] Staging: comedi: fix signal handling in read and write
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (12 preceding siblings ...)
  2011-12-07 16:54 ` [13/27] staging: comedi: fix oops for USB DAQ devices Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [15/27] USB: whci-hcd: fix endian conversion in qset_clear() Greg KH
                   ` (12 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Alessandro Rubini, Federico Vaga

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Federico Vaga <federico.vaga@gmail.com>

commit 6a9ce6b654e491981f6ef7e214cbd4f63e033848 upstream.

After sleeping on a wait queue, signal_pending(current) should be
checked (not before sleeping).

Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/comedi/comedi_fops.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -1599,11 +1599,11 @@ static ssize_t comedi_write(struct file
 				retval = -EAGAIN;
 				break;
 			}
+			schedule();
 			if (signal_pending(current)) {
 				retval = -ERESTARTSYS;
 				break;
 			}
-			schedule();
 			if (!s->busy)
 				break;
 			if (s->busy != file) {
@@ -1706,11 +1706,11 @@ static ssize_t comedi_read(struct file *
 				retval = -EAGAIN;
 				break;
 			}
+			schedule();
 			if (signal_pending(current)) {
 				retval = -ERESTARTSYS;
 				break;
 			}
-			schedule();
 			if (!s->busy) {
 				retval = 0;
 				break;



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [15/27] USB: whci-hcd: fix endian conversion in qset_clear()
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (13 preceding siblings ...)
  2011-12-07 16:54 ` [14/27] Staging: comedi: fix signal handling in read and write Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [16/27] usb: ftdi_sio: add PID for Propox ISPcable III Greg KH
                   ` (11 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Dan Carpenter

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <dan.carpenter@oracle.com>

commit 8746c83d538cab273d335acb2be226d096f4a5af upstream.

qset->qh.link is an __le64 field and we should be using cpu_to_le64()
to fill it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/host/whci/qset.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/host/whci/qset.c
+++ b/drivers/usb/host/whci/qset.c
@@ -104,7 +104,7 @@ void qset_clear(struct whc *whc, struct
 {
 	qset->td_start = qset->td_end = qset->ntds = 0;
 
-	qset->qh.link = cpu_to_le32(QH_LINK_NTDS(8) | QH_LINK_T);
+	qset->qh.link = cpu_to_le64(QH_LINK_NTDS(8) | QH_LINK_T);
 	qset->qh.status = qset->qh.status & QH_STATUS_SEQ_MASK;
 	qset->qh.err_count = 0;
 	qset->qh.scratch[0] = 0;



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [16/27] usb: ftdi_sio: add PID for Propox ISPcable III
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (14 preceding siblings ...)
  2011-12-07 16:54 ` [15/27] USB: whci-hcd: fix endian conversion in qset_clear() Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [17/27] usb: option: add SIMCom SIM5218 Greg KH
                   ` (10 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Marcin Kościelnicki

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Marcin Kościelnicki <koriakin@0x04.net>

commit 307369b0ca06b27b511b61714e335ddfccf19c4f upstream.

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c     |    1 +
 drivers/usb/serial/ftdi_sio_ids.h |    1 +
 2 files changed, 2 insertions(+)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -739,6 +739,7 @@ static struct usb_device_id id_table_com
 	{ USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_ELSTER_UNICOM_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_PROPOX_JTAGCABLEII_PID) },
+	{ USB_DEVICE(FTDI_VID, FTDI_PROPOX_ISPCABLEIII_PID) },
 	{ USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID),
 		.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
 	{ USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID),
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -111,6 +111,7 @@
 
 /* Propox devices */
 #define FTDI_PROPOX_JTAGCABLEII_PID	0xD738
+#define FTDI_PROPOX_ISPCABLEIII_PID	0xD739
 
 /* Lenz LI-USB Computer Interface. */
 #define FTDI_LENZ_LIUSB_PID	0xD780



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [17/27] usb: option: add SIMCom SIM5218
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (15 preceding siblings ...)
  2011-12-07 16:54 ` [16/27] usb: ftdi_sio: add PID for Propox ISPcable III Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [18/27] USB: usb-storage: unusual_devs entry for Kingston DT 101 G2 Greg KH
                   ` (9 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Veli-Pekka Peltola

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>

commit ec0cd94d881ca89cc9fb61d00d0f4b2b52e605b3 upstream.

Tested with SIM5218EVB-KIT evaluation kit.

Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/option.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -578,6 +578,7 @@ static struct usb_device_id option_ids[]
 	{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
+	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
 	{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
 	{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },
 	{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [18/27] USB: usb-storage: unusual_devs entry for Kingston DT 101 G2
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (16 preceding siblings ...)
  2011-12-07 16:54 ` [17/27] usb: option: add SIMCom SIM5218 Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [19/27] SCSI: scsi_lib: fix potential NULL dereference Greg KH
                   ` (8 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Qinglin Ye

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Qinglin Ye <yestyle@gmail.com>

commit cec28a5428793b6bc64e56687fb239759d6da74e upstream.

Kingston DT 101 G2 replies a wrong tag while transporting, add an
unusal_devs entry to ignore the tag validation.

Signed-off-by: Qinglin Ye <yestyle@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/storage/unusual_devs.h |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1857,6 +1857,13 @@ UNUSUAL_DEV(  0x1370, 0x6828, 0x0110, 0x
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_IGNORE_RESIDUE ),
 
+/* Reported by Qinglin Ye <yestyle@gmail.com> */
+UNUSUAL_DEV(  0x13fe, 0x3600, 0x0100, 0x0100,
+		"Kingston",
+		"DT 101 G2",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		US_FL_BULK_IGNORE_TAG ),
+
 /* Reported by Francesco Foresti <frafore@tiscali.it> */
 UNUSUAL_DEV(  0x14cd, 0x6600, 0x0201, 0x0201,
 		"Super Top",



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [19/27] SCSI: scsi_lib: fix potential NULL dereference
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (17 preceding siblings ...)
  2011-12-07 16:54 ` [18/27] USB: usb-storage: unusual_devs entry for Kingston DT 101 G2 Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [20/27] SCSI: Silencing killing requests for dead queue Greg KH
                   ` (7 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Jiri Slaby, James Bottomley

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Jiri Slaby <jirislaby@gmail.com>

commit 03b147083a2f9a2a3fbbd2505fa88ffa3c6ab194 upstream.

Stanse found a potential NULL dereference in scsi_kill_request.

Instead of triggering BUG() in 'if (unlikely(cmd == NULL))' branch,
the kernel will Oops earlier on cmd dereference.

Move the dereferences after the if.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/scsi_lib.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1370,9 +1370,9 @@ static int scsi_lld_busy(struct request_
 static void scsi_kill_request(struct request *req, struct request_queue *q)
 {
 	struct scsi_cmnd *cmd = req->special;
-	struct scsi_device *sdev = cmd->device;
-	struct scsi_target *starget = scsi_target(sdev);
-	struct Scsi_Host *shost = sdev->host;
+	struct scsi_device *sdev;
+	struct scsi_target *starget;
+	struct Scsi_Host *shost;
 
 	blk_start_request(req);
 
@@ -1382,6 +1382,9 @@ static void scsi_kill_request(struct req
 		BUG();
 	}
 
+	sdev = cmd->device;
+	starget = scsi_target(sdev);
+	shost = sdev->host;
 	scsi_init_cmd_errh(cmd);
 	cmd->result = DID_NO_CONNECT << 16;
 	atomic_inc(&cmd->device->iorequest_cnt);



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [20/27] SCSI: Silencing killing requests for dead queue
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (18 preceding siblings ...)
  2011-12-07 16:54 ` [19/27] SCSI: scsi_lib: fix potential NULL dereference Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [21/27] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch Greg KH
                   ` (6 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Hannes Reinecke, James Bottomley

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Hannes Reinecke <hare@suse.de>

commit 745718132c3c7cac98a622b610e239dcd5217f71 upstream.

When we tear down a device we try to flush all outstanding
commands in scsi_free_queue(). However the check in
scsi_request_fn() is imperfect as it only signals that
we _might start_ aborting commands, not that we've actually
aborted some.
So move the printk inside the scsi_kill_request function,
this will also give us a hint about which commands are aborted.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/scsi_lib.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1382,6 +1382,8 @@ static void scsi_kill_request(struct req
 		BUG();
 	}
 
+	scmd_printk(KERN_INFO, cmd, "killing request\n");
+
 	sdev = cmd->device;
 	starget = scsi_target(sdev);
 	shost = sdev->host;
@@ -1468,7 +1470,6 @@ static void scsi_request_fn(struct reque
 	struct request *req;
 
 	if (!sdev) {
-		printk("scsi: killing requests for dead queue\n");
 		while ((req = blk_peek_request(q)) != NULL)
 			scsi_kill_request(req, q);
 		return;



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [21/27] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (19 preceding siblings ...)
  2011-12-07 16:54 ` [20/27] SCSI: Silencing killing requests for dead queue Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [22/27] sched, x86: Avoid unnecessary overflow in sched_clock Greg KH
                   ` (5 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Pavel Shilovsky, Steve French, linux-cifs,
	Steve French, Pavel Shilovsky, Suresh Jayaraman

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Suresh Jayaraman <sjayaraman@suse.com>

The stable release 2.6.32.32 added the upstream commit
12fed00de963433128b5366a21a55808fab2f756. However, one of the hunks of
the original patch seems missing from the stable backport which can be
found here:
   http://permalink.gmane.org/gmane.linux.kernel.stable/5676

This hunk corresponds to the change in is_valid_oplock_break() at
fs/cifs/misc.c.

This patch backports the missing hunk and is against
linux-2.6.32.y stable kernel.


Cc: Steve French <sfrench@us.ibm.com>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/cifs/misc.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -584,6 +584,9 @@ is_valid_oplock_break(struct smb_hdr *bu
 				pCifsInode->clientCanCacheAll = false;
 				if (pSMB->OplockLevel == 0)
 					pCifsInode->clientCanCacheRead = false;
+				else if (pSMB->OplockLevel)
+					pCifsInode->clientCanCacheRead = true;
+
 				rc = slow_work_enqueue(&netfile->oplock_break);
 				if (rc) {
 					cERROR(1, ("failed to enqueue oplock "



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [22/27] sched, x86: Avoid unnecessary overflow in sched_clock
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (20 preceding siblings ...)
  2011-12-07 16:54 ` [21/27] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [23/27] x86/mpparse: Account for bus types other than ISA and PCI Greg KH
                   ` (4 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Salman Qazi, John Stultz, Peter Zijlstra,
	Ingo Molnar

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Salman Qazi <sqazi@google.com>

commit 4cecf6d401a01d054afc1e5f605bcbfe553cb9b9 upstream.

(Added the missing signed-off-by line)

In hundreds of days, the __cycles_2_ns calculation in sched_clock
has an overflow.  cyc * per_cpu(cyc2ns, cpu) exceeds 64 bits, causing
the final value to become zero.  We can solve this without losing
any precision.

We can decompose TSC into quotient and remainder of division by the
scale factor, and then use this to convert TSC into nanoseconds.

Signed-off-by: Salman Qazi <sqazi@google.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Reviewed-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20111115221121.7262.88871.stgit@dungbeetle.mtv.corp.google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/timer.h |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

--- a/arch/x86/include/asm/timer.h
+++ b/arch/x86/include/asm/timer.h
@@ -38,6 +38,22 @@ extern int no_timer_check;
  *  (mathieu.desnoyers@polymtl.ca)
  *
  *			-johnstul@us.ibm.com "math is hard, lets go shopping!"
+ *
+ * In:
+ *
+ * ns = cycles * cyc2ns_scale / SC
+ *
+ * Although we may still have enough bits to store the value of ns,
+ * in some cases, we may not have enough bits to store cycles * cyc2ns_scale,
+ * leading to an incorrect result.
+ *
+ * To avoid this, we can decompose 'cycles' into quotient and remainder
+ * of division by SC.  Then,
+ *
+ * ns = (quot * SC + rem) * cyc2ns_scale / SC
+ *    = quot * cyc2ns_scale + (rem * cyc2ns_scale) / SC
+ *
+ *			- sqazi@google.com
  */
 
 DECLARE_PER_CPU(unsigned long, cyc2ns);
@@ -47,9 +63,14 @@ DECLARE_PER_CPU(unsigned long long, cyc2
 
 static inline unsigned long long __cycles_2_ns(unsigned long long cyc)
 {
+	unsigned long long quot;
+	unsigned long long rem;
 	int cpu = smp_processor_id();
 	unsigned long long ns = per_cpu(cyc2ns_offset, cpu);
-	ns += cyc * per_cpu(cyc2ns, cpu) >> CYC2NS_SCALE_FACTOR;
+	quot = (cyc >> CYC2NS_SCALE_FACTOR);
+	rem = cyc & ((1ULL << CYC2NS_SCALE_FACTOR) - 1);
+	ns += quot * per_cpu(cyc2ns, cpu) +
+		((rem * per_cpu(cyc2ns, cpu)) >> CYC2NS_SCALE_FACTOR);
 	return ns;
 }
 



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [23/27] x86/mpparse: Account for bus types other than ISA and PCI
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (21 preceding siblings ...)
  2011-12-07 16:54 ` [22/27] sched, x86: Avoid unnecessary overflow in sched_clock Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [24/27] oprofile, x86: Fix crash when unloading module (nmi timer mode) Greg KH
                   ` (3 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Bjorn Helgaas, Dan McGrath,
	Alexey Starikovskiy, Jonathan Nieder, Ingo Molnar

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Bjorn Helgaas <bhelgaas@google.com>

commit 9e6866686bdf2dcf3aeb0838076237ede532dcc8 upstream.

In commit f8924e770e04 ("x86: unify mp_bus_info"), the 32-bit
and 64-bit versions of MP_bus_info were rearranged to match each
other better.  Unfortunately it introduced a regression: prior
to that change we used to always set the mp_bus_not_pci bit,
then clear it if we found a PCI bus.  After it, we set
mp_bus_not_pci for ISA buses, clear it for PCI buses, and leave
it alone otherwise.

In the cases of ISA and PCI, there's not much difference.  But
ISA is not the only non-PCI bus, so it's better to always set
mp_bus_not_pci and clear it only for PCI.

Without this change, Dan's Dell PowerEdge 4200 panics on boot
with a log indicating interrupt routing trouble unless the
"noapic" option is supplied.  With this change, the machine
boots reliably without "noapic".

Fixes http://bugs.debian.org/586494

Reported-bisected-and-tested-by: Dan McGrath <troubledaemon@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Dan McGrath <troubledaemon@gmail.com>
Cc: Alexey Starikovskiy <aystarik@gmail.com>
[jrnieder@gmail.com: clarified commit message]
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Link: http://lkml.kernel.org/r/20111122215000.GA9151@elie.hsd1.il.comcast.net
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/mpparse.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -94,8 +94,8 @@ static void __init MP_bus_info(struct mp
 	}
 #endif
 
+	set_bit(m->busid, mp_bus_not_pci);
 	if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) {
-		set_bit(m->busid, mp_bus_not_pci);
 #if defined(CONFIG_EISA) || defined(CONFIG_MCA)
 		mp_bus_id_to_type[m->busid] = MP_BUS_ISA;
 #endif



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [24/27] oprofile, x86: Fix crash when unloading module (nmi timer mode)
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (22 preceding siblings ...)
  2011-12-07 16:54 ` [23/27] x86/mpparse: Account for bus types other than ISA and PCI Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [25/27] genirq: Fix race condition when stopping the irq thread Greg KH
                   ` (2 subsequent siblings)
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Robert Richter

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Robert Richter <robert.richter@amd.com>

commit 97f7f8189fe54e3cfe324ef9ad35064f3d2d3bff upstream.

If oprofile uses the nmi timer interrupt there is a crash while
unloading the module. The bug can be triggered with oprofile build as
module and kernel parameter nolapic set. This patch fixes this.

oprofile: using NMI timer interrupt.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [<ffffffff8123c226>] unregister_syscore_ops+0x41/0x58
PGD 42dbca067 PUD 41da6a067 PMD 0
Oops: 0002 [#1] PREEMPT SMP
CPU 5
Modules linked in: oprofile(-) [last unloaded: oprofile]

Pid: 2518, comm: modprobe Not tainted 3.1.0-rc7-00019-gb2fb49d #19 Advanced Micro Device Anaheim/Anaheim
RIP: 0010:[<ffffffff8123c226>]  [<ffffffff8123c226>] unregister_syscore_ops+0x41/0x58
RSP: 0018:ffff88041ef71e98  EFLAGS: 00010296
RAX: 0000000000000000 RBX: ffffffffa0017100 RCX: dead000000200200
RDX: 0000000000000000 RSI: dead000000100100 RDI: ffffffff8178c620
RBP: ffff88041ef71ea8 R08: 0000000000000001 R09: 0000000000000082
R10: 0000000000000000 R11: ffff88041ef71de8 R12: 0000000000000080
R13: fffffffffffffff5 R14: 0000000000000001 R15: 0000000000610210
FS:  00007fc902f20700(0000) GS:ffff88042fd40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000008 CR3: 000000041cdb6000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 2518, threadinfo ffff88041ef70000, task ffff88041d348040)
Stack:
 ffff88041ef71eb8 ffffffffa0017790 ffff88041ef71eb8 ffffffffa0013532
 ffff88041ef71ec8 ffffffffa00132d6 ffff88041ef71ed8 ffffffffa00159b2
 ffff88041ef71f78 ffffffff81073115 656c69666f72706f 0000000000610200
Call Trace:
 [<ffffffffa0013532>] op_nmi_exit+0x15/0x17 [oprofile]
 [<ffffffffa00132d6>] oprofile_arch_exit+0xe/0x10 [oprofile]
 [<ffffffffa00159b2>] oprofile_exit+0x1e/0x20 [oprofile]
 [<ffffffff81073115>] sys_delete_module+0x1c3/0x22f
 [<ffffffff811bf09e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff8148070b>] system_call_fastpath+0x16/0x1b
Code: 20 c6 78 81 e8 c5 cc 23 00 48 8b 13 48 8b 43 08 48 be 00 01 10 00 00 00 ad de 48 b9 00 02 20 00 00 00 ad de 48 c7 c7 20 c6 78 81
 89 42 08 48 89 10 48 89 33 48 89 4b 08 e8 a6 c0 23 00 5a 5b
RIP  [<ffffffff8123c226>] unregister_syscore_ops+0x41/0x58
 RSP <ffff88041ef71e98>
CR2: 0000000000000008
---[ end trace 43a541a52956b7b0 ]---

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/oprofile/init.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/arch/x86/oprofile/init.c
+++ b/arch/x86/oprofile/init.c
@@ -21,6 +21,7 @@ extern int op_nmi_timer_init(struct opro
 extern void op_nmi_exit(void);
 extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth);
 
+static int nmi_timer;
 
 int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
@@ -31,8 +32,9 @@ int __init oprofile_arch_init(struct opr
 #ifdef CONFIG_X86_LOCAL_APIC
 	ret = op_nmi_init(ops);
 #endif
+	nmi_timer = (ret != 0);
 #ifdef CONFIG_X86_IO_APIC
-	if (ret < 0)
+	if (nmi_timer)
 		ret = op_nmi_timer_init(ops);
 #endif
 	ops->backtrace = x86_backtrace;
@@ -44,6 +46,7 @@ int __init oprofile_arch_init(struct opr
 void oprofile_arch_exit(void)
 {
 #ifdef CONFIG_X86_LOCAL_APIC
-	op_nmi_exit();
+	if (!nmi_timer)
+		op_nmi_exit();
 #endif
 }



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [25/27] genirq: Fix race condition when stopping the irq thread
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (23 preceding siblings ...)
  2011-12-07 16:54 ` [24/27] oprofile, x86: Fix crash when unloading module (nmi timer mode) Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:54 ` [26/27] tick-broadcast: Stop active broadcast device when replacing it Greg KH
  2011-12-07 16:55 ` [27/27] clockevents: Set noop handler in clockevents_exchange_device() Greg KH
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Ido Yariv, Thomas Gleixner

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Ido Yariv <ido@wizery.com>

commit 550acb19269d65f32e9ac4ddb26c2b2070e37f1c upstream.

In irq_wait_for_interrupt(), the should_stop member is verified before
setting the task's state to TASK_INTERRUPTIBLE and calling schedule().
In case kthread_stop sets should_stop and wakes up the process after
should_stop is checked by the irq thread but before the task's state
is changed, the irq thread might never exit:

kthread_stop                    irq_wait_for_interrupt
------------                    ----------------------

                                 ...
...                              while (!kthread_should_stop()) {
kthread->should_stop = 1;
wake_up_process(k);
wait_for_completion(&kthread->exited);
...
                                     set_current_state(TASK_INTERRUPTIBLE);

                                     ...

                                     schedule();
                                 }

Fix this by checking if the thread should stop after modifying the
task's state.

[ tglx: Simplified it a bit ]

Signed-off-by: Ido Yariv <ido@wizery.com>
Link: http://lkml.kernel.org/r/1322740508-22640-1-git-send-email-ido@wizery.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/irq/manage.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -475,8 +475,9 @@ static irqreturn_t irq_nested_primary_ha
 
 static int irq_wait_for_interrupt(struct irqaction *action)
 {
+	set_current_state(TASK_INTERRUPTIBLE);
+
 	while (!kthread_should_stop()) {
-		set_current_state(TASK_INTERRUPTIBLE);
 
 		if (test_and_clear_bit(IRQTF_RUNTHREAD,
 				       &action->thread_flags)) {
@@ -484,7 +485,9 @@ static int irq_wait_for_interrupt(struct
 			return 0;
 		}
 		schedule();
+		set_current_state(TASK_INTERRUPTIBLE);
 	}
+	__set_current_state(TASK_RUNNING);
 	return -1;
 }
 



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [26/27] tick-broadcast: Stop active broadcast device when replacing it
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (24 preceding siblings ...)
  2011-12-07 16:54 ` [25/27] genirq: Fix race condition when stopping the irq thread Greg KH
@ 2011-12-07 16:54 ` Greg KH
  2011-12-07 16:55 ` [27/27] clockevents: Set noop handler in clockevents_exchange_device() Greg KH
  26 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Thomas Gleixner

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Gleixner <tglx@linutronix.de>

commit c1be84309c58b1e7c6d626e28fba41a22b364c3d upstream.

When a better rated broadcast device is installed, then the current
active device is not disabled, which results in two running broadcast
devices.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/time/tick-broadcast.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -72,7 +72,7 @@ int tick_check_broadcast_device(struct c
 	     (dev->features & CLOCK_EVT_FEAT_C3STOP))
 		return 0;
 
-	clockevents_exchange_device(NULL, dev);
+	clockevents_exchange_device(tick_broadcast_device.evtdev, dev);
 	tick_broadcast_device.evtdev = dev;
 	if (!cpumask_empty(tick_get_broadcast_mask()))
 		tick_broadcast_start_periodic(dev);



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [27/27] clockevents: Set noop handler in clockevents_exchange_device()
  2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
                   ` (25 preceding siblings ...)
  2011-12-07 16:54 ` [26/27] tick-broadcast: Stop active broadcast device when replacing it Greg KH
@ 2011-12-07 16:55 ` Greg KH
  2011-12-29 12:09   ` Jonathan Nieder
  26 siblings, 1 reply; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Thomas Gleixner

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Gleixner <tglx@linutronix.de>

commit de28f25e8244c7353abed8de0c7792f5f883588c upstream.

If a device is shutdown, then there might be a pending interrupt,
which will be processed after we reenable interrupts, which causes the
original handler to be run. If the old handler is the (broadcast)
periodic handler the shutdown state might hang the kernel completely.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/time/clockevents.c |    1 +
 1 file changed, 1 insertion(+)

--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -221,6 +221,7 @@ void clockevents_exchange_device(struct
 	 * released list and do a notify add later.
 	 */
 	if (old) {
+		old->event_handler = clockevents_handle_noop;
 		clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED);
 		list_del(&old->list);
 		list_add(&old->list, &clockevents_released);



^ permalink raw reply	[flat|nested] 34+ messages in thread

* [00/27] 2.6.32.50-longterm review
@ 2011-12-07 16:56 Greg KH
  2011-12-07 16:54 ` [01/27] i2c-algo-bit: Generate correct i2c address sequence for 10-bit target Greg KH
                   ` (26 more replies)
  0 siblings, 27 replies; 34+ messages in thread
From: Greg KH @ 2011-12-07 16:56 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan

This is the start of the longterm review cycle for the 2.6.32.50 release.
There are 27 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let us know.  If anyone is a maintainer of the proper subsystem, and
wants to add a Signed-off-by: line to the patch, please respond with it.

Responses should be made by Friday, December 9, 2011, 17:00:00 UTC.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v2.6/longterm-review/patch-2.6.32.19-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h


 Makefile                             |    2 +-
 arch/arm/Kconfig                     |   12 +++++
 arch/arm/kernel/process.c            |    3 +
 arch/x86/include/asm/timer.h         |   23 ++++++++++-
 arch/x86/kernel/mpparse.c            |    2 +-
 arch/x86/oprofile/init.c             |    7 ++-
 drivers/i2c/algos/i2c-algo-bit.c     |    4 +-
 drivers/net/wireless/p54/p54spi.c    |    5 +-
 drivers/pci/hotplug/shpchp_core.c    |    4 +-
 drivers/pci/hotplug/shpchp_hpc.c     |    4 +-
 drivers/scsi/scsi_lib.c              |   12 ++++--
 drivers/staging/comedi/comedi_fops.c |   75 +++++++++++++++++++++++++---------
 drivers/staging/usbip/vhci_rx.c      |   10 +++--
 drivers/usb/host/whci/qset.c         |    2 +-
 drivers/usb/serial/ftdi_sio.c        |    1 +
 drivers/usb/serial/ftdi_sio_ids.h    |    1 +
 drivers/usb/serial/option.c          |    1 +
 drivers/usb/storage/unusual_devs.h   |    7 +++
 fs/cifs/misc.c                       |    3 +
 fs/ecryptfs/crypto.c                 |    4 +-
 kernel/irq/manage.c                  |    5 ++-
 kernel/time/clockevents.c            |    1 +
 kernel/time/tick-broadcast.c         |    2 +-
 kernel/time/timekeeping.c            |    4 ++
 net/core/dev.c                       |    1 +
 net/sunrpc/xprtsock.c                |    3 +-
 net/wireless/nl80211.c               |    4 +-
 sound/pci/lx6464es/lx_core.c         |   16 +++++--
 28 files changed, 164 insertions(+), 54 deletions(-)

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [05/27] ALSA: lx6464es - fix device communication via command bus
  2011-12-07 16:54 ` [05/27] ALSA: lx6464es - fix device communication via command bus Greg KH
@ 2011-12-07 17:13   ` Tim Blechmann
  0 siblings, 0 replies; 34+ messages in thread
From: Tim Blechmann @ 2011-12-07 17:13 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, stable, torvalds, akpm, alan, Takashi Iwai

it is not really necessary to apply this patch to 2.6.32, as the problem was 
introduced by a change to the memcpy_*_io functions that was introduced in 
2.6.34.

otoh, it doesn't harm, either.

On Wednesday 07 December 2011 08:54:38 Greg KH wrote:
> 2.6.32-longterm review patch.  If anyone has any objections, please let me
> know.
> 
> ------------------
> 
> From: Tim Blechmann <tim@klingt.org>
> 
> commit a29878553a9a7b4c06f93c7e383527cf014d4ceb upstream.
> 
> commit 6175ddf06b6172046a329e3abfd9c901a43efd2e optimized the mem*io
> functions that have been used to send commands to the device. these
> optimizations somehow corrupted the communication with the lx6464es,
> that resulted the device to be unusable with kernels after 2.6.33.
> 
> this patch emulates the memcpy_*_io functions via a loop to avoid these
> problems.
> 
> Signed-off-by: Tim Blechmann <tim@klingt.org>
> LKML-Reference: <4ECB5257.4040600@ladisch.de>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> ---
>  sound/pci/lx6464es/lx_core.c |   16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> --- a/sound/pci/lx6464es/lx_core.c
> +++ b/sound/pci/lx6464es/lx_core.c
> @@ -80,8 +80,12 @@ unsigned long lx_dsp_reg_read(struct lx6
> 
>  void lx_dsp_reg_readbuf(struct lx6464es *chip, int port, u32 *data, u32
> len) {
> -	void __iomem *address = lx_dsp_register(chip, port);
> -	memcpy_fromio(data, address, len*sizeof(u32));
> +	u32 __iomem *address = lx_dsp_register(chip, port);
> +	int i;
> +
> +	/* we cannot use memcpy_fromio */
> +	for (i = 0; i != len; ++i)
> +		data[i] = ioread32(address + i);
>  }
> 
> 
> @@ -94,8 +98,12 @@ void lx_dsp_reg_write(struct lx6464es *c
>  void lx_dsp_reg_writebuf(struct lx6464es *chip, int port, const u32 *data,
>  			 u32 len)
>  {
> -	void __iomem *address = lx_dsp_register(chip, port);
> -	memcpy_toio(address, data, len*sizeof(u32));
> +	u32 __iomem *address = lx_dsp_register(chip, port);
> +	int i;
> +
> +	/* we cannot use memcpy_to */
> +	for (i = 0; i != len; ++i)
> +		iowrite32(data[i], address + i);
>  }

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [27/27] clockevents: Set noop handler in clockevents_exchange_device()
  2011-12-07 16:55 ` [27/27] clockevents: Set noop handler in clockevents_exchange_device() Greg KH
@ 2011-12-29 12:09   ` Jonathan Nieder
  2011-12-30  1:05     ` Linus Torvalds
  0 siblings, 1 reply; 34+ messages in thread
From: Jonathan Nieder @ 2011-12-29 12:09 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, torvalds, akpm, alan, Thomas Gleixner, Phil Miller

Hi Greg,

Greg KH wrote:

> 2.6.32-longterm review patch.  If anyone has any objections, please let me know.
>
> ------------------
>
> From: Thomas Gleixner <tglx@linutronix.de>
>
> commit de28f25e8244c7353abed8de0c7792f5f883588c upstream.
[...]
> --- a/kernel/time/clockevents.c
> +++ b/kernel/time/clockevents.c
> @@ -221,6 +221,7 @@ void clockevents_exchange_device(struct
>  	 * released list and do a notify add later.
>  	 */
>  	if (old) {
> +		old->event_handler = clockevents_handle_noop;
>  		clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED);

This is basically the reverse of 7c1e768974 (clockevents: prevent
clockevent event_handler ending up handler_noop, 2008-09-03).  The
rationale for the latter still applies.  People have been reporting
the analagous patch to this one causing hangs on resume in 3.1.y and
3.2 release candidates:

 - http://thread.gmane.org/gmane.linux.kernel/1233033
 - http://thread.gmane.org/gmane.linux.kernel/1233389
 - http://thread.gmane.org/gmane.linux.kernel/1233159
 - http://thread.gmane.org/gmane.linux.kernel/1227868/focus=1230877

So please consider reverting it for now.

Thanks,
Jonathan

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [27/27] clockevents: Set noop handler in clockevents_exchange_device()
  2011-12-29 12:09   ` Jonathan Nieder
@ 2011-12-30  1:05     ` Linus Torvalds
  2011-12-30 15:07       ` Tim Gardner
  2012-01-10 14:23       ` Thomas Gleixner
  0 siblings, 2 replies; 34+ messages in thread
From: Linus Torvalds @ 2011-12-30  1:05 UTC (permalink / raw)
  To: Jonathan Nieder, Thomas Gleixner
  Cc: Greg KH, linux-kernel, stable, akpm, Alan Cox, Phil Miller

On Thu, Dec 29, 2011 at 4:09 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>
> This is basically the reverse of 7c1e768974 (clockevents: prevent
> clockevent event_handler ending up handler_noop, 2008-09-03).  The
> rationale for the latter still applies.

Hmm. You seem to be right. Instead of applying this to stable, it
looks like we should revert it from mainline.

>                  People have been reporting
> the analagous patch to this one causing hangs on resume in 3.1.y and
> 3.2 release candidates:
>
>  - http://thread.gmane.org/gmane.linux.kernel/1233033
>  - http://thread.gmane.org/gmane.linux.kernel/1233389
>  - http://thread.gmane.org/gmane.linux.kernel/1233159
>  - http://thread.gmane.org/gmane.linux.kernel/1227868/focus=1230877
>
> So please consider reverting it for now.

Thomas? It does seem to be broken and there do seem to be regression
reports about it.

Should I revert it, or do you have alternative fixes?

                 Linus

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [27/27] clockevents: Set noop handler in clockevents_exchange_device()
  2011-12-30  1:05     ` Linus Torvalds
@ 2011-12-30 15:07       ` Tim Gardner
       [not found]         ` <CA++bM2uqcWFM6=WdmrusmugQw2nH_KDyySKH+1qyr8GK0Cq14A@mail.gmail.com>
  2012-01-10 14:23       ` Thomas Gleixner
  1 sibling, 1 reply; 34+ messages in thread
From: Tim Gardner @ 2011-12-30 15:07 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Jonathan Nieder, Thomas Gleixner, Greg KH, linux-kernel, stable,
	akpm, Alan Cox, Phil Miller

On 12/29/2011 06:05 PM, Linus Torvalds wrote:
> On Thu, Dec 29, 2011 at 4:09 AM, Jonathan Nieder<jrnieder@gmail.com>  wrote:
>>
>> This is basically the reverse of 7c1e768974 (clockevents: prevent
>> clockevent event_handler ending up handler_noop, 2008-09-03).  The
>> rationale for the latter still applies.
>
> Hmm. You seem to be right. Instead of applying this to stable, it
> looks like we should revert it from mainline.
>
>>                    People have been reporting
>> the analagous patch to this one causing hangs on resume in 3.1.y and
>> 3.2 release candidates:
>>
>>   - http://thread.gmane.org/gmane.linux.kernel/1233033
>>   - http://thread.gmane.org/gmane.linux.kernel/1233389
>>   - http://thread.gmane.org/gmane.linux.kernel/1233159
>>   - http://thread.gmane.org/gmane.linux.kernel/1227868/focus=1230877
>>
>> So please consider reverting it for now.
>
> Thomas? It does seem to be broken and there do seem to be regression
> reports about it.
>
> Should I revert it, or do you have alternative fixes?
>
>                   Linus
> --

We (Ubuntu) are seeing this issue as well in both 3.0.13 and 3.2-rc6:

https://lkml.org/lkml/2011/12/24/33

Reverting that single patch alleviates the resume regression.

rtg
-- 
Tim Gardner tim.gardner@canonical.com

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [27/27] clockevents: Set noop handler in clockevents_exchange_device()
       [not found]         ` <CA++bM2uqcWFM6=WdmrusmugQw2nH_KDyySKH+1qyr8GK0Cq14A@mail.gmail.com>
@ 2012-01-05 10:27           ` Feng Tang
  0 siblings, 0 replies; 34+ messages in thread
From: Feng Tang @ 2012-01-05 10:27 UTC (permalink / raw)
  To: Tim Gardner
  Cc: Linus Torvalds, Jonathan Nieder, Thomas Gleixner, Greg KH,
	linux-kernel, stable, akpm, Alan Cox, Phil Miller, philipl, mjt,
	gurligebis, Linux Kernel Mail List

Hi Tim and all,

> From: Tim Gardner <tim.gardner@canonical.com>
> Date: 2011/12/30
> Subject: Re: [27/27] clockevents: Set noop handler in
> clockevents_exchange_device()
> To: Linus Torvalds <torvalds@linux-foundation.org>
> 抄送: Jonathan Nieder <jrnieder@gmail.com>, Thomas Gleixner
> <tglx@linutronix.de>, Greg KH <gregkh@suse.de>,
> linux-kernel@vger.kernel.org, stable@vger.kernel.org,
> akpm@linux-foundation.org, Alan Cox <alan@lxorguk.ukuu.org.uk>, Phil
> Miller <mille121@illinois.edu>
> 
> 
> On 12/29/2011 06:05 PM, Linus Torvalds wrote:
> >
> > On Thu, Dec 29, 2011 at 4:09 AM, Jonathan Nieder<jrnieder@gmail.com>  wrote:
> >>
> >>
> >> This is basically the reverse of 7c1e768974 (clockevents: prevent
> >> clockevent event_handler ending up handler_noop, 2008-09-03).  The
> >> rationale for the latter still applies.
> >
> >
> > Hmm. You seem to be right. Instead of applying this to stable, it
> > looks like we should revert it from mainline.
> >
> >>                   People have been reporting
> >> the analagous patch to this one causing hangs on resume in 3.1.y and
> >> 3.2 release candidates:
> >>
> >>  - http://thread.gmane.org/gmane.linux.kernel/1233033
> >>  - http://thread.gmane.org/gmane.linux.kernel/1233389
> >>  - http://thread.gmane.org/gmane.linux.kernel/1233159
> >>  - http://thread.gmane.org/gmane.linux.kernel/1227868/focus=1230877
> >>
> >> So please consider reverting it for now.
> >
> >
> > Thomas? It does seem to be broken and there do seem to be regression
> > reports about it.
> >
> > Should I revert it, or do you have alternative fixes?
> >
> >                  Linus
> > --
> 
> 
> We (Ubuntu) are seeing this issue as well in both 3.0.13 and 3.2-rc6:
> 
> https://lkml.org/lkml/2011/12/24/33
> 
> Reverting that single patch alleviates the resume regression.

I had a Dell Studio XPS machine which see the same hang issue. Per my
track, the root cause of the hang should be:

The machine has 8 CPUs and several Hpets, and it use one hpet as its
broadcast tick device, and 5 hpets as per-cpu tick device for CPU 0-4,
3 Lapics as per-cpu tick device for CPU 5-7.

During the resume cycle, for CPU0-4, the per-cpu tick device setup is
a little complex, a lapic will be assigned as the per-cpu tick first,
and then there will be a switch from lapic to hpet, and problem happens
here during the switch:
    tick_check_new_device()
        ->clockevents_exchange_device():  set the noop handler to lapic tick
	->tick_setup_device(): pass the lapic's handler(noop handler) to hpet

So after the resume, 5 per-cpu hpet device's handler will be all noop handler
instead of hrtimer_interrupt, which will hang the resuming.


Following is a patch which fix the problem on my side, could you please review
and try?

-------------------------------------------------------------------------
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index d6733e2..aa93eca 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -101,6 +101,10 @@ struct clock_event_device {
 	int			irq;
 	const struct cpumask	*cpumask;
 	struct list_head	list;
+
+#ifdef CONFIG_GENERIC_CLOCKEVENTS
+	struct tick_device      *td;
+#endif
 } ____cacheline_aligned;
 
 /*
diff --git a/include/linux/tick.h b/include/linux/tick.h
index b232ccc..7000b26 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -17,6 +17,7 @@ enum tick_device_mode {
 
 struct tick_device {
 	struct clock_event_device *evtdev;
+	void  (*last_event_handler)(struct clock_event_device *);
 	enum tick_device_mode mode;
 };
 
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 13dfaab..53db16f 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -286,6 +286,15 @@ void clockevents_exchange_device(struct clock_event_device *old,
 	 * released list and do a notify add later.
 	 */
 	if (old) {
+		/*
+		 * If the old device is the per-cpu tick device, then we
+		 * need to record its event handler, so that it could be
+		 * passed to the new tick device in tick_setup_device()
+		 */
+		if (old->td) {
+			old->td->last_event_handler = old->event_handler;
+			old->td = NULL;
+		}
 		old->event_handler = clockevents_handle_noop;
 		clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED);
 		list_del(&old->list);
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 119528d..5ec54e9 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -173,12 +173,12 @@ static void tick_setup_device(struct tick_device *td,
 		 */
 		td->mode = TICKDEV_MODE_PERIODIC;
 	} else {
-		handler = td->evtdev->event_handler;
+		handler = td->last_event_handler;
 		next_event = td->evtdev->next_event;
-		td->evtdev->event_handler = clockevents_handle_noop;
 	}
 
 	td->evtdev = newdev;
+	newdev->td = td;
 
 	/*
 	 * When the device is not per cpu, pin the interrupt to the


	


> 
> rtg
> --
> Tim Gardner tim.gardner@canonical.com
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [27/27] clockevents: Set noop handler in clockevents_exchange_device()
  2011-12-30  1:05     ` Linus Torvalds
  2011-12-30 15:07       ` Tim Gardner
@ 2012-01-10 14:23       ` Thomas Gleixner
  1 sibling, 0 replies; 34+ messages in thread
From: Thomas Gleixner @ 2012-01-10 14:23 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Jonathan Nieder, Greg KH, linux-kernel, stable, akpm, Alan Cox,
	Phil Miller

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1101 bytes --]

On Thu, 29 Dec 2011, Linus Torvalds wrote:

> On Thu, Dec 29, 2011 at 4:09 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> >
> > This is basically the reverse of 7c1e768974 (clockevents: prevent
> > clockevent event_handler ending up handler_noop, 2008-09-03).  The
> > rationale for the latter still applies.
> 
> Hmm. You seem to be right. Instead of applying this to stable, it
> looks like we should revert it from mainline.
> 
> >                  People have been reporting
> > the analagous patch to this one causing hangs on resume in 3.1.y and
> > 3.2 release candidates:
> >
> >  - http://thread.gmane.org/gmane.linux.kernel/1233033
> >  - http://thread.gmane.org/gmane.linux.kernel/1233389
> >  - http://thread.gmane.org/gmane.linux.kernel/1233159
> >  - http://thread.gmane.org/gmane.linux.kernel/1227868/focus=1230877
> >
> > So please consider reverting it for now.
> 
> Thomas? It does seem to be broken and there do seem to be regression
> reports about it.
> 
> Should I revert it, or do you have alternative fixes?

Hmm. I have no idea what broke. Will have a look.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2012-01-10 14:23 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
2011-12-07 16:54 ` [01/27] i2c-algo-bit: Generate correct i2c address sequence for 10-bit target Greg KH
2011-12-07 16:54 ` [02/27] eCryptfs: Extend array bounds for all filename chars Greg KH
2011-12-07 16:54 ` [03/27] PCI hotplug: shpchp: dont blindly claim non-AMD 0x7450 device IDs Greg KH
2011-12-07 16:54 ` [04/27] ARM: 7161/1: errata: no automatic store buffer drain Greg KH
2011-12-07 16:54 ` [05/27] ALSA: lx6464es - fix device communication via command bus Greg KH
2011-12-07 17:13   ` Tim Blechmann
2011-12-07 16:54 ` [06/27] SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared Greg KH
2011-12-07 16:54 ` [07/27] timekeeping: add arch_offset hook to ktime_get functions Greg KH
2011-12-07 16:54 ` [08/27] p54spi: Add missing spin_lock_init Greg KH
2011-12-07 16:54 ` [09/27] p54spi: Fix workqueue deadlock Greg KH
2011-12-07 16:54 ` [10/27] nl80211: fix MAC address validation Greg KH
2011-12-07 16:54 ` [11/27] gro: reset vlan_tci on reuse Greg KH
2011-12-07 16:54 ` [12/27] staging: usbip: bugfix for deadlock Greg KH
2011-12-07 16:54 ` [13/27] staging: comedi: fix oops for USB DAQ devices Greg KH
2011-12-07 16:54 ` [14/27] Staging: comedi: fix signal handling in read and write Greg KH
2011-12-07 16:54 ` [15/27] USB: whci-hcd: fix endian conversion in qset_clear() Greg KH
2011-12-07 16:54 ` [16/27] usb: ftdi_sio: add PID for Propox ISPcable III Greg KH
2011-12-07 16:54 ` [17/27] usb: option: add SIMCom SIM5218 Greg KH
2011-12-07 16:54 ` [18/27] USB: usb-storage: unusual_devs entry for Kingston DT 101 G2 Greg KH
2011-12-07 16:54 ` [19/27] SCSI: scsi_lib: fix potential NULL dereference Greg KH
2011-12-07 16:54 ` [20/27] SCSI: Silencing killing requests for dead queue Greg KH
2011-12-07 16:54 ` [21/27] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch Greg KH
2011-12-07 16:54 ` [22/27] sched, x86: Avoid unnecessary overflow in sched_clock Greg KH
2011-12-07 16:54 ` [23/27] x86/mpparse: Account for bus types other than ISA and PCI Greg KH
2011-12-07 16:54 ` [24/27] oprofile, x86: Fix crash when unloading module (nmi timer mode) Greg KH
2011-12-07 16:54 ` [25/27] genirq: Fix race condition when stopping the irq thread Greg KH
2011-12-07 16:54 ` [26/27] tick-broadcast: Stop active broadcast device when replacing it Greg KH
2011-12-07 16:55 ` [27/27] clockevents: Set noop handler in clockevents_exchange_device() Greg KH
2011-12-29 12:09   ` Jonathan Nieder
2011-12-30  1:05     ` Linus Torvalds
2011-12-30 15:07       ` Tim Gardner
     [not found]         ` <CA++bM2uqcWFM6=WdmrusmugQw2nH_KDyySKH+1qyr8GK0Cq14A@mail.gmail.com>
2012-01-05 10:27           ` Feng Tang
2012-01-10 14:23       ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).