diff options
| author | David Yang <mmyangfl@gmail.com> | 2026-06-06 15:52:44 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-10 03:54:34 +0300 |
| commit | ea07514700f7a5125db67c9d1cbfb06e65c30a07 (patch) | |
| tree | a074f7cc0f5ea9c6efecf2182f876b1418273348 /scripts/patch-kernel | |
| parent | 53a65db20a4f3fe6c01b1f789f9eae6b1244910f (diff) | |
| download | linux-ea07514700f7a5125db67c9d1cbfb06e65c30a07.tar.xz | |
net: mscc: ocelot: validate netdev belongs to switch in .netdev_to_port()
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.
Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://patch.msgid.link/20260606125247.305167-1-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions
