Commit 14cb20ad authored by Paulo Alcantara (SUSE)'s avatar Paulo Alcantara (SUSE) Committed by Greg Kroah-Hartman
Browse files

cifs: Fix potential softlockups while refreshing DFS cache



[ Upstream commit 84a1f5b1 ]

We used to skip reconnects on all SMB2_IOCTL commands due to SMB3+
FSCTL_VALIDATE_NEGOTIATE_INFO - which made sense since we're still
establishing a SMB session.

However, when refresh_cache_worker() calls smb2_get_dfs_refer() and
we're under reconnect, SMB2_ioctl() will not be able to get a proper
status error (e.g. -EHOSTDOWN in case we failed to reconnect) but an
-EAGAIN from cifs_send_recv() thus looping forever in
refresh_cache_worker().

Fixes: e99c63e4 ("SMB3: Fix deadlock in validate negotiate hits reconnect")
Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Suggested-by: default avatarAurelien Aptel <aaptel@suse.com>
Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 12c88d91
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment