]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:28:51 +0000 (16:28 +0200)
commitc82ea72d96ddfe6b3efa284ac8fb63b9d1665ad3
treeeaff292efab62cc437802dc8f506547d6addbac1
parent032ca566f58971dab57f4e4d4d9663bb5393323f
mount: handle OOM on mnt_warn_timestamp_expiry

[ Upstream commit 4bcda1eaf184e308f07f9c61d3a535f9ce477ce8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/namespace.c