summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSven Eckelmann (Plasma Cloud) <se@simonwunderlich.de>2026-03-24 09:36:01 +0100
committerJakub Kicinski <kuba@kernel.org>2026-03-26 19:01:25 -0700
commit976ff48c2ac6e6b25b01428c9d7997bcd0fb2949 (patch)
tree2cb2383083da99c3f04b66a1c558b9937fee8b5b /include
parentf73896b4197ed53cf0894657c899265ef7c86b7a (diff)
net: ethernet: mtk_ppe: avoid NULL deref when gmac0 is disabled
If the gmac0 is disabled, the precheck for a valid ingress device will cause a NULL pointer deref and crash the system. This happens because eth->netdev[0] will be NULL but the code will directly try to access netdev_ops. Instead of just checking for the first net_device, it must be checked if any of the mtk_eth net_devices is matching the netdev_ops of the ingress device. Cc: stable@vger.kernel.org Fixes: 73cfd947dbdb ("net: ethernet: mtk_eth_soc: ppe: prevent ppe update for non-mtk devices") Signed-off-by: Sven Eckelmann (Plasma Cloud) <se@simonwunderlich.de> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260324-wed-crash-gmac0-disabled-v1-1-3bc388aee565@simonwunderlich.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions