Messages in this thread | | | From | Thomas Gleixner <> | Subject | Re: [PATCH v2] smp: Fix a potential usage of stale nr_cpus | Date | Sun, 19 Jul 2020 14:09:35 +0200 |
| |
Muchun Song <songmuchun@bytedance.com> writes:
> When the cmdline of "nr_cpus" is not valid, the @nr_cpu_ids is assigned > a stale value. The nr_cpus is only valid when get_option() return 1. So > check the return value to prevent this. > > Signed-off-by: Muchun Song <songmuchun@bytedance.com> > --- > changelog in v2: > 1) Rework the commit log. > 2) Rework the return value check.
I asked:
>> So why fixing it just half and why returning '0' aka success if the >> parameter is bogus?
And this still returns 0 if the parameter is bogus or malformatted....
Thanks,
tglx
| |