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: <aMrlizyqkQ9Zsrz4@localhost.localdomain>
Date: Wed, 17 Sep 2025 18:44:59 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Gabriele Monaco <gmonaco@...hat.com>
Cc: linux-kernel@...r.kernel.org,
	Anna-Maria Behnsen <anna-maria@...utronix.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Waiman Long <longman@...hat.com>, Yury Norov <yury.norov@...il.com>
Subject: Re: [PATCH v13 8/9] cpumask: Add initialiser to use cleanup helpers

Le Wed, Sep 17, 2025 at 06:19:57PM +0200, Gabriele Monaco a écrit :
> From: Yury Norov <yury.norov@...il.com>
> 
> Now we can simplify a code that allocates cpumasks for local needs.
> 
> Automatic variables have to be initialized at declaration, or at least
> before any possibility for the logic to return, so that compiler
> wouldn't try to call an associate destructor function on a random stack
> number.
> 
> Because cpumask_var_t, depending on the CPUMASK_OFFSTACK config, is
> either a pointer or an array, we have to have a macro for initialization.
> 
> So define a CPUMASK_VAR_NULL macro, which allows to init struct cpumask
> pointer with NULL when CPUMASK_OFFSTACK is enabled, and effectively a
> no-op when CPUMASK_OFFSTACK is disabled.
> 
> Signed-off-by: Yury Norov <yury.norov@...il.com>
> Signed-off-by: Gabriele Monaco <gmonaco@...hat.com>

Reviewed-by: Frederic Weisbecker <frederic@...nel.org>

-- 
Frederic Weisbecker
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ