lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67e75a68-7a03-46bb-ae40-b1a8f24c0b16@suse.cz>
Date: Tue, 14 Oct 2025 12:13:23 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Breno Leitao <leitao@...ian.org>,
 Kriish Sharma <kriish.sharma2006@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
 Juri Lelli <juri.lelli@...hat.com>,
 Vincent Guittot <vincent.guittot@...aro.org>,
 Dietmar Eggemann <dietmar.eggemann@....com>,
 Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
 Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
 linux-kernel@...r.kernel.org, david.hunter.linux@...il.com,
 skhan@...uxfoundation.org, Menglong Dong <menglong8.dong@...il.com>
Subject: Re: [PATCH] sched: remove unused cpumask variable in mm_cid_get()

On 10/14/25 11:56, Breno Leitao wrote:
> On Thu, Oct 09, 2025 at 07:48:18PM +0000, Kriish Sharma wrote:
>> The variable 'cpumask' in mm_cid_get() was assigned but never used,
>> causing the following build error with -Werror:
>> 
>> kernel/sched/sched.h: In function ‘mm_cid_get’:
>> kernel/sched/sched.h:3743:25: error: variable ‘cpumask’ set but not used [-Werror=unused-but-set-variable]
>>  3743 |         struct cpumask *cpumask;
>>       |                         ^~~~~~~
> 
> Thanks for the fix. I am hitting the same issue in my builds.

Let me add why this years old small issue became much more problematic in
6.18-rc1. When I want to test my own files I'm developing on with e.g. "make
W=1 mm/slub.o", the W=1 hits earlier in:

  CC      kernel/sched/rq-offsets.s
In file included from kernel/sched/rq-offsets.c:5:
kernel/sched/sched.h:3718:18: error: variable 'cpumask' set but not used
[-Werror,-Wunused-but-set-variable]
 3718 |         struct cpumask *cpumask;
      |                         ^
1 error generated.
make[2]: *** [scripts/Makefile.build:182: kernel/sched/rq-offsets.s] Error 1

So I can't get to the part where I test-compile my own code with W=1. So
fixing this ASAP in 6.18 would be appreciated, thanks!

FWIW I've bisected this to commit
378b7708194f ("sched: Make migrate_{en,dis}able() inline")

>> Removing the unused variable allows the kernel to compile without errors.
>> 
>> Signed-off-by: Kriish Sharma <kriish.sharma2006@...il.com>
> 
> Reviewed-by: Breno Leitao <leitao@...ian.org>

Acked-by: Vlastimil Babka <vbabka@...e.cz>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ