]> git.itanic.dy.fi Git - linux-stable/commit
net: phy: phy_device: Prevent nullptr exceptions on ISR
authorAndre Werner <andre.werner@systec-electronic.com>
Mon, 29 Jan 2024 13:55:04 +0000 (14:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 11:09:57 +0000 (13:09 +0200)
commit3419ee39e3d3162ab2ec9942bb537613ed5b6311
treea986f9de4a09eee7e82bb3f3e07b66f3786cb0e1
parentcce9340efedb7d4d25e43161a5ea3ff9bf2f181c
net: phy: phy_device: Prevent nullptr exceptions on ISR

[ Upstream commit 61c81872815f46006982bb80460c0c80a949b35b ]

If phydev->irq is set unconditionally, check
for valid interrupt handler or fall back to polling mode to prevent
nullptr exceptions in interrupt service routine.

Signed-off-by: Andre Werner <andre.werner@systec-electronic.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240129135734.18975-2-andre.werner@systec-electronic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/phy_device.c