summaryrefslogtreecommitdiff
path: root/drivers/net/phy/at803x.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-01-31 16:22:31 -0800
committerJakub Kicinski <kuba@kernel.org>2024-01-31 16:22:31 -0800
commit3a78983d2689de6b859e498c53db253411eff0ab (patch)
tree4c6839e9676234ad26d161ec019ec0f78727e31d /drivers/net/phy/at803x.c
parent96b93f08357c4cc858ec7543464f07e461e5713a (diff)
parent08b47dfdd6b8db8d1f68748ad7a35ff0aa7040f3 (diff)
Merge branch 'prevent-nullptr-exceptions-in-isr'
Andre Werner says: ==================== Prevent nullptr exceptions in ISR In case phydev->irq is modified unconditionally to a valid IRQ, handling the IRQ may lead to a nullptr exception if no interrupt handler is registered to the phy driver. phy_interrupt calls a phy_device->handle_interrupt unconditionally. And interrupts are enabled in phy_connect_direct if phydev->irq is not equal to PHY_POLL or PHY_MAC_INTERRUPT, so it does not check for a phy driver providing an ISR. Adding an additonal check for a valid interrupt handler in phy_attach_direct function, and falling back to polling mode if not, should prevent for such nullptr exceptions. Moreover, the ADIN1100 phy driver is extended with an interrupt handler for changes in the link status. ==================== Link: https://lore.kernel.org/r/20240129135734.18975-1-andre.werner@systec-electronic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/at803x.c')
0 files changed, 0 insertions, 0 deletions