[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250421134443.GG2789685@horms.kernel.org>
Date: Mon, 21 Apr 2025 14:44:43 +0100
From: Simon Horman <horms@...nel.org>
To: Justin Iurman <justin.iurman@...ege.be>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, kuniyu@...zon.com,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
Eduard Zingerman <eddyz87@...il.com>, bpf <bpf@...r.kernel.org>,
Stanislav Fomichev <stfomichev@...il.com>,
Sebastian Sewior <bigeasy@...utronix.de>,
Andrea Mayer <andrea.mayer@...roma2.it>,
Stefano Salsano <stefano.salsano@...roma2.it>,
Paolo Lungaroni <paolo.lungaroni@...roma2.it>
Subject: Re: [PATCH net v3] net: lwtunnel: disable BHs when required
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@uliege.be/
> v1:
> - https://lore.kernel.org/netdev/20250403083956.13946-1-justin.iurman@uliege.be/
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@...il.com>
> Closes: https://lore.kernel.org/netdev/CAADnVQJFWn3dBFJtY+ci6oN1pDFL=TzCmNbRgey7MdYxt_AP2g@mail.gmail.com/
> Reported-by: Eduard Zingerman <eddyz87@...il.com>
> Closes: https://lore.kernel.org/netdev/m2h62qwf34.fsf@gmail.com/
> Fixes: 986ffb3a57c5 ("net: lwtunnel: fix recursion loops")
> Signed-off-by: Justin Iurman <justin.iurman@...ege.be>
I agree that this patch is in keeping with the solution discussed
at the links above.
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists