[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YXami/C2FzwDiKxp@hirez.programming.kicks-ass.net>
Date: Mon, 25 Oct 2021 14:43:55 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc: mingo@...hat.com, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] sched: Fix implicit type conversion
On Mon, Oct 25, 2021 at 12:19:37PM +0000, Jiasheng Jiang wrote:
> The variable 'n' is defined as ULONG. However in the cpumask_next(),
> it is used as INT.
> That is vulnerable and may cause overflow.
> For example, if the value of 'n' is (2^31 - 1), then it can pass the
That would need nr_cpu_ids to be that large. How's that going to happen?
Powered by blists - more mailing lists