Re: [syzbot] WARNING in c_start
From: Tetsuo Handa
Date: Sat Oct 15 2022 - 20:35:28 EST
On 2022/10/16 9:28, Randy Dunlap wrote:
>> +/*
>> + * We want to avoid passing -1 as a valid cpu argument.
>> + * But we should not crash the kernel until all in-tree callers are fixed.
>> + */
>
> Why not say that any negative cpu argument is invalid?
Currently only -1 is accepted as exception.
>> if (n != -1)
>> cpumask_check(n);
>> + else
>> + report_negative_cpuid();
> Or is it OK to pass -2 as the cpu arg?
Passing -2 will hit WARN_ON_ONCE(cpu >= nr_cpumask_bits) path.