Vladimir Oltean
1699b4d502
net: dsa: fix NULL pointer dereference in dsa_port_reset_vlan_filtering
...
The "ds" iterator variable used in dsa_port_reset_vlan_filtering() ->
dsa_switch_for_each_port() overwrites the "dp" received as argument,
which is later used to call dsa_port_vlan_filtering() proper.
As a result, switches which do enter that code path (the ones with
vlan_filtering_is_global=true) will dereference an invalid dp in
dsa_port_reset_vlan_filtering() after leaving a VLAN-aware bridge.
Use a dedicated "other_dp" iterator variable to avoid this from
happening.
Fixes: d0004a020b ("net: dsa: remove the "dsa_to_port in a loop" antipattern from the core")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2022-07-18 20:14:23 -07:00
..
2022-02-04 14:15:11 -08:00
2022-05-27 11:05:29 +02:00
2021-11-19 11:23:23 +00:00
2022-07-09 12:26:59 +01:00
2022-04-06 13:45:26 +01:00
2022-04-28 13:08:15 -07:00
2022-06-15 13:00:22 +01:00
2022-05-22 21:51:54 +01:00
2022-07-05 13:20:03 -07:00
2022-05-23 16:07:14 -07:00
2022-02-25 09:36:06 +01:00
2022-06-27 19:23:27 +02:00
2022-04-06 13:45:26 +01:00
2022-07-04 10:33:39 +02:00
2022-05-25 20:45:13 +02:00
2022-07-18 12:21:54 +01:00
2022-03-03 08:01:55 -08:00
2022-06-16 11:07:59 -07:00
2022-05-17 18:03:23 -07:00
2021-01-27 17:04:12 -08:00
2022-07-18 20:14:23 -07:00
2022-04-07 21:04:03 -07:00
2022-06-17 20:22:16 -07:00
2022-03-11 23:17:24 -08:00
2022-04-28 13:08:15 -07:00
2021-01-27 17:04:12 -08:00
2022-07-18 12:21:54 +01:00
2022-07-18 12:21:54 +01:00
2022-04-06 13:45:26 +01:00
2021-12-29 08:48:14 -08:00
2022-06-01 17:44:04 -07:00
2022-06-08 10:56:43 -07:00
2022-04-15 14:27:24 -07:00
2021-06-08 16:31:25 -07:00
2022-03-25 16:55:41 -07:00
2022-07-11 10:36:55 +02:00
2022-04-30 20:29:47 +02:00
2022-05-25 12:22:58 -07:00
2022-04-07 21:06:41 -07:00
2022-07-11 11:31:38 +01:00
2022-06-23 20:51:06 -07:00
2022-07-15 11:49:55 +01:00
2022-03-21 10:59:11 +00:00
2022-05-12 16:15:30 -07:00
2022-04-06 13:45:26 +01:00
2022-05-28 15:28:47 +01:00
2020-06-14 01:57:21 +09:00
2022-06-23 11:44:01 +02:00
2022-06-02 10:15:05 -07:00
2022-04-12 15:00:25 +02:00
2021-03-14 15:00:43 -07:00
2022-04-06 13:45:26 +01:00
2022-05-24 12:40:28 -03:00
2022-03-18 13:09:17 +02:00
2022-07-06 19:49:11 -07:00
2022-05-23 21:19:17 -07:00
2022-07-06 12:44:39 +01:00
2022-07-15 11:49:55 +01:00
2022-07-18 12:21:54 +01:00
2021-11-09 01:05:28 +01:00
2022-07-02 11:20:56 -07:00
2022-02-24 21:31:43 -08:00
2022-06-29 13:49:06 +01:00
2022-07-18 11:33:07 +01:00
2022-06-07 12:07:46 +02:00
2022-05-28 11:39:01 -07:00
2022-06-29 11:43:15 +02:00
2022-05-10 11:59:22 +02:00
2022-06-28 22:49:04 +02:00
2022-07-15 11:49:55 +01:00
2021-06-03 15:13:56 -07:00
2021-06-11 12:55:28 -07:00
2022-03-03 09:55:28 +00:00
2022-06-02 10:15:05 -07:00
2021-07-29 15:06:49 +01:00
2022-06-23 20:56:23 -07:00
2021-11-09 10:02:50 -08:00