From: Thomas Gleixner <tglx@linutronix.de>
To: Muchun Song <songmuchun@bytedance.com>,
peterz@infradead.org, mingo@kernel.org, bigeasy@linutronix.de,
namit@vmware.com
Cc: linux-kernel@vger.kernel.org, Muchun Song <songmuchun@bytedance.com>
Subject: Re: [PATCH v2] smp: Fix a potential usage of stale nr_cpus
Date: Sun, 19 Jul 2020 14:09:35 +0200 [thread overview]
Message-ID: <87k0yzoge8.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20200718061144.56095-1-songmuchun@bytedance.com>
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
prev parent reply other threads:[~2020-07-19 12:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-18 6:11 Muchun Song
2020-07-19 12:09 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0yzoge8.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namit@vmware.com \
--cc=peterz@infradead.org \
--cc=songmuchun@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®