Bug 20512

Summary: Kernel locks up in macb interrupt handler on a flooded network
Product: Drivers Reporter: joshua.hoke
Component: NetworkAssignee: Deleted User (devnull+deleted_20230328)
Status: RESOLVED DUPLICATE    
Severity: normal CC: devnull+deleted_20230328
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27.x, 2.6.36-rc8 Subsystem:
Regression: No Bisected commit-id:

Description joshua.hoke 2010-10-18 15:08:03 UTC
On a busy network, the macb driver could get stuck in the interrupt handler, quickly triggering the watchdog, due to a confluence of factors:

 1. macb_poll re-enables interrupts unconditionally, even when it will be called again because it exhausted its rx budget
 2. macb_interrupt only disabled interrupts when it could scheduled macb_poll, but scheduling fails when macb_poll is already scheduled because it didn't call napi_complete
 3. macb_interrupt loops until the interrupt status register is clear, which will never happen if it doesn't disable the RX interrupt

Since macb_interrupt runs in interrupt context, this effectively locks up the machine, triggering the watchdog timer. (The RT kernel may have different behavior, but it's still a bug in the driver.)

This issue was readily reproducible on a flooded network with the 2.6.27.48 kernel. The same problems appear to still be in 2.6.36-rc8, so I am submitting this bug report.

The attached patches may need some cleanup but fix the problem for me. (The second one fixes a theoretical problem with the first.)
Comment 1 Deleted User 2010-11-18 17:06:07 UTC

*** This bug has been marked as a duplicate of bug 20732 ***