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] [day] [month] [year] [list]
Message-ID: <Z_ORf1lLqs7UuWY2@smile.fi.intel.com>
Date: Mon, 7 Apr 2025 11:49:03 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
	Waiman Long <longman@...hat.com>, Boqun Feng <boqun.feng@...il.com>,
	Vicentiu Galanopulo <vicentiu.galanopulo@...ote-tech.co.uk>,
	Will Deacon <will@...nel.org>, linux-kernel@...r.kernel.org,
	Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH v4] locking/mutex: Mark devm_mutex_init() as __must_check

On Mon, Apr 07, 2025 at 09:46:47AM +0200, Thomas Weißschuh wrote:
> Even if it's not critical, the avoidance of checking the error code
> from devm_mutex_init() call today diminishes the point of using the devm
> variant of it. Tomorrow it may even leak something. Enforce all callers
> checking the return value through the compiler.
> 
> As devm_mutex_init() itself is a macro, it can not be annotated
> directly. Annotate __devm_mutex_init() instead.
> Unfortunately __must_check/warn_unused_result don't propagate through
> statement expression. So move the statement expression into the argument
> list of the call to __devm_mutex_init() through a helper macro.

FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ