]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfrm: Use nested-BH locking for nat_keepalive_sk_ipv[46]
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 12 May 2025 09:27:27 +0000 (11:27 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 15 May 2025 13:23:31 +0000 (15:23 +0200)
commit9c607d4b6589d4d380a85784514bcf4cceee1e11
tree711222cc0a0c1ce377319c851585ed2e4bc2a7b3
parentb9eef3391de028fdd88fd7a2f81a4834fc98c9ac
xfrm: Use nested-BH locking for nat_keepalive_sk_ipv[46]

nat_keepalive_sk_ipv[46] is a per-CPU variable and relies on disabled BH
for its locking. Without per-CPU locking in local_bh_disable() on
PREEMPT_RT this data structure requires explicit locking.

Use sock_bh_locked which has a sock pointer and a local_lock_t. Use
local_lock_nested_bh() for locking. This change adds only lockdep
coverage and does not alter the functional behaviour for !PREEMPT_RT.

Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/20250512092736.229935-7-bigeasy@linutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/xfrm/xfrm_nat_keepalive.c