[PATCH net] net: ethernet: mtk_ppe: avoid NULL deref when gmac0 is disabled
patchwork-bot+netdevbpf at kernel.org
patchwork-bot+netdevbpf at kernel.org
Thu Mar 26 19:10:07 PDT 2026
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba at kernel.org>:
On Tue, 24 Mar 2026 09:36:01 +0100 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net] net: ethernet: mtk_ppe: avoid NULL deref when gmac0 is disabled
https://git.kernel.org/netdev/net/c/976ff48c2ac6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
More information about the Linux-mediatek
mailing list