Thread (1 message) 1 message, 1 author, 2025-12-28

Re: [PATCH net v3] net: mscc: ocelot: Fix crash when adding interface under a lag

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2025-12-28 19:41:02
Also in: lkml

On Thu, Dec 25, 2025 at 08:36:17PM +0000, Jerry Wu wrote:
Commit 15faa1f67ab4 ("lan966x: Fix crash when adding interface under a lag")
fixed a similar issue in the lan966x driver caused by a NULL pointer dereference.
The ocelot_set_aggr_pgids() function in the ocelot driver has similar logic
and is susceptible to the same crash.

This issue specifically affects the ocelot_vsc7514.c frontend, which leaves
unused ports as NULL pointers. The felix_vsc9959.c frontend is unaffected as
it uses the DSA framework which registers all ports.

Fix this by checking if the port pointer is valid before accessing it.

Fixes: 528d3f190c98 ("net: mscc: ocelot: drop the use of the "lags" array")
Signed-off-by: Jerry Wu <redacted>
---
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help