public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.org>
To: Arnd Bergmann <arnd@kernel.org>, Steve French <sfrench@samba.org>,
	David Howells <dhowells@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>,
	Henrique Carvalho <henrique.carvalho@suse.com>,
	Markus Elfring <elfring@users.sourceforge.net>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] smb: client: fix sbflags initialization
Date: Fri, 06 Mar 2026 12:17:19 -0300	[thread overview]
Message-ID: <8fa24f86dcbe2ef367b3e35fb6e1da5c@manguebit.org> (raw)
In-Reply-To: <20260306150717.483742-1-arnd@kernel.org>

Arnd Bergmann <arnd@kernel.org> writes:

> From: Arnd Bergmann <arnd@arndb.de>
>
> The newly introduced variable is initialized in an #ifdef block
> but used outside of it, leading to undefined behavior when
> CONFIG_CIFS_ALLOW_INSECURE_LEGACY is disabled:
>
> fs/smb/client/dir.c:417:9: error: variable 'sbflags' is uninitialized when used here [-Werror,-Wuninitialized]
>   417 |                                 if (sbflags & CIFS_MOUNT_DYNPERM)
>       |                                     ^~~~~~~
>
> Move the initialization into the declaration, the same way as the
> other similar function do it.
>
> Fixes: 4fc3a433c139 ("smb: client: use atomic_t for mnt_cifs_flags")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  fs/smb/client/dir.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>

  reply	other threads:[~2026-03-06 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 15:07 [PATCH] smb: client: fix sbflags initialization Arnd Bergmann
2026-03-06 15:17 ` Paulo Alcantara [this message]
2026-03-08  3:15   ` Steve French

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=8fa24f86dcbe2ef367b3e35fb6e1da5c@manguebit.org \
    --to=pc@manguebit.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=bharathsm@microsoft.com \
    --cc=dhowells@redhat.com \
    --cc=elfring@users.sourceforge.net \
    --cc=henrique.carvalho@suse.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.com \
    --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