Skip to content

Commit ee28b30

Browse files
hkallweitdavem330
authored andcommitted
r8169: fix crash if CONFIG_DEBUG_SHIRQ is enabled
If CONFIG_DEBUG_SHIRQ is enabled __free_irq() intentionally fires a spurious interrupt. This interrupt causes a crash because tp->dev->phydev is NULL at that time. Fixes: 38caff5 ("r8169: handle all interrupt events in the hard irq handler") Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2f1a9f6 commit ee28b30

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/realtek

1 file changed

+1
-1
lines changed

drivers/net/ethernet/realtek/r8169.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6469,7 +6469,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
64696469
goto out;
64706470
}
64716471

6472-
if (status & LinkChg)
6472+
if (status & LinkChg && tp->dev->phydev)
64736473
phy_mac_interrupt(tp->dev->phydev);
64746474

64756475
if (unlikely(status & RxFIFOOver &&

0 commit comments

Comments
 (0)