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

From: Paolo Abeni

Date: Thu Dec 18 2025 - 07:25:59 EST


On 12/9/25 1:48 PM, Jiayuan Chen wrote:
> @@ -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