• Jarek Poplawski's avatar
    lib8390: Fix locking in ei_poll (poll controller) · f47aeffd
    Jarek Poplawski authored
    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: [<c0265562>] 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: default avatarBernard Pidoux F6BVP <f6bvp@free.fr>
    Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f47aeffd
lib8390.c 35.5 KB