summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/drivers/net/hw/rss_api.py
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2025-07-15 17:08:06 +0200
committerPaolo Abeni <pabeni@redhat.com>2025-07-17 15:36:18 +0200
commitd4f6460a4bc5fa52c04a985b222a719a42c78be6 (patch)
tree02124d211082450e7c8c6a6c6e461eccb37fa900 /tools/testing/selftests/drivers/net/hw/rss_api.py
parente0c7e3154e042e2210b3a0b37e9129b52f3ae91c (diff)
ppp: Replace per-CPU recursion counter with lock-owner field
The per-CPU variable ppp::xmit_recursion is protecting against recursion due to wrong configuration of the ppp unit. The per-CPU variable relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. The ppp::xmit_recursion is used as a per-CPU boolean. The counter is checked early in the send routing and the transmit path is only entered if the counter is zero. Then the counter is incremented to avoid recursion. It used to detect recursion on channel::downl and ppp::wlock. Create a struct ppp_xmit_recursion and move the counter into it. Add local_lock_t to the struct and use local_lock_nested_bh() for locking. Due to possible nesting, the lock cannot be acquired unconditionally but it requires an owner field to identify recursion before attempting to acquire the lock. The counter is incremented and checked only after the lock is acquired. Since it functions as a boolean rather than a count, and its role is now superseded by the owner field, it can be safely removed. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/20250715150806.700536-2-bigeasy@linutronix.de Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/testing/selftests/drivers/net/hw/rss_api.py')
0 files changed, 0 insertions, 0 deletions