diff options
| author | Joseph Qi <joseph.qi@linux.alibaba.com> | 2026-11-03 17:15:57 +0800 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-11-09 11:06:46 -0300 |
| commit | f02d249e9756b78990aaaa1635e47e06deb2cb51 (patch) | |
| tree | 6c013c303f20d3c86304e3f3b09078d00e06cf57 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 92509ce64ffff02d05fe9f3c82b889e1cc500076 (diff) | |
smb: client: hold server ref while queueing reconnect work
When query_server_interfaces() returns -EOPNOTSUPP on a secondary
channel, smb2_reconnect() calls smb3_update_ses_channels() which for a
channel runs cifs_chan_skip_or_disable(). That clears the channel's
slot in the session and calls cifs_put_tcp_session(), which can drop
the last reference of the channel and tear it down.
smb2_reconnect() then falls through to skip_add_channels and queues
reconnect work on that server, using a server that may already be
freed. The send path obtained the channel from cifs_pick_channel(),
which does not take a reference, so the session's channel reference is
the only one.
Take our own reference on the channel before calling
smb3_update_ses_channels() and drop it after the reconnect work has
been queued, so the channel cannot be freed while it is still used.
Fixes: f591062bdbf4 ("cifs: handle servers that still advertise multichannel after disabling")
Cc: stable@vger.kernel.org
Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
