Subject: Re: [PATCH net-next 2/3] bnxt_en: Fix RCU locking for ntuple filters in bnxt_srxclsrldel()

From: Simon Horman <[email-masked]>
Date: Mon, 8 Jan 2024 10:21:13 +0000

On Fri, Jan 05, 2024 at 03:54:38PM -0800, Michael Chan wrote:
> 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: 8d7ba028aa9a ("bnxt_en: Add support for ntuple filter deletion by ethtool.")
> Suggested-by: Simon Horman <[email-masked]>
> Reported-by: Jakub Kicinski <[email-masked]>
> Link: https://lore.kernel.org/netdev/[email-masked]/
> Signed-off-by: Michael Chan <[email-masked]>

Thanks Michael,

I agree that this addresses the issue flagged at the Link above.
That it is a bug-fix, and should have a Fixes tag.
And that as the cited commit has not propagated beyond net-next
it is appropriate to target this patch at net-next.

FWIIW, I might have separated the bug fix from the code re-arrangement that
I suggested. But perhaps that is over doing things as the patch is for
net-next anyway.

Reviewed-by: Simon Horman <[email-masked]>