[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1+OUawGJDjh4DOJ@zn.tnic>
Date: Mon, 31 Oct 2022 09:58:57 +0100
From: Borislav Petkov <bp@...en8.de>
To: Andrew Jones <ajones@...tanamicro.com>
Cc: Yury Norov <yury.norov@...il.com>, x86@...nel.org,
linux-riscv <linux-riscv@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Albert Ou <aou@...s.berkeley.edu>,
Jonas Bonn <jonas@...thpole.se>,
Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
Stafford Horne <shorne@...il.com>,
openrisc@...ts.librecores.org,
Michael Ellerman <mpe@...erman.id.au>,
"open list:LINUX FOR POWERPC PA SEMI PWRFICIENT"
<linuxppc-dev@...ts.ozlabs.org>,
Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
linux-s390@...r.kernel.org
Subject: Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning
On Mon, Oct 31, 2022 at 09:06:04AM +0100, Andrew Jones wrote:
> The valid cpumask range is [0, nr_cpu_ids) and cpumask_next() always
> returns a CPU ID greater than its input, which results in its input
> range being [-1, nr_cpu_ids - 1). Ensure showing CPU info avoids
> triggering error conditions in cpumask_next() by stopping its loop
What error conditions?
What would happen if @n is outside of the valid range?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists