linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Enzo Matsumiya <ematsumiya@suse.de>
Cc: CIFS <linux-cifs@vger.kernel.org>,
	Shyam Prasad N <nspmangalore@gmail.com>,
	Paulo Alcantara <pc@cjr.nz>
Subject: Re: [PATCH] cifs: fix hang on cifs_get_next_mid()
Date: Fri, 7 Jan 2022 20:09:52 -0600	[thread overview]
Message-ID: <CAH2r5mvi2-q3eDxmJVpckrYcKU0UniB56vt8xX4ZU67sLAYGxA@mail.gmail.com> (raw)
In-Reply-To: <20220107225139.15323-1-ematsumiya@suse.de>

tentatively merged into cifs-2.6.git for-next pending testing

On Fri, Jan 7, 2022 at 4:51 PM Enzo Matsumiya <ematsumiya@suse.de> wrote:
>
> Mount will hang if using SMB1 and DFS.
>
> This is because every call to get_next_mid() will, unconditionally,
> mark tcpStatus to CifsNeedReconnect before even establishing the
> initial connect, because "reconnect" variable was not initialized.
>
> Initializing "reconnect" to false fix this issue.
>
> Fixes: 220c5bc25d87 ("cifs: take cifs_tcp_ses_lock for status checks")
> Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
> ---
>  fs/cifs/smb1ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
> index 54319a789c92..6364c09296e8 100644
> --- a/fs/cifs/smb1ops.c
> +++ b/fs/cifs/smb1ops.c
> @@ -163,7 +163,7 @@ cifs_get_next_mid(struct TCP_Server_Info *server)
>  {
>         __u64 mid = 0;
>         __u16 last_mid, cur_mid;
> -       bool collision, reconnect;
> +       bool collision, reconnect = false;
>
>         spin_lock(&GlobalMid_Lock);
>
> --
> 2.34.1
>


-- 
Thanks,

Steve

      reply	other threads:[~2022-01-08  2:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 22:51 [PATCH] cifs: fix hang on cifs_get_next_mid() Enzo Matsumiya
2022-01-08  2:09 ` Steve French [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=CAH2r5mvi2-q3eDxmJVpckrYcKU0UniB56vt8xX4ZU67sLAYGxA@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=ematsumiya@suse.de \
    --cc=linux-cifs@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=pc@cjr.nz \
    /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;
as well as URLs for NNTP newsgroup(s).