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:Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by:
Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com> (cherry picked from commit 5097f2d0)
Loading
Please sign in to comment