Thread (23 messages) 23 messages, 4 authors, 2022-11-03

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

From: Borislav Petkov <bp@alien8.de>
Date: 2022-10-31 08:59:15
Also in: linux-riscv, linux-s390, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help