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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240730154924.GF5334@ZenIV>
Date: Tue, 30 Jul 2024 16:49:24 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Olaf Hering <olaf@...fle.de>
Cc: Deepa Dinamani <deepa.kernel@...il.com>,
	Jeff Layton <jlayton@...nel.org>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>
Subject: Re: [PATCH v1] mount: handle OOM on mnt_warn_timestamp_expiry

On Tue, Jul 30, 2024 at 10:58:13AM +0200, Olaf Hering wrote:
> If no page could be allocated, an error pointer was used as format
> string in pr_warn.
> 
> Rearrange the code to return early in case of OOM. Also add a check
> for the return value of d_path. The API of that function is not
> documented. It currently returns only ERR_PTR values, but may return
> also NULL in the future. Use PTR_ERR_OR_ZERO to cover both cases.

Don't use PTR_ERR_OR_ZERO.  And don't mix ERR_PTR() and NULL for
error returns without a really good reason for that.

d_path() is *NOT* going to return NULL.

NAK in that form.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ