[kernel] r16356 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Sun Sep 26 14:33:50 UTC 2010
Author: benh
Date: Sun Sep 26 14:33:35 2010
New Revision: 16356
Log:
3c59x: Remove incorrect locking (Closes: #598103)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/3c59x-Remove-incorrect-locking-correct-doc.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/24
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Sat Sep 25 18:20:28 2010 (r16355)
+++ dists/sid/linux-2.6/debian/changelog Sun Sep 26 14:33:35 2010 (r16356)
@@ -28,6 +28,7 @@
- [hppa,ia64] mm: guard page for stacks that grow upwards (CVE-2010-2240)
- sctp: Do not reset the packet during sctp_packet_config()
(CVE-2010-3432)
+ * 3c59x: Remove incorrect locking (Closes: #598103)
[ Martin Michlmayr ]
* ARM: update mach types.
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/3c59x-Remove-incorrect-locking-correct-doc.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/3c59x-Remove-incorrect-locking-correct-doc.patch Sun Sep 26 14:33:35 2010 (r16356)
@@ -0,0 +1,58 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Mon, 30 Aug 2010 14:15:33 +0000
+Subject: [PATCH] 3c59x: Remove incorrect locking; correct documented lock hierarchy
+
+commit 24cd804d1dc60a74c53da983094df3516500c276 upstream.
+
+vortex_ioctl() was grabbing vortex_private::lock around its call to
+generic_mii_ioctl(). This is no longer necessary since there are more
+specific locks which the mdio_{read,write}() functions will obtain.
+Worse, those functions do not save and restore IRQ flags when locking
+the MII state, so interrupts will be enabled when generic_mii_ioctl()
+returns.
+
+Since there is currently no need for any function to call
+mdio_{read,write}() while holding another spinlock, do not change them
+to save and restore IRQ flags but remove the specification of ordering
+between vortex_private::lock and vortex_private::mii_lock.
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/3c59x.c | 5 +----
+ 1 files changed, 1 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
+index c685a55..a045559 100644
+--- a/drivers/net/3c59x.c
++++ b/drivers/net/3c59x.c
+@@ -647,7 +647,7 @@ struct vortex_private {
+ u16 io_size; /* Size of PCI region (for release_region) */
+
+ /* Serialises access to hardware other than MII and variables below.
+- * The lock hierarchy is rtnl_lock > lock > mii_lock > window_lock. */
++ * The lock hierarchy is rtnl_lock > {lock, mii_lock} > window_lock. */
+ spinlock_t lock;
+
+ spinlock_t mii_lock; /* Serialises access to MII */
+@@ -2984,7 +2984,6 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+ {
+ int err;
+ struct vortex_private *vp = netdev_priv(dev);
+- unsigned long flags;
+ pci_power_t state = 0;
+
+ if(VORTEX_PCI(vp))
+@@ -2994,9 +2993,7 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+
+ if(state != 0)
+ pci_set_power_state(VORTEX_PCI(vp), PCI_D0);
+- spin_lock_irqsave(&vp->lock, flags);
+ err = generic_mii_ioctl(&vp->mii, if_mii(rq), cmd, NULL);
+- spin_unlock_irqrestore(&vp->lock, flags);
+ if(state != 0)
+ pci_set_power_state(VORTEX_PCI(vp), state);
+
+--
+1.7.1
+
Modified: dists/sid/linux-2.6/debian/patches/series/24
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/24 Sat Sep 25 18:20:28 2010 (r16355)
+++ dists/sid/linux-2.6/debian/patches/series/24 Sun Sep 26 14:33:35 2010 (r16356)
@@ -63,3 +63,4 @@
+ bugfix/all/stable/2.6.32.23-rc1.patch
+ debian/input-Avoid-ABI-change-from-compat-support.patch
+ debian/mm-Avoid-ABI-change-in-2.6.32.23.patch
++ bugfix/all/3c59x-Remove-incorrect-locking-correct-doc.patch
More information about the Kernel-svn-changes
mailing list