]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ila: block BH in ila_output()
authorEric Dumazet <edumazet@google.com>
Fri, 31 May 2024 13:26:35 +0000 (13:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Jul 2024 08:33:41 +0000 (10:33 +0200)
commit7435bd2f84a25aba607030237261b3795ba782da
treead48ce3918290a0946c64d55c075c3db757b233a
parentce0368a52554d213c5cd447ba786b54390a845e1
ila: block BH in ila_output()

[ Upstream commit cf28ff8e4c02e1ffa850755288ac954b6ff0db8c ]

As explained in commit 1378817486d6 ("tipc: block BH
before using dst_cache"), net/core/dst_cache.c
helpers need to be called with BH disabled.

ila_output() is called from lwtunnel_output()
possibly from process context, and under rcu_read_lock().

We might be interrupted by a softirq, re-enter ila_output()
and corrupt dst_cache data structures.

Fix the race by using local_bh_disable().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/r/20240531132636.2637995-5-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/ila/ila_lwt.c