diff options
| author | Shyam Prasad N <sprasad@microsoft.com> | 2024-10-30 06:45:50 +0000 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2024-11-28 09:51:07 -0600 |
| commit | 0f0e357902957fba28ed31bde0d6921c6bd1485d (patch) | |
| tree | 006def613def03cf43bab299b9ffcbc2cacaa505 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | cifs: support mounting with alternate password to allow password rotation (diff) | |
| download | linux-0f0e357902957fba28ed31bde0d6921c6bd1485d.tar.gz linux-0f0e357902957fba28ed31bde0d6921c6bd1485d.zip | |
cifs: during remount, make sure passwords are in sync
This fixes scenarios where remount can overwrite the only currently
working password, breaking reconnect.
We recently introduced a password2 field in both ses and ctx structs.
This was done so as to allow the client to rotate passwords for a mount
without any downtime. However, when the client transparently handles
password rotation, it can swap the values of the two password fields
in the ses struct, but not in smb3_fs_context struct that hangs off
cifs_sb. This can lead to a situation where a remount unintentionally
overwrites a working password in the ses struct.
In order to fix this, we first get the passwords in ctx struct
in-sync with ses struct, before replacing them with what the passwords
that could be passed as a part of remount.
Also, in order to avoid race condition between smb2_reconnect and
smb3_reconfigure, we make sure to lock session_mutex before changing
password and password2 fields of the ses structure.
Fixes: 35f834265e0d ("smb3: fix broken reconnect when password changing on the server by allowing password rotation")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Meetakshi Setiya <msetiya@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
