diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-12-09 22:05:11 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-11 22:54:19 -0800 |
commit | ee28b30cbbe0b490f52ba222c9d392b99581545e (patch) | |
tree | b96fe44e1f99407ad5187d3192b838e7ab7168a5 /drivers | |
parent | 2f1a9f666751bdcf20de7c120b20c5d156b87cf7 (diff) | |
download | linux-ee28b30cbbe0b490f52ba222c9d392b99581545e.tar.bz2 |
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: 38caff5a445b ("r8169: handle all interrupt events in the hard irq handler")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 1fd01688d37b..209566f8097b 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -6469,7 +6469,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 && |