From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Fw: Badness in local_bh_enable at kernel/softirq.c:119 Date: Mon, 29 Sep 2003 14:36:42 -0700 Sender: netdev-bounce@oss.sgi.com Message-ID: <20030929143642.18b491ba.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: cramerj@intel.com, scott.feldman@intel.com Return-path: To: netdev@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org Badness in local_bh_enable at kernel/softirq.c:119 Call Trace: [] local_bh_enable+0x93/0x96 [] xprt_write_space+0xfb/0x158 [] sock_wfree+0x48/0x4a [] sock_wfree+0x0/0x4a [] __kfree_skb+0x49/0xda [] __delay+0x14/0x18 [] e1000_clean_tx_irq+0x1f0/0x1f6 [] e1000_tx_flush+0x69/0xd0 [] e1000_watchdog+0xba/0x340 [] scheduler_tick+0x5a6/0x5ac [] e1000_watchdog+0x0/0x340 [] run_timer_softirq+0xe8/0x1cc [] smp_apic_timer_interrupt+0x147/0x14c [] do_softirq+0xc9/0xcc [] local_bh_enable+0x68/0x96 [] rt_run_flush+0xa4/0xda [] fib_netdev_event+0x57/0x8b [] notifier_call_chain+0x27/0x40 [] netdev_state_change+0x37/0x52 [] linkwatch_run_queue+0xce/0xe2 [] linkwatch_event+0x26/0x2c [] worker_thread+0x212/0x314 [] linkwatch_event+0x0/0x2c [] default_wake_function+0x0/0x2e [] ret_from_fork+0x6/0x14 [] default_wake_function+0x0/0x2e [] worker_thread+0x0/0x314 [] kernel_thread_helper+0x5/0xc It hapenned while NFS was having trouble communicating with the server. Due to this: spin_lock_irqsave(&netdev->xmit_lock, flags); e1000_tx_flush(adapter); spin_unlock_irqrestore(&netdev->xmit_lock, flags); I'd have thought that calling kfree_skb() under xmit_lock would be a big ranking bug.. But the reason why the kernel dropped this backtrace is that local_bh_enable() will unconditionally enable interrupts, so this driver is exposed to a deadlock. Other parts of the kernel do not take xmit_lock with irq's disabled, so a simple spin_lock() here may suffice. Oh, it's taking xmit_lock in a timer handler. I give up.