diff options
| author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-11-15 12:13:58 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-05 14:03:08 +0100 |
| commit | b6229b7e2e8cf071639b231f8147ff21fa153666 (patch) | |
| tree | f14096c21610780f1ad1c88a1dd43edb70d2a265 /fs/smb | |
| parent | 0e4145774c016530bf99afb3675a1a0593c35642 (diff) | |
| download | linux-b6229b7e2e8cf071639b231f8147ff21fa153666.tar.gz linux-b6229b7e2e8cf071639b231f8147ff21fa153666.tar.bz2 linux-b6229b7e2e8cf071639b231f8147ff21fa153666.zip | |
cifs: unlock on error in smb3_reconfigure()
[ Upstream commit cda88d2fef7aa7de80b5697e8009fcbbb436f42d ]
Unlock before returning if smb3_sync_session_ctx_passwords() fails.
Fixes: 7e654ab7da03 ("cifs: during remount, make sure passwords are in sync")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/smb')
| -rw-r--r-- | fs/smb/client/fs_context.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c index 1a5842ced489..48606e2ddffd 100644 --- a/fs/smb/client/fs_context.c +++ b/fs/smb/client/fs_context.c @@ -978,8 +978,10 @@ static int smb3_reconfigure(struct fs_context *fc) * later stage */ rc = smb3_sync_session_ctx_passwords(cifs_sb, ses); - if (rc) + if (rc) { + mutex_unlock(&ses->session_mutex); return rc; + } /* * now that allocations for passwords are done, commit them |
