linux/fs/cifs
Ronnie Sahlberg f2caf901c1 cifs: Fix a race condition with cifs_echo_request
There is a race condition with how we send (or supress and don't send)
smb echos that will cause the client to incorrectly think the
server is unresponsive and thus needs to be reconnected.

Summary of the race condition:
 1) Daisy chaining scheduling creates a gap.
 2) If traffic comes unfortunate shortly after
    the last echo, the planned echo is suppressed.
 3) Due to the gap, the next echo transmission is delayed
    until after the timeout, which is set hard to twice
    the echo interval.

This is fixed by changing the timeouts from 2 to three times the echo interval.

Detailed description of the bug: https://lutz.donnerhacke.de/eng/Blog/Groundhog-Day-with-SMB-remount

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-07-07 22:37:43 -05:00
..
asn1.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cache.c cifs: use 64-bit timestamps for fscache 2018-08-07 14:15:41 -05:00
cifs_debug.c cifs: simplify code by removing CONFIG_CIFS_ACL ifdef 2019-07-07 22:37:43 -05:00
cifs_debug.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cifs_dfs_ref.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cifs_fs_sb.h cifs: Properly handle auto disabling of serverino option 2019-07-07 22:37:43 -05:00
cifs_ioctl.h SMB3: passthru query info doesn't check for SMB3 FSCTL passthru 2019-03-14 19:32:36 -05:00
cifs_spnego.c smb3: on kerberos mount if server doesn't specify auth type use krb5 2018-11-02 14:09:41 -05:00
cifs_spnego.h [CIFS] Rename three structures to avoid camel case 2011-05-27 04:34:02 +00:00
cifs_unicode.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cifs_unicode.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cifs_uniupr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cifsacl.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
cifsacl.h cifs: For SMB2 security informaion query, check for minimum sized security descriptor instead of sizeof FileAllInformation class 2018-06-04 19:19:24 -05:00
cifsencrypt.c cifs: remove coverity warning in calc_lanman_hash 2018-12-23 22:41:26 -06:00
cifsfs.c cifs: simplify code by removing CONFIG_CIFS_ACL ifdef 2019-07-07 22:37:43 -05:00
cifsfs.h cifs: update module internal version number 2019-05-07 23:24:56 -05:00
cifsglob.h cifs: simplify code by removing CONFIG_CIFS_ACL ifdef 2019-07-07 22:37:43 -05:00
cifspdu.h smb3: missing defines and structs for reparse point handling 2018-11-02 14:09:41 -05:00
cifsproto.h cifs: Fix DFS cache refresher for DFS links 2019-05-07 23:24:54 -05:00
cifssmb.c fs: cifs: cifsssmb: Change return type of convert_ace_to_cifs_ace 2019-07-07 22:37:43 -05:00
connect.c cifs: Fix a race condition with cifs_echo_request 2019-07-07 22:37:43 -05:00
dfs_cache.c fs: cifs: Drop unlikely before IS_ERR(_OR_NULL) 2019-07-07 22:37:42 -05:00
dfs_cache.h cifs: Fix DFS cache refresher for DFS links 2019-05-07 23:24:54 -05:00
dir.c CIFS: make mknod() an smb_version_op 2019-03-14 19:32:36 -05:00
dns_resolve.c dns_resolver: Allow used keys to be invalidated 2019-05-15 17:35:54 +01:00
dns_resolve.h DNS: Separate out CIFS DNS Resolver code 2010-08-05 17:17:51 +00:00
export.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
file.c cifs: add spinlock for the openFileList to cifsInodeInfo 2019-06-13 14:21:09 -05:00
fscache.c cifs: use 64-bit timestamps for fscache 2018-08-07 14:15:41 -05:00
fscache.h cifs: use 64-bit timestamps for fscache 2018-08-07 14:15:41 -05:00
inode.c cifs: fix typo in debug message with struct field ia_valid 2019-07-07 22:37:43 -05:00
ioctl.c cifs: add support for ioctl on directories 2018-10-23 21:16:05 -05:00
Kconfig CIFS: Fix module dependency 2019-07-07 22:37:43 -05:00
link.c SMB3: Clean up query symlink when reparse point 2019-05-07 23:24:55 -05:00
Makefile cifs: simplify code by removing CONFIG_CIFS_ACL ifdef 2019-07-07 22:37:43 -05:00
misc.c cifs: Properly handle auto disabling of serverino option 2019-07-07 22:37:43 -05:00
netmisc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
nterr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
nterr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
ntlmssp.h cifs: dynamic allocation of ntlmssp blob 2016-06-23 23:45:07 -05:00
readdir.c cifs: check ntwrk_buf_start for NULL before dereferencing it 2018-12-23 22:41:31 -06:00
rfc1002pdu.h
sess.c cifs: remove set but not used variable 'smb_buf' 2018-12-23 22:41:20 -06:00
smb1ops.c cifs: simplify code by removing CONFIG_CIFS_ACL ifdef 2019-07-07 22:37:43 -05:00
smb2file.c SMB3: Allow persistent handle timeout to be configurable on mount 2019-04-01 14:33:36 -05:00
smb2glob.h cifs: change SMB2_OP_RENAME and SMB2_OP_HARDLINK to use compounding 2018-10-23 21:16:04 -05:00
smb2inode.c smb3: Add dynamic trace points for various compounded smb3 ops 2019-03-14 19:32:35 -05:00
smb2maperror.c SMB3: retry on STATUS_INSUFFICIENT_RESOURCES instead of failing write 2019-06-17 16:17:56 -05:00
smb2misc.c CIFS: keep FileInfo handle live during oplock break 2019-04-16 09:38:38 -05:00
smb2ops.c cifs: simplify code by removing CONFIG_CIFS_ACL ifdef 2019-07-07 22:37:43 -05:00
smb2pdu.c SMB3: Add SMB3.1.1 GCM to negotiated crypto algorigthms 2019-07-07 22:37:42 -05:00
smb2pdu.h add some missing definitions 2019-07-07 22:37:43 -05:00
smb2proto.h smb3: Fix enumerating snapshots to Azure 2019-04-01 14:33:34 -05:00
smb2status.h cifs: don't use __constant_cpu_to_le32() 2019-05-07 23:24:54 -05:00
smb2transport.c SMB3.1.1: Add GCM crypto to the encrypt and decrypt functions 2019-07-07 22:37:42 -05:00
smbdirect.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
smbdirect.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
smbencrypt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
smberr.h cifs: map NT_STATUS_ERROR_WRITE_PROTECTED to -EROFS 2010-08-02 12:40:40 +00:00
smbfsctl.h cifs: add fiemap support 2019-05-07 23:24:55 -05:00
trace.c smb3: Cleanup license mess 2019-01-24 09:37:33 -06:00
trace.h cifs: Fix slab-out-of-bounds when tracing SMB tcon 2019-03-22 22:36:54 -05:00
transport.c smb3: minor cleanup of compound_send_recv 2019-07-07 22:37:43 -05:00
winucase.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
xattr.c cifs: simplify code by removing CONFIG_CIFS_ACL ifdef 2019-07-07 22:37:43 -05:00