Commit fd776979 authored by Michael Chan's avatar Michael Chan Committed by Jakub Kicinski
Browse files

bnxt_en: Fix RCU locking for ntuple filters in bnxt_srxclsrldel()



After looking up an ntuple filter from a RCU hash list, the
rcu_read_unlock() call should be made after reading the structure,
or after determining that the filter cannot age out (by aRFS).
The existing code was calling rcu_read_unlock() too early in
bnxt_srxclsrldel().

As suggested by Simon Horman, change the code to handle the error
case of fltr_base not found in the if condition.  The code looks
cleaner this way.

Fixes: 8d7ba028 ("bnxt_en: Add support for ntuple filter deletion by ethtool.")
Suggested-by: default avatarSimon Horman <horms@kernel.org>
Reported-by: default avatarJakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/netdev/20240104145955.5a6df702@kernel.org/


Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240105235439.28282-3-michael.chan@broadcom.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1ef4caca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment