Thread (3 messages) 3 messages, 3 authors, 13d ago

Re: [PATCH net] net/sched: sch_teql: move rcu_read_lock()/spin_lock() from _bh variants

From: Paolo Abeni <pabeni@redhat.com>
Date: 2026-07-03 14:01:30

On 6/30/26 5:09 PM, Jamal Hadi Salim wrote:
This is a followup based on sashiko comments [1] on commit e5b811fe7931
("net/sched: sch_teql: Introduce slaves_lock to avoid race condition and UAF")

Use plain rcu_read_lock()/spin_lock() in teql_master_xmit() instead of the
_bh variants, since ndo_start_xmit is already invoked with BH disabled
by the core stack and the _bh primitives can warn in_hardirq() when xmit
is reached through netpoll or a softirq xmit path with hard IRQs disabled.

Moves rcu_read_lock() after restart: label + adds rcu_read_unlock() before
goto restart (fixes the unbounded RCU hold across retries)

[1] https://sashiko.dev/#/patchset/20260628111229.669751-1-jhs%40mojatatu.com
I'm adding a formal:

Fixes: commit e5b811fe7931 ("net/sched: sch_teql: Introduce slaves_lock to avoid race condition and UAF")

to try to avoid backports of the latter without this one.

/P
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help