]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .29 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 12 May 2009 20:59:43 +0000 (13:59 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 12 May 2009 20:59:43 +0000 (13:59 -0700)
queue-2.6.29/dup2-fix-return-value-with-oldfd-newfd-and-invalid-fd.patch [new file with mode: 0644]
queue-2.6.29/e1000-fix-virtualization-bug.patch [new file with mode: 0644]
queue-2.6.29/fix-for-enabling-branch-profiling-makes-sparse-unusable.patch [new file with mode: 0644]
queue-2.6.29/hwmon-fix-w83782d-support.patch [new file with mode: 0644]
queue-2.6.29/i2c-algo-bit-fix-timeout-test.patch [new file with mode: 0644]
queue-2.6.29/i2c-algo-pca-let-pca9564-recover-from-unacked-data-byte.patch [new file with mode: 0644]
queue-2.6.29/ne2k-pci-do-not-register-device-until-initialized.patch [new file with mode: 0644]
queue-2.6.29/series

diff --git a/queue-2.6.29/dup2-fix-return-value-with-oldfd-newfd-and-invalid-fd.patch b/queue-2.6.29/dup2-fix-return-value-with-oldfd-newfd-and-invalid-fd.patch
new file mode 100644 (file)
index 0000000..1017b0b
--- /dev/null
@@ -0,0 +1,50 @@
+From 2b79bc4f7ebbd5af3c8b867968f9f15602d5f802 Mon Sep 17 00:00:00 2001
+From: Jeff Mahoney <jeffm@suse.com>
+Date: Mon, 11 May 2009 14:25:34 -0400
+Subject: dup2: Fix return value with oldfd == newfd and invalid fd
+
+From: Jeff Mahoney <jeffm@suse.com>
+
+commit 2b79bc4f7ebbd5af3c8b867968f9f15602d5f802 upstream.
+
+The return value of dup2 when oldfd == newfd and the fd isn't valid is
+not getting properly sign extended.  We end up with 4294967287 instead
+of -EBADF.
+
+I've reproduced this on SLE11 (2.6.27.21), openSUSE Factory
+(2.6.29-rc5), and Ubuntu 9.04 (2.6.28).
+
+This patch uses a signed int for the error value so it is properly
+extended.
+
+Commit 6c5d0512a091480c9f981162227fdb1c9d70e555 introduced this
+regression.
+
+Reported-by: Jiri Dluhos <jdluhos@novell.com>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/fcntl.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/fs/fcntl.c
++++ b/fs/fcntl.c
+@@ -117,11 +117,13 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldf
+ {
+       if (unlikely(newfd == oldfd)) { /* corner case */
+               struct files_struct *files = current->files;
++              int retval = oldfd;
++
+               rcu_read_lock();
+               if (!fcheck_files(files, oldfd))
+-                      oldfd = -EBADF;
++                      retval = -EBADF;
+               rcu_read_unlock();
+-              return oldfd;
++              return retval;
+       }
+       return sys_dup3(oldfd, newfd, 0);
+ }
diff --git a/queue-2.6.29/e1000-fix-virtualization-bug.patch b/queue-2.6.29/e1000-fix-virtualization-bug.patch
new file mode 100644 (file)
index 0000000..e9ecfc1
--- /dev/null
@@ -0,0 +1,47 @@
+From jeffrey.t.kirsher@intel.com  Tue May 12 13:46:45 2009
+From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Date: Tue, 12 May 2009 10:34:21 -0700
+Subject: e1000: fix virtualization bug
+To: chrisw@sous-sol.org, greg@kroah.com
+Cc: stable@kernel.org, netdev@vger.kernel.org, Jesse Brandeburg <jesse.brandeburg@intel.com>, Jeff Kirsher <jeffrey.t.kirsher@intel.com>, David S. Miller <davem@davemloft.net>
+Message-ID: <20090512173420.20407.37168.stgit@localhost.localdomain>
+
+
+From: Jesse Brandeburg <jesse.brandeburg@intel.com>
+
+[STABLE] backport upstream commit e151a60ad1faffb6241cf7eb6846353df1f33a32
+
+a recent fix to e1000 (commit 15b2bee2) caused KVM/QEMU/VMware based
+virtualized e1000 interfaces to begin failing when resetting.
+
+This is because the driver in a virtual environment doesn't
+get to run instructions *AT ALL* when an interrupt is asserted.
+The interrupt code runs immediately and this recent bug fix
+allows an interrupt to be possible when the interrupt handler
+will reject it (due to the new code), when being called from
+any path in the driver that holds the E1000_RESETTING flag.
+
+the driver should use the __E1000_DOWN flag instead of the
+__E1000_RESETTING flag to prevent interrupt execution
+while reconfiguring the hardware.
+
+Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/e1000/e1000_main.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/e1000/e1000_main.c
++++ b/drivers/net/e1000/e1000_main.c
+@@ -3712,7 +3712,7 @@ static irqreturn_t e1000_intr(int irq, v
+       struct e1000_hw *hw = &adapter->hw;
+       u32 rctl, icr = er32(ICR);
+-      if (unlikely((!icr) || test_bit(__E1000_RESETTING, &adapter->flags)))
++      if (unlikely((!icr) || test_bit(__E1000_DOWN, &adapter->flags)))
+               return IRQ_NONE;  /* Not our interrupt */
+       /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is
diff --git a/queue-2.6.29/fix-for-enabling-branch-profiling-makes-sparse-unusable.patch b/queue-2.6.29/fix-for-enabling-branch-profiling-makes-sparse-unusable.patch
new file mode 100644 (file)
index 0000000..7914fee
--- /dev/null
@@ -0,0 +1,56 @@
+From stable-bounces@linux.kernel.org  Tue May 12 13:49:38 2009
+From: Bart Van Assche <bart.vanassche@gmail.com>
+Date: Sat, 9 May 2009 11:43:44 +0200
+Subject: Fix for enabling branch profiling makes sparse unusable
+To: stable@kernel.org
+Message-ID: <200905091143.44144.bart.vanassche@gmail.com>
+Content-Disposition: inline
+
+From: Bart Van Assche <bart.vanassche@gmail.com>
+
+commit d9ad8bc0ca823705413f75b50c442a88cc518b35 upstream.
+
+One of the changes between kernels 2.6.28 and 2.6.29 is that a branch profiler
+has been added for if() statements. Unfortunately this patch makes the sparse
+output unusable with CONFIG_TRACE_BRANCH_PROFILING=y: when branch profiling is
+enabled, sparse prints so much false positives that the real issues are no
+longer visible. This behavior can be reproduced as follows:
+* enable CONFIG_TRACE_BRANCH_PROFILING, e.g. by running make allyesconfig or
+  make allmodconfig.
+* run make C=2
+
+Result: a huge number of the following sparse warnings.
+...
+include/linux/cpumask.h:547:2: warning: symbol '______r' shadows an earlier one
+include/linux/cpumask.h:547:2: originally declared here
+...
+
+The patch below fixes this by disabling branch profiling while analyzing the
+kernel code with sparse.
+
+This patch is already included in 2.6.30-rc1 -- see also
+http://lkml.org/lkml/2009/4/5/120.
+
+Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Steven Rostedt <srostedt@redhat.com>
+LKML-Reference: <200904051620.02311.bart.vanassche@gmail.com>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/compiler.h |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/include/linux/compiler.h
++++ b/include/linux/compiler.h
+@@ -75,7 +75,8 @@ struct ftrace_branch_data {
+  * Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
+  * to disable branch tracing on a per file basis.
+  */
+-#if defined(CONFIG_TRACE_BRANCH_PROFILING) && !defined(DISABLE_BRANCH_PROFILING)
++#if defined(CONFIG_TRACE_BRANCH_PROFILING) \
++    && !defined(DISABLE_BRANCH_PROFILING) && !defined(__CHECKER__)
+ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+ #define likely_notrace(x)     __builtin_expect(!!(x), 1)
diff --git a/queue-2.6.29/hwmon-fix-w83782d-support.patch b/queue-2.6.29/hwmon-fix-w83782d-support.patch
new file mode 100644 (file)
index 0000000..e0e2fa8
--- /dev/null
@@ -0,0 +1,38 @@
+From stable-bounces@linux.kernel.org  Tue May 12 13:48:25 2009
+From: Jean Delvare <khali@linux-fr.org>
+Date: Sat, 9 May 2009 14:33:12 +0200
+Subject: hwmon: (w83781d) Fix W83782D support (NULL pointer dereference)
+To: stable@kernel.org
+Message-ID: <20090509143312.031c4db8@hyperion.delvare>
+
+From: Jean Delvare <khali@linux-fr.org>
+
+Commit 848ddf116b3d1711c956fac8627be12dfe8d736f upstream
+
+Commit 360782dde00a2e6e7d9fd57535f90934707ab8a8 (hwmon: (w83781d) Stop
+abusing struct i2c_client for ISA devices) broke W83782D support for
+devices connected on the ISA bus. You will hit a NULL pointer
+dereference as soon as you read any device attribute. Other devices,
+and W83782D devices on the SMBus, aren't affected.
+
+Reported-by: Michel Abraham
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Tested-by: Michel Abraham
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/w83781d.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/hwmon/w83781d.c
++++ b/drivers/hwmon/w83781d.c
+@@ -1462,7 +1462,8 @@ static struct w83781d_data *w83781d_upda
+                               data->pwm[i] =
+                                   w83781d_read_value(data,
+                                                      W83781D_REG_PWM[i]);
+-                              if ((data->type != w83782d || !client->driver)
++                              /* Only W83782D on SMBus has PWM3 and PWM4 */
++                              if ((data->type != w83782d || !client)
+                                   && i == 1)
+                                       break;
+                       }
diff --git a/queue-2.6.29/i2c-algo-bit-fix-timeout-test.patch b/queue-2.6.29/i2c-algo-bit-fix-timeout-test.patch
new file mode 100644 (file)
index 0000000..f13e04d
--- /dev/null
@@ -0,0 +1,39 @@
+From stable-bounces@linux.kernel.org  Tue May 12 13:51:08 2009
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 7 May 2009 14:57:24 +0200
+Subject: i2c-algo-bit: Fix timeout test
+To: stable@kernel.org
+Message-ID: <20090507145724.730d8916@hyperion.delvare>
+
+
+From: Dave Airlie <airlied@redhat.com>
+
+commit 0cdba07bb23cdd3e0d64357ec3d983e6b75e541f upstream
+
+When fetching DDC using i2c algo bit, we were often seeing timeouts
+before getting valid EDID on a retry. The VESA spec states 2ms is the
+DDC timeout, so when this translates into 1 jiffie and we are close
+to the end of the time period, it could return with a timeout less than
+2ms.
+
+Change this code to use time_after instead of time_after_eq.
+
+Signed-off-by: Dave Airlie <airlied@redhat.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 |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/i2c/algos/i2c-algo-bit.c
++++ b/drivers/i2c/algos/i2c-algo-bit.c
+@@ -104,7 +104,7 @@ static int sclhi(struct i2c_algo_bit_dat
+                * chips may hold it low ("clock stretching") while they
+                * are processing data internally.
+                */
+-              if (time_after_eq(jiffies, start + adap->timeout))
++              if (time_after(jiffies, start + adap->timeout))
+                       return -ETIMEDOUT;
+               cond_resched();
+       }
diff --git a/queue-2.6.29/i2c-algo-pca-let-pca9564-recover-from-unacked-data-byte.patch b/queue-2.6.29/i2c-algo-pca-let-pca9564-recover-from-unacked-data-byte.patch
new file mode 100644 (file)
index 0000000..9830a18
--- /dev/null
@@ -0,0 +1,62 @@
+From stable-bounces@linux.kernel.org  Tue May 12 13:51:50 2009
+From: Enrik Berkhan <Enrik.Berkhan@ge.com>
+Date: Thu, 7 May 2009 14:58:48 +0200
+Subject: i2c-algo-pca: Let PCA9564 recover from unacked data byte (state 0x30)
+To: stable@kernel.org
+Message-ID: <20090507145848.7fb8a908@hyperion.delvare>
+
+
+From: Enrik Berkhan <Enrik.Berkhan@ge.com>
+
+commit 2196d1cf4afab93fb64c2e5b417096e49b661612 upstream
+
+Currently, the i2c-algo-pca driver does nothing if the chip enters state
+0x30 (Data byte in I2CDAT has been transmitted; NOT ACK has been
+received).  Thus, the i2c bus connected to the controller gets stuck
+afterwards.
+
+I have seen this kind of error on a custom board in certain load
+situations most probably caused by interference or noise.
+
+A possible reaction is to let the controller generate a STOP condition.
+This is documented in the PCA9564 data sheet (2006-09-01) and the same
+is done for other NACK states as well.
+
+Further, state 0x38 isn't handled completely, either. Try to do another
+START in this case like the data sheet says. As this couldn't be tested,
+I've added a comment to try to reset the chip if the START doesn't help
+as suggested by Wolfram Sang.
+
+Signed-off-by: Enrik Berkhan <Enrik.Berkhan@ge.com>
+Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/i2c/algos/i2c-algo-pca.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/drivers/i2c/algos/i2c-algo-pca.c
++++ b/drivers/i2c/algos/i2c-algo-pca.c
+@@ -270,10 +270,21 @@ static int pca_xfer(struct i2c_adapter *
+               case 0x30: /* Data byte in I2CDAT has been transmitted; NOT ACK has been received */
+                       DEB2("NOT ACK received after data byte\n");
++                      pca_stop(adap);
+                       goto out;
+               case 0x38: /* Arbitration lost during SLA+W, SLA+R or data bytes */
+                       DEB2("Arbitration lost\n");
++                      /*
++                       * The PCA9564 data sheet (2006-09-01) says "A
++                       * START condition will be transmitted when the
++                       * bus becomes free (STOP or SCL and SDA high)"
++                       * when the STA bit is set (p. 11).
++                       *
++                       * In case this won't work, try pca_reset()
++                       * instead.
++                       */
++                      pca_start(adap);
+                       goto out;
+               case 0x58: /* Data byte has been received; NOT ACK has been returned */
diff --git a/queue-2.6.29/ne2k-pci-do-not-register-device-until-initialized.patch b/queue-2.6.29/ne2k-pci-do-not-register-device-until-initialized.patch
new file mode 100644 (file)
index 0000000..360e35c
--- /dev/null
@@ -0,0 +1,45 @@
+From 379b026ecc20c4657d37e40ead789f7f28f1a1c1 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Sat, 2 May 2009 13:52:13 -0700
+Subject: ne2k-pci: Do not register device until initialized.
+
+From: Lubomir Rintel <lkundrak@v3.sk>
+
+commit 379b026ecc20c4657d37e40ead789f7f28f1a1c1 upstream.
+
+Doing it in reverse order causes uevent to be sent before
+we have a MAC address, which confuses udev.
+
+Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
+Acked-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/ne2k-pci.c |    7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/ne2k-pci.c
++++ b/drivers/net/ne2k-pci.c
+@@ -373,18 +373,17 @@ static int __devinit ne2k_pci_init_one (
+       dev->ethtool_ops = &ne2k_pci_ethtool_ops;
+       NS8390_init(dev, 0);
++      memcpy(dev->dev_addr, SA_prom, 6);
++      memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
++
+       i = register_netdev(dev);
+       if (i)
+               goto err_out_free_netdev;
+-      for(i = 0; i < 6; i++)
+-              dev->dev_addr[i] = SA_prom[i];
+       printk("%s: %s found at %#lx, IRQ %d, %pM.\n",
+              dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq,
+              dev->dev_addr);
+-      memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
+-
+       return 0;
+ err_out_free_netdev:
index 149de8b3ce123d3727b5bddce953149012e8e150..35e9e1713e7d847c6867416f843b6e19b5895910 100644 (file)
@@ -7,3 +7,10 @@ usb-serial-ftdi_sio-fix-reference-counting-of-ftdi_private.patch
 usb-gadget-fix-utf-conversion-in-the-usbstring-library.patch
 alsa-hda-fix-line-in-on-mac-mini-core2-duo.patch
 asoc-fix-errors-in-wm8990.patch
+e1000-fix-virtualization-bug.patch
+hwmon-fix-w83782d-support.patch
+fix-for-enabling-branch-profiling-makes-sparse-unusable.patch
+i2c-algo-bit-fix-timeout-test.patch
+i2c-algo-pca-let-pca9564-recover-from-unacked-data-byte.patch
+dup2-fix-return-value-with-oldfd-newfd-and-invalid-fd.patch
+ne2k-pci-do-not-register-device-until-initialized.patch