]> www.infradead.org Git - nvme.git/commit
net/tcp_sigpool: Use nested-BH locking for sigpool_scratch.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 20 Jun 2024 13:21:55 +0000 (15:21 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 24 Jun 2024 23:41:22 +0000 (16:41 -0700)
commit585aa621af6cd11d3d6f830965af3e45ee79ea51
tree4974e3703e095ffcc2f0e2e11036b4c02a9e7cf9
parentbdacf3e34945232037979b977d7f409f734a7226
net/tcp_sigpool: Use nested-BH locking for sigpool_scratch.

sigpool_scratch 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.

Make a struct with a pad member (original sigpool_scratch) and a
local_lock_t and use local_lock_nested_bh() for locking. This change
adds only lockdep coverage and does not alter the functional behaviour
for !PREEMPT_RT.

Cc: David Ahern <dsahern@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/20240620132727.660738-6-bigeasy@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp_sigpool.c