From: Paulo Alcantara <pc@manguebit.com>
To: Steve French <smfrench@gmail.com>
Cc: linux-cifs@vger.kernel.org
Subject: Re: [PATCH 2/2] cifs: prevent data race in cifs_reconnect_tcon()
Date: Mon, 27 Feb 2023 21:09:21 -0300 [thread overview]
Message-ID: <8a0a723accb2b3bbaa48dd98d5572ebb.pc@manguebit.com> (raw)
In-Reply-To: <CAH2r5mufi6BRa3tDdzpDNsLDsE2g8ApTTYgK4zF_wU9ExEc1EQ@mail.gmail.com>
Steve French <smfrench@gmail.com> writes:
> CHECK /home/smfrench/cifs-2.6/fs/cifs/smb2pdu.c
> /home/smfrench/cifs-2.6/fs/cifs/smb2pdu.c:204:20: warning: context
> imbalance in 'smb2_reconnect' - unexpected unlock
Thanks.
Please fold this change in
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 62c125e73b73..0e53265e1462 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -185,7 +185,6 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
spin_lock(&server->srv_lock);
if (server->tcpStatus == CifsNeedReconnect) {
- spin_unlock(&server->srv_lock);
/*
* Return to caller for TREE_DISCONNECT and LOGOFF and CLOSE
* here since they are implicitly done when session drops.
@@ -198,6 +197,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
case SMB2_CANCEL:
case SMB2_CLOSE:
case SMB2_OPLOCK_BREAK:
+ spin_unlock(&server->srv_lock);
return -EAGAIN;
}
}
next prev parent reply other threads:[~2023-02-28 0:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 13:53 [PATCH 1/2] cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID Paulo Alcantara
2023-02-27 13:53 ` [PATCH 2/2] cifs: prevent data race in cifs_reconnect_tcon() Paulo Alcantara
2023-02-27 22:40 ` Steve French
2023-02-28 0:09 ` Paulo Alcantara [this message]
2023-02-28 22:01 ` [PATCH v2 1/2] cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID Paulo Alcantara
2023-02-28 22:01 ` [PATCH v2 2/2] cifs: prevent data race in cifs_reconnect_tcon() Paulo Alcantara
2023-02-28 22:16 ` Steve French
2023-02-28 22:20 ` [PATCH v2 1/2] cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID ronnie sahlberg
2023-02-28 23:35 ` 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=8a0a723accb2b3bbaa48dd98d5572ebb.pc@manguebit.com \
--to=pc@manguebit.com \
--cc=linux-cifs@vger.kernel.org \
--cc=smfrench@gmail.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;
as well as URLs for NNTP newsgroup(s).