Commit 5097f2d0 authored by Aleksandr Loktionov's avatar Aleksandr Loktionov Committed by sanglipeng
Browse files

i40e: fix accessing vsi->active_filters without holding lock

stable inclusion
from stable-v5.10.179
commit 72df55d3dc96aa5784254e2d86c0802ebe09cf5d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8C809

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=72df55d3dc96aa5784254e2d86c0802ebe09cf5d



--------------------------------

[ Upstream commit 8485d093 ]

Fix accessing vsi->active_filters without holding the mac_filter_hash_lock.
Move vsi->active_filters = 0 inside critical section and
move clear_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state) after the critical
section to ensure the new filters from other threads can be added only after
filters cleaning in the critical section is finished.

Fixes: 278e7d0b ("i40e: store MAC/VLAN filters in a hash with the MAC Address as key")
Signed-off-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent beb05f1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment