From: Jarek Poplawski Date: Tue, 30 Sep 2008 20:58:25 +0000 (+0000) Subject: lib8390: Fix locking in ei_poll (poll controller) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f47aeffd6089ed7a0cd18073e88cd505f188b0b7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git lib8390: Fix locking in ei_poll (poll controller) This lockdep warning: ================================= [ INFO: inconsistent lock state ] 2.6.27-rc7 #3 --------------------------------- inconsistent {in-softirq-W} -> {softirq-on-W} usage. syslogd/2474 [HC0[0]:SC0[0]:HE1:SE1] takes: (_xmit_ETHER#2){-+..}, at: [] netpoll_send_skb+0x132/0x190 ... is caused by unconditional local_irq_disable()/local_irq_enable() in disable_irq_lockdep()/enable_irq_lockdep() used by __ei_poll(). Since netconsole/netpoll always calls dev->poll_controller() with local irqs disabled, disable_irq()/enable_irq() instead is safe and enough (like e.g. in 3c509 or 8139xx drivers). Reported-and-tested-by: Bernard Pidoux F6BVP Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller --- diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c index 00d59ab2f8ac..f80dcc11fe26 100644 --- a/drivers/net/lib8390.c +++ b/drivers/net/lib8390.c @@ -530,9 +530,9 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id) #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