diff options
| author | 2026-03-24 09:36:01 +0100 | |
|---|---|---|
| committer | 2026-03-26 19:01:25 -0700 | |
| commit | 976ff48c2ac6e6b25b01428c9d7997bcd0fb2949 (patch) | |
| tree | 2cb2383083da99c3f04b66a1c558b9937fee8b5b /rust/kernel/ssh:/git@git.zx2c4.com | |
| parent | net: mana: Fix RX skb truesize accounting (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 'rust/kernel/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
