From: Paulo Alcantara <pc@manguebit.org>
To: Elkin Cruz <elkin@google.com>, Namjae Jeon <linkinjeon@kernel.org>
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>,
linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
irogers@google.com, Elkin Cruz <elkin@google.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] smb: client: unlock reconnect_mutex before putting session on terminate
Date: Thu, 26 Nov 2026 09:16:51 -0300 [thread overview]
Message-ID: <c9542b37c8edfdfa255cdfc2d5e3f9d2@manguebit.org> (raw)
In-Reply-To: <20261125210025.1277771-1-elkin@google.com>
Elkin Cruz <elkin@google.com> writes:
> In smb2_reconnect_server(), when server->terminate is set, the early
> exit path calls cifs_put_tcp_session(server, true) while still holding
> pserver->reconnect_mutex and unlocks pserver->reconnect_mutex
> afterwards. Dropping the last session reference can free server (which
> equals pserver for primary channels), causing mutex_unlock() to touch
> freed memory; the normal done: label at the end of the same function
> explicitly unlocks reconnect_mutex before calling cifs_put_tcp_session().
>
> Unlock pserver->reconnect_mutex before calling cifs_put_tcp_session() in
> the server->terminate branch as well.
> ...
Applied.
prev parent reply other threads:[~2026-11-26 12:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 21:00 [PATCH] smb: client: unlock reconnect_mutex before putting session on terminate Elkin Cruz
2026-11-26 12:16 ` Paulo Alcantara [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=c9542b37c8edfdfa255cdfc2d5e3f9d2@manguebit.org \
--to=pc@manguebit.org \
--cc=bharathsm@microsoft.com \
--cc=elkin@google.com \
--cc=irogers@google.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=sprasad@microsoft.com \
--cc=stable@vger.kernel.org \
--cc=tom@talpey.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