Skip to content
Commit 59fe6517 authored by Oleksij Rempel's avatar Oleksij Rempel Committed by Paolo Abeni
Browse files

net: dsa: microchip: Fix uninitialized var in ksz9477_acl_move_entries()



Address an issue in ksz9477_acl_move_entries() where, in the scenario
(src_idx == dst_idx), ksz9477_validate_and_get_src_count() returns 0,
leading to usage of uninitialized src_count and dst_count variables,
which causes undesired behavior as it attempts to move ACL entries
around.

Fixes: 002841be ("net: dsa: microchip: Add partial ACL support for ksz9477 switches")
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Suggested-by: default avatarVladimir Oltean <olteanv@gmail.com>
Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20231006115822.144152-1-o.rempel@pengutronix.de


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent c41a38ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment