Re: [PATCH net v3] net: lwtunnel: disable BHs when required

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 16, 2025 at 06:07:16PM +0200, Justin Iurman wrote:
> v3:
> - removed unrelated code cleanups
> v2:
> - https://lore.kernel.org/netdev/20250415173239.39781-1-justin.iurman@xxxxxxxxx/
> v1:
> - https://lore.kernel.org/netdev/20250403083956.13946-1-justin.iurman@xxxxxxxxx/

Hi Justin,

There is probably no need to resend because of this,
but the changelog above belongs below the scissors ("---")
which will preserve it in mailing list archives and so on,
while excluding it from git history.

> 
> In lwtunnel_{output|xmit}(), dev_xmit_recursion() may be called in
> preemptible scope for PREEMPT kernels. This patch disables BHs before
> calling dev_xmit_recursion(). BHs are re-enabled only at the end, since
> we must ensure the same CPU is used for both dev_xmit_recursion_inc()
> and dev_xmit_recursion_dec() (and any other recursion levels in some
> cases) in order to maintain valid per-cpu counters.
> 
> Reported-by: Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx>
> Closes: https://lore.kernel.org/netdev/CAADnVQJFWn3dBFJtY+ci6oN1pDFL=TzCmNbRgey7MdYxt_AP2g@xxxxxxxxxxxxxx/
> Reported-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
> Closes: https://lore.kernel.org/netdev/m2h62qwf34.fsf@xxxxxxxxx/
> Fixes: 986ffb3a57c5 ("net: lwtunnel: fix recursion loops")
> Signed-off-by: Justin Iurman <justin.iurman@xxxxxxxxx>

I agree that this patch is in keeping with the solution discussed
at the links above.

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux