From: Al Viro <viro@zeniv.linux.org.uk>
To: Olaf Hering <olaf@aepfle.de>
Cc: Deepa Dinamani <deepa.kernel@gmail.com>,
Jeff Layton <jlayton@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH v1] mount: handle OOM on mnt_warn_timestamp_expiry
Date: Tue, 30 Jul 2024 16:49:24 +0100 [thread overview]
Message-ID: <20240730154924.GF5334@ZenIV> (raw)
In-Reply-To: <20240730085856.32385-1-olaf@aepfle.de>
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.
next prev parent reply other threads:[~2024-07-30 15:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 8:58 [PATCH v1] mount: handle OOM on mnt_warn_timestamp_expiry Olaf Hering
2024-07-30 9:49 ` Christian Brauner
2024-07-30 13:11 ` Jan Kara
2024-07-30 15:49 ` Al Viro [this message]
2024-07-30 19:58 ` Olaf Hering
2024-07-30 20:45 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240730154924.GF5334@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brauner@kernel.org \
--cc=deepa.kernel@gmail.com \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.