linux/fs/cifs
Steve French 4a369bb391 smb3: fix unusable share after force unmount failure
commit 491eafce1a upstream.

If user does forced unmount ("umount -f") while files are still open
on the share (as was seen in a Kubernetes example running on SMB3.1.1
mount) then we were marking the share as "TID_EXITING" in umount_begin()
which caused all subsequent operations (except write) to fail ... but
unfortunately when umount_begin() is called we do not know yet that
there are open files or active references on the share that would prevent
unmount from succeeding.  Kubernetes had example when they were doing
umount -f when files were open which caused the share to become
unusable until the files were closed (and the umount retried).

Fix this so that TID_EXITING is not set until we are about to send
the tree disconnect (not at the beginning of forced umounts in
umount_begin) so that if "umount -f" fails (due to open files or
references) the mount is still usable.

Cc: stable@vger.kernel.org
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-30 12:49:14 +02:00
..
asn1.c
cached_dir.c cifs: return a single-use cfid if we did not get a lease 2023-03-10 09:34:06 +01:00
cached_dir.h cifs: drop the lease for cached directories on rmdir or rename 2022-10-19 17:57:41 -05:00
cifs_debug.c
cifs_debug.h
cifs_dfs_ref.c
cifs_fs_sb.h
cifs_ioctl.h smb3: improve SMB3 change notification support 2022-10-15 10:05:53 -05:00
cifs_spnego_negtokeninit.asn1
cifs_spnego.c
cifs_spnego.h
cifs_swn.c
cifs_swn.h
cifs_unicode.c
cifs_unicode.h
cifs_uniupr.h
cifsacl.c cifs: Fix uninitialized memory reads for oparms.mode 2023-03-10 09:34:05 +01:00
cifsacl.h
cifsencrypt.c cifs: fix potential memory leaks in session setup 2023-02-01 08:34:32 +01:00
cifsfs.c smb3: fix unusable share after force unmount failure 2023-03-30 12:49:14 +02:00
cifsfs.h cifs: update internal module number 2022-10-19 17:57:51 -05:00
cifsglob.h cifs: fix oops during encryption 2022-12-21 17:48:11 +01:00
cifspdu.h
cifsproto.h cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID 2023-03-17 08:50:21 +01:00
cifsroot.c
cifssmb.c smb3: fix unusable share after force unmount failure 2023-03-30 12:49:14 +02:00
connect.c smb3: fix unusable share after force unmount failure 2023-03-30 12:49:14 +02:00
dfs_cache.c cifs: fix return of uninitialized rc in dfs_cache_update_tgthint() 2023-02-06 08:06:33 +01:00
dfs_cache.h
dir.c cifs: Fix uninitialized memory reads for oparms.mode 2023-03-10 09:34:05 +01:00
dns_resolve.c
dns_resolve.h
export.c
file.c cifs: Fix uninitialized memory reads for oparms.mode 2023-03-10 09:34:05 +01:00
fs_context.c
fs_context.h smb3: lower default deferred close timeout to address perf regression 2023-03-30 12:49:14 +02:00
fscache.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
fscache.h
inode.c cifs: Fix uninitialized memory reads for oparms.mode 2023-03-10 09:34:05 +01:00
ioctl.c cifs: Fix wrong return value checking when GETFLAGS 2022-11-16 00:21:04 -06:00
Kconfig
link.c cifs: Fix uninitialized memory reads for oparms.mode 2023-03-10 09:34:05 +01:00
Makefile
misc.c cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID 2023-03-17 08:50:21 +01:00
netlink.c
netlink.h
netmisc.c
nterr.c
nterr.h
ntlmssp.h
readdir.c cifs: improve symlink handling for smb2+ 2022-10-13 09:36:04 -05:00
rfc1002pdu.h
sess.c cifs: fix potential memory leaks in session setup 2023-02-01 08:34:32 +01:00
smb1ops.c cifs: Fix uninitialized memory reads for oparms.mode 2023-03-10 09:34:05 +01:00
smb2file.c cifs: don't leak -ENOMEM in smb2_open_file() 2022-12-31 13:32:56 +01:00
smb2glob.h
smb2inode.c cifs: Fix smb2_set_path_size() 2023-03-22 13:33:59 +01:00
smb2maperror.c
smb2misc.c cifs: avoid unnecessary iteration of tcp sessions 2022-11-04 23:34:40 -05:00
smb2ops.c cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID 2023-03-17 08:50:21 +01:00
smb2pdu.c smb3: fix unusable share after force unmount failure 2023-03-30 12:49:14 +02:00
smb2pdu.h cifs: improve symlink handling for smb2+ 2022-10-13 09:36:04 -05:00
smb2proto.h smb3: improve SMB3 change notification support 2022-10-15 10:05:53 -05:00
smb2status.h
smb2transport.c cifs: generate signkey for the channel that's reconnecting 2023-03-22 13:33:58 +01:00
smbdirect.c cifs: Fix warning and UAF when destroy the MR list 2023-03-10 09:33:25 +01:00
smbdirect.h
smbencrypt.c
smberr.h
trace.c
trace.h
transport.c cifs: Move the in_send statistic to __smb_send_rqst() 2023-03-22 13:33:39 +01:00
unc.c
winucase.c
xattr.c