diff options
| author | David Yang <mmyangfl@gmail.com> | 2026-05-30 03:39:14 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-03 00:35:56 +0300 |
| commit | cfa5274a5dc2a23b957da5dc806d2ac0c7a66af0 (patch) | |
| tree | f42494f65427c6c4cf571c4855ea0bdcd548cf2f /include/linux/init_task.h | |
| parent | d20687818f46206fa7a63bc01901ac2074982b57 (diff) | |
| download | linux-cfa5274a5dc2a23b957da5dc806d2ac0c7a66af0.tar.xz | |
net: dsa: sja1105: flower: reject cross-chip redirect
dsa_port_from_netdev() may return a valid port from a different switch
chip. Programming another chip's port index into the local hardware
causes redirection to the wrong port, or an out-of-bounds access if the
index exceeds the local chip's port count.
Apply a minimal fix that adds a check to catch this case and adjusts the
extack message. When cls->common.skip_sw is not set, the operation could
instead redirect to the upstream port and let the software or upstream
switch(es) handle the forward, but that is not addressed here.
Signed-off-by: David Yang <mmyangfl@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20260530003940.2000994-1-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/init_task.h')
0 files changed, 0 insertions, 0 deletions
