]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mount: handle OOM on mnt_warn_timestamp_expiry
authorOlaf Hering <olaf@aepfle.de>
Tue, 30 Jul 2024 08:58:13 +0000 (10:58 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 19 Aug 2024 11:45:02 +0000 (13:45 +0200)
commit4bcda1eaf184e308f07f9c61d3a535f9ce477ce8
tree427937ad98f31607442c93b3c00f21627fdcfa44
parentde7007f27d9108fb00d801a6be8aae2ce4dd6101
mount: handle OOM on mnt_warn_timestamp_expiry

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.

Fixes: f8b92ba67c5d ("mount: Add mount warning for impending timestamp expiry")
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Link: https://lore.kernel.org/r/20240730085856.32385-1-olaf@aepfle.de
[brauner: rewrite commit and commit message]
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/namespace.c