mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
	 linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] fs: Fix uninitialized variable uflags
Date: Thu, 27 Feb 2025 09:09:58 +0100	[thread overview]
Message-ID: <20250227-boxhandschuhe-gesichert-908c190a9634@brauner> (raw)
In-Reply-To: <20250226223913.591371-1-colin.i.king@gmail.com>

On Wed, Feb 26, 2025 at 10:39:12PM +0000, Colin Ian King wrote:
> 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@gmail.com>
> ---

Thanks, Colin. I've already taken in a patch from Arnd Bergmann
yesterday. So this should already be fixed.

>  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
> 

      reply	other threads:[~2025-02-27  8:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26 22:39 Colin Ian King
2025-02-27  8:09 ` Christian Brauner [this message]

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=20250227-boxhandschuhe-gesichert-908c190a9634@brauner \
    --to=brauner@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=jack@suse.cz \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®