lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 15 Jan 2008 14:23:26 -0800
From:	Frank Rowand <frank.rowand@...sony.com>
To:	p_gortmaker@...oo.com
Cc:	netdev@...r.kernel.org
Subject: [PATCH] 8390: fix CONFIG_LOCKDEP error, 2.6.24-rc7

From: Frank Rowand <frank.rowand@...sony.com>

Turning on CONFIG_LOCKDEP for CONFIG_PREEMPT invokes a path which may
sleep with IRQs disabled.  Change disable_irq_nosync_lockdep() to
disable_irq_nosync(), etc.  Note the comment near the top of
drivers/net/lib8390.c, which is an lkml email from Alan Cox, pre-saging
the need of this patch.

Signed-off-by: Frank Rowand <frank.rowand@...sony.com>
---
 drivers/net/lib8390.c |   14 	7 +	7 -	0 !
 1 files changed, 7 insertions(+), 7 deletions(-)

Index: linux-2.6.24-rc5/drivers/net/lib8390.c
===================================================================
--- linux-2.6.24-rc5.orig/drivers/net/lib8390.c
+++ linux-2.6.24-rc5/drivers/net/lib8390.c
@@ -284,7 +284,7 @@ static void ei_tx_timeout(struct net_dev
 
 	/* Ugly but a reset can be slow, yet must be protected */
 
-	disable_irq_nosync_lockdep(dev->irq);
+	disable_irq_nosync(dev->irq);
 	spin_lock(&ei_local->page_lock);
 
 	/* Try to restart the card.  Perhaps the user has fixed something. */
@@ -292,7 +292,7 @@ static void ei_tx_timeout(struct net_dev
 	__NS8390_init(dev, 1);
 
 	spin_unlock(&ei_local->page_lock);
-	enable_irq_lockdep(dev->irq);
+	enable_irq(dev->irq);
 	netif_wake_queue(dev);
 }
 
@@ -334,7 +334,7 @@ static int ei_start_xmit(struct sk_buff 
 	 *	Slow phase with lock held.
 	 */
 
-	disable_irq_nosync_lockdep_irqsave(dev->irq, &flags);
+	disable_irq_nosync(dev->irq);
 
 	spin_lock(&ei_local->page_lock);
 
@@ -373,7 +373,7 @@ static int ei_start_xmit(struct sk_buff 
 		netif_stop_queue(dev);
 		ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 		spin_unlock(&ei_local->page_lock);
-		enable_irq_lockdep_irqrestore(dev->irq, &flags);
+		enable_irq(dev->irq);
 		ei_local->stat.tx_errors++;
 		return 1;
 	}
@@ -414,7 +414,7 @@ static int ei_start_xmit(struct sk_buff 
 	ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 
 	spin_unlock(&ei_local->page_lock);
-	enable_irq_lockdep_irqrestore(dev->irq, &flags);
+	enable_irq(dev->irq);
 
 	dev_kfree_skb (skb);
 	ei_local->stat.tx_bytes += send_length;
@@ -530,9 +530,9 @@ static irqreturn_t __ei_interrupt(int ir
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void __ei_poll(struct net_device *dev)
 {
-	disable_irq_lockdep(dev->irq);
+	disable_irq(dev->irq);
 	__ei_interrupt(dev->irq, dev);
-	enable_irq_lockdep(dev->irq);
+	enable_irq(dev->irq);
 }
 #endif
 



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ