[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250226223913.591371-1-colin.i.king@gmail.com>
Date: Wed, 26 Feb 2025 22:39:12 +0000
From: Colin Ian King <colin.i.king@...il.com>
To: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Jan Kara <jack@...e.cz>,
linux-fsdevel@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH][next] fs: Fix uninitialized variable uflags
The variable uflags is only being initialized in the if statement that
checks if flags & MOVE_MOUNT_F_EMPTY_PATH is non-zero. Fix this by
initializing uflags at the start of the system call move_mount.
Fixes: b1e9423d65e3 ("fs: support getname_maybe_null() in move_mount()")
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
fs/namespace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index 663bacefddfa..c19e919a9108 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -4599,7 +4599,7 @@ SYSCALL_DEFINE5(move_mount,
struct path from_path __free(path_put) = {};
struct filename *to_name __free(putname) = NULL;
struct filename *from_name __free(putname) = NULL;
- unsigned int lflags, uflags;
+ unsigned int lflags, uflags = 0;
enum mnt_tree_flags_t mflags = 0;
int ret = 0;
--
2.47.2
Powered by blists - more mailing lists