Re: [PATCH net-next v1] ipv6: fix a BUG in rt6_get_pcpu_route() under PREEMPT_RT
From: Steven Rostedt
Date: Thu Dec 18 2025 - 16:04:41 EST
On Thu, 18 Dec 2025 13:25:31 +0100
Paolo Abeni <pabeni@xxxxxxxxxx> wrote:
> AFAICS, this part is not needed: local_bh_disable() ensures migrating is
> already disabled, if !CONFIG_PREEMPT_RT_NEEDS_BH_LOCK or preemption is
> disabled, when CONFIG_PREEMPT_RT_NEEDS_BH_LOCK==y
As the code has this:
/* First entry of a task into a BH disabled section? */
if (!current->softirq_disable_cnt) {
if (preemptible()) {
if (IS_ENABLED(CONFIG_PREEMPT_RT_NEEDS_BH_LOCK))
local_lock(&softirq_ctrl.lock);
else
migrate_disable();
/* Required to meet the RCU bottomhalf requirements. */
rcu_read_lock();
} else {
DEBUG_LOCKS_WARN_ON(this_cpu_read(softirq_ctrl.cnt));
}
}
It looks as though migration will always be disabled (local_lock() also
disables migration). It will warn if preemption is disabled.
But yeah, the added migrate_disable() is not needed.
-- Steve