Re: [PATCH] sched/core: fix illegal RCU from offline CPUs

From: Tetsuo Handa
Date: Mon Jan 13 2020 - 03:21:07 EST


On 2020/01/13 15:30, Qian Cai wrote:
>>> - mmdrop(mm);
>>> + smp_call_function_single(cpumask_first(cpu_online_mask),
>>> + (void (*)(void *))mmdrop, mm, 0);
>>
>> mmdrop() might sleep, but
>
> If that is the case, and then the commit e78a7614f387 (âidle: Prevent
> late-arriving interrupts from disrupting offlineâ) is incorrect because it
> will disable local irq before calling mmdrop() which will trigger
> the might_sleep() warning. Can you prove it?

Is commit 7283094ec3db318e ("kernel, oom: fix potential pgd_lock deadlock from
__mmdrop") about only softirq? Is it guaranteed that smp_call_function_single()
does not hit such race? Then just my overcareful...