Bug 201933
Summary: | r8169 hangs with Oops/null pointer deref on shutdown | ||
---|---|---|---|
Product: | Drivers | Reporter: | Andy Furniss (adf.lists) |
Component: | Network | Assignee: | Stephen Hemminger (stephen) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | hkallweit1 |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 4.20 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
dmesg from 4.19 which works OK
dmesg on linus master showing issue triggerd by ip li set down |
Description
Andy Furniss
2018-12-08 18:20:01 UTC
Created attachment 279905 [details]
dmesg from 4.19 which works OK
dmesg from 4.19 which works OK - just to give more info about system
Created attachment 279907 [details]
dmesg on linus master showing issue triggerd by ip li set down
dmesg on linus master showing issue triggerd by ip li set down
To make sure I interpret the stack trace correctly: Is CONFIG_DEBUG_SHIRQ set on your system? Because in this case __free_irq() executes the irq handler after freeing the irq. Yes, CONFIG_DEBUG_SHIRQ=y I have no idea why it originally ended up set, this is an old LFS setup and stuff like that gets carried forward over many kernel versions. I would expect the following to fix the issue, can you test it? --- drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index bb1847fd6..8462553e3 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -6414,7 +6414,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) goto out; } - if (status & LinkChg) + if (status & LinkChg && tp->dev->phydev) phy_mac_interrupt(tp->dev->phydev); if (unlikely(status & RxFIFOOver && -- 2.19.2 FWIW, disabling CONFIG_DEBUG_SHIRQ should also fix the issue for you. The patch fixes it, thanks. (In reply to Heiner Kallweit from comment #6) > FWIW, disabling CONFIG_DEBUG_SHIRQ should also fix the issue for you. Will try this tomorrow. (In reply to Andy Furniss from comment #8) > (In reply to Heiner Kallweit from comment #6) > > FWIW, disabling CONFIG_DEBUG_SHIRQ should also fix the issue for you. > > Will try this tomorrow. Can confirm this also works for me. Fixed with ee28b30cbbe0 ("r8169: fix crash if CONFIG_DEBUG_SHIRQ is enabled"). Thanks, I guess this has propagated by now so closing. |