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: Paolo Abeni <pabeni@redhat.com>
Date: 2025-12-18 12:25:37
Also in: linux-rt-devel, lkml

On 12/9/25 1:48 PM, Jiayuan Chen wrote:
quoted hunk ↗ jump to hunk
@@ -2299,11 +2308,13 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
 	} else {
 		/* Get a percpu copy */
 		local_bh_disable();
+		migrate_disable();
 		rt = rt6_get_pcpu_route(&res);
 
 		if (!rt)
 			rt = rt6_make_pcpu_route(net, &res);
 
+		migrate_enable();
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

Side note: this patch looks suitable for the 'net' tree, please change
the subj prefix accordingly in the next revision.

Cheers,

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