Re: [PATCH 05/11] smp: Enable preemption early in smp_call_function_many_cond

From: Peter Zijlstra

Date: Thu Feb 05 2026 - 04:52:55 EST


On Tue, Feb 03, 2026 at 07:23:55PM +0800, Chuyi Zhou wrote:

> + /*
> + * Prevent the current CPU from going offline.
> + * Being migrated to another CPU and calling csd_lock_wait() may cause
> + * UAF due to smpcfd_dead_cpu() during the current CPU offline process.
> + */
> + migrate_disable();

This is horrible crap. migrate_disable() is *NOT* supposed to be used to
serialize cpu hotplug.