Thread (3 messages) 3 messages, 3 authors, 2025-12-18

Re: [PATCH net-next v1] ipv6: fix a BUG in rt6_get_pcpu_route() under PREEMPT_RT

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-12-18 21:04:41
Also in: linux-rt-devel, lkml

On Thu, 18 Dec 2025 13:25:31 +0100
Paolo Abeni [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help