Re: [PATCH net-next v2] net: mscc: ocelot: validate netdev belongs to switch in .netdev_to_port()

From: patchwork-bot+netdevbpf

Date: Tue Jun 09 2026 - 21:07:14 EST


Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Sat, 6 Jun 2026 20:52:44 +0800 you wrote:
> The .netdev_to_port() currently takes only a net_device and returns the
> port index, without verifying the netdev actually belongs to the switch
> being operated on. This can cause flower rule parsing to silently
> resolve to a wrong port on the local hardware.
>
> Update both implementations felix_netdev_to_port() and
> ocelot_netdev_to_port() to validate ownership. Also update the callers
> in ocelot_flower.c to pass through the ocelot context.
>
> [...]

Here is the summary with links:
- [net-next,v2] net: mscc: ocelot: validate netdev belongs to switch in .netdev_to_port()
https://git.kernel.org/netdev/net-next/c/ea07514700f7

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html