Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@cjr.nz>
To: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>,
	linux-cifs@vger.kernel.org, zhangxiaoxu5@huawei.com,
	sfrench@samba.org, smfrench@gmail.com, lsahlber@redhat.com,
	sprasad@microsoft.com, tom@talpey.com
Subject: Re: [PATCH v2] cifs: Fix connections leak when tlink setup failed
Date: Fri, 11 Nov 2022 13:00:58 -0300	[thread overview]
Message-ID: <87bkpdwked.fsf@cjr.nz> (raw)
In-Reply-To: <20221111071212.132722-1-zhangxiaoxu5@huawei.com>

Zhang Xiaoxu <zhangxiaoxu5@huawei.com> writes:

> If the tlink setup failed, lost to put the connections, then
> the module refcnt leak since the cifsd kthread not exit.
>
> Also leak the fscache info, and for next mount with fsc, it will
> print the follow errors:
>   CIFS: Cache volume key already in use (cifs,127.0.0.1:445,TEST)
>
> Let's check the result of tlink setup, and do some cleanup.
>
> Fixes: 56c762eb9bee ("cifs: Refactor out cifs_mount()")
> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
> ---
> v2: goto error rather than only put connections.
>
>  fs/cifs/connect.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)

Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>

  reply	other threads:[~2022-11-11 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  7:12 [PATCH v2] cifs: Fix connections leak when tlink setup failed Zhang Xiaoxu
2022-11-11 16:00 ` Paulo Alcantara [this message]
2022-11-11 18:02 ` 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=87bkpdwked.fsf@cjr.nz \
    --to=pc@cjr.nz \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=sfrench@samba.org \
    --cc=smfrench@gmail.com \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.com \
    --cc=zhangxiaoxu5@huawei.com \
    /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