Files
linux-stable-mirror/include/uapi/linux
Andrei Vagin ba306daa7f fs/namespace: correctly handle errors returned by grab_requested_mnt_ns
[ Upstream commit 78f0e33cd6 ]

grab_requested_mnt_ns was changed to return error codes on failure, but
its callers were not updated to check for error pointers, still checking
only for a NULL return value.

This commit updates the callers to use IS_ERR() or IS_ERR_OR_NULL() and
PTR_ERR() to correctly check for and propagate errors.

This also makes sure that the logic actually works and mount namespace
file descriptors can be used to refere to mounts.

Christian Brauner <brauner@kernel.org> says:

Rework the patch to be more ergonomic and in line with our overall error
handling patterns.

Fixes: 7b9d14af87 ("fs: allow mount namespace fd")
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Andrei Vagin <avagin@google.com>
Link: https://patch.msgid.link/20251111062815.2546189-1-avagin@google.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-11-24 10:35:57 +01:00
..
2025-02-17 10:05:04 +01:00
2024-08-28 06:53:58 -07:00
2024-08-28 06:53:58 -07:00
2024-09-04 16:51:11 +02:00
2025-08-20 18:30:11 +02:00
2024-09-01 20:26:05 -07:00
2025-04-20 10:15:55 +02:00
2024-09-06 08:31:40 -06:00
2024-09-11 20:44:32 -07:00