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:Simon Horman <horms@kernel.org> Reported-by:
Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/netdev/20240104145955.5a6df702@kernel.org/ Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Reviewed-by:
Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20240105235439.28282-3-michael.chan@broadcom.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
Loading
Please sign in to comment