From: Arjan van de Ven Date: Wed, 5 Jul 2006 13:00:40 +0000 (+0200) Subject: [PATCH] 8139too deadlock fix X-Git-Tag: v2.6.18-rc2~255^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bce305f4fe779f29d99d414685243f5da0803254;p=pandora-kernel.git [PATCH] 8139too deadlock fix > stack backtrace: > [] rtl8139_start_xmit+0xd9/0xff [8139too] > [] netpoll_send_skb+0x98/0xea This seems to be a real deadlock... So netpoll_send_skb takes the _xmit_lock, which is all nitty gritty but then rtl8139_start_xmit comes around while that lock is taken, and does spin_unlock_irq(&tp->lock); which.. enables interrupts and softirqs; this is quite bad because the xmit lock is taken in softirq context for the watchdog like this: [] _spin_lock+0x23/0x32 [] dev_watchdog+0x14/0xb1 [] run_timer_softirq+0xf2/0x14a [] __do_softirq+0x55/0xb0 [] do_softirq+0x58/0xbd Which would deadlock now that the spin_unlock_irq() has enabled irqs/softirqs while the _xmit_lock is still held. The patch below turns this into a irqsave/irqrestore pair so that interrupts don't get enabled unconditionally. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed