Bug 1902
Summary: | Kernel panic in drivers/net/fealnx.c interrupt handler. | ||
---|---|---|---|
Product: | Drivers | Reporter: | Andreas Henriksson (andreas) |
Component: | Network | Assignee: | Jeff Garzik (jgarzik) |
Status: | CLOSED CODE_FIX | ||
Severity: | high | CC: | romieu |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.1 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Andreas Henriksson
2004-01-18 03:10:29 UTC
Afaiks, np->{free_tx_count/really_tx_count} update in start_xmit is not atomic wrt the irq handler and the irq handler updates these variables as well. So we could have: - start_xmit reads really_tx_count (first step to update really_tx_count); - first tx irq takes place in and updates really_tx_count - start_xmit ends updating really_tx_count, ignoring the value set in the irq handler - second tx irq takes place and reads an erroneously high really_tx_count value - <censored> Can you try to disable interrupts around the two following instructions in start_xmit: --np->free_tx_count; ++np->really_tx_count; PS: please Cc: me on followup I've been testing out a fealnx card in my workstation for about one week now and haven't had any kernel panic when using spin_lock_irq(&np->lock) and spin_unlock_irq(&np->lock) in the start_tx function as described by Francois Romieu (who also suggested changing it to spin_{,un}lock_irqsave(&np->lock, flags).. ). I'm changing it to RESOLVED and continue testing (since my p166 could live about 3 weeks before getting a kernel panic).... Francois Romieu also suggested a couple of ways to stress-test the driver which I'll try "really soon"<tm> ... I might also fire up my p166 again and test it before submitting a patch (unless some skilled person steps forward and deems this at really trivial and sends a patch to Linus or akpm). // Andreas Henriksson (andreas@fjortis.info) Nice explanation, but on x86 uniprocessor it can't happen. Andreas' machine is UP AFAIK. Bzzzt. It can happen on uniprocessor as well if interruptions are not disabled. |