linux/fs/smb/client
Linus Torvalds 66a97c2ec9 We still have some races in filesystem methods when exposed to RCU
pathwalk.  This series is a result of code audit (the second round
 of it) and it should deal with most of that stuff.  Exceptions: ntfs3
 ->d_hash()/->d_compare() and ceph_d_revalidate().  Up to maintainers (a
 note for NTFS folks - when documentation says that a method may not block,
 it *does* imply that blocking allocations are to be avoided.  Really).
 
 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCZdroDAAKCRBZ7Krx/gZQ
 60dKAQCzp6rYr3ye4nylho9Rzu8LEpH04TuNf3C6JuyUaNHxHwEAvNLatZsyFnmV
 Ksp2Rg/IlKPNtQgYJ8xPxv9DFmNe8gI=
 =47Un
 -----END PGP SIGNATURE-----

Merge tag 'pull-fixes.pathwalk-rcu-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull RCU pathwalk fixes from Al Viro:
 "We still have some races in filesystem methods when exposed to RCU
  pathwalk. This series is a result of code audit (the second round of
  it) and it should deal with most of that stuff.

  Still pending: ntfs3 ->d_hash()/->d_compare() and ceph_d_revalidate().
  Up to maintainers (a note for NTFS folks - when documentation says
  that a method may not block, it *does* imply that blocking allocations
  are to be avoided. Really)"

[ More explanations for people who aren't familiar with the vagaries of
  RCU path walking: most of it is hidden from filesystems, but if a
  filesystem actively participates in the low-level path walking it
  needs to make sure the fields involved in that walk are RCU-safe.

  That "actively participate in low-level path walking" includes things
  like having its own ->d_hash()/->d_compare() routines, or by having
  its own directory permission function that doesn't just use the common
  helpers.  Having a ->d_revalidate() function will also have this issue.

  Note that instead of making everything RCU safe you can also choose to
  abort the RCU pathwalk if your operation cannot be done safely under
  RCU, but that obviously comes with a performance penalty. One common
  pattern is to allow the simple cases under RCU, and abort only if you
  need to do something more complicated.

  So not everything needs to be RCU-safe, and things like the inode etc
  that the VFS itself maintains obviously already are. But these fixes
  tend to be about properly RCU-delaying things like ->s_fs_info that
  are maintained by the filesystem and that got potentially released too
  early.   - Linus ]

* tag 'pull-fixes.pathwalk-rcu-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  ext4_get_link(): fix breakage in RCU mode
  cifs_get_link(): bail out in unsafe case
  fuse: fix UAF in rcu pathwalks
  procfs: make freeing proc_fs_info rcu-delayed
  procfs: move dropping pde and pid from ->evict_inode() to ->free_inode()
  nfs: fix UAF on pathwalk running into umount
  nfs: make nfs_set_verifier() safe for use in RCU pathwalk
  afs: fix __afs_break_callback() / afs_drop_open_mmap() race
  hfsplus: switch to rcu-delayed unloading of nls and freeing ->s_fs_info
  exfat: move freeing sbi, upcase table and dropping nls into rcu-delayed helper
  affs: free affs_sb_info with kfree_rcu()
  rcu pathwalk: prevent bogus hard errors from may_lookup()
  fs/super.c: don't drop ->s_user_ns until we free struct super_block itself
2024-02-25 09:29:05 -08:00
..
asn1.c
cached_dir.c cifs: update the same create_guid on replay 2024-02-11 19:07:08 -06:00
cached_dir.h smb: client: make laundromat a delayed worker 2023-10-12 09:41:04 -05:00
cifs_debug.c smb3: show beginning time for per share stats 2024-01-18 12:07:51 -06:00
cifs_debug.h
cifs_fs_sb.h
cifs_ioctl.h smb3: allow dumping session and tcon id to improve stats analysis and debugging 2023-11-10 02:00:30 -06:00
cifs_spnego_negtokeninit.asn1
cifs_spnego.c cifs: spnego: add ';' in HOST_KEY_LEN 2023-11-13 16:21:34 -06:00
cifs_spnego.h
cifs_swn.c
cifs_swn.h
cifs_unicode.c fs/smb/client: Use common code in client 2023-08-30 08:55:52 -05:00
cifs_unicode.h fs/smb/client: Use common code in client 2023-08-30 08:55:52 -05:00
cifsacl.c
cifsacl.h
cifsencrypt.c smb: Work around Clang __bdos() type confusion 2024-01-23 18:56:16 -06:00
cifsfs.c We still have some races in filesystem methods when exposed to RCU 2024-02-25 09:29:05 -08:00
cifsfs.h cifs: update internal module version number for cifs.ko 2024-01-09 23:42:51 -06:00
cifsglob.h cifs: update the same create_guid on replay 2024-02-11 19:07:08 -06:00
cifspdu.h smb: client, common: fix fortify warnings 2023-11-30 11:17:03 -06:00
cifsproto.h cifs: make cifs_chan_update_iface() a void function 2024-01-08 22:36:26 -06:00
cifsroot.c
cifssmb.c cifs: get rid of dup length check in parse_reparse_point() 2024-01-07 21:18:00 -06:00
connect.c smb: Fix regression in writes when non-standard maximum write size negotiated 2024-02-15 22:19:23 -06:00
dfs_cache.c smb: client: ensure to try all targets when finding nested links 2023-08-20 16:05:50 -05:00
dfs_cache.h smb: client: ensure to try all targets when finding nested links 2023-08-20 16:05:50 -05:00
dfs.c cifs: change tcon status when need_reconnect is set on it 2024-02-09 14:43:23 -06:00
dfs.h smb: client: get rid of dfs code dep in namespace.c 2023-08-20 16:05:50 -05:00
dir.c smb: client: allow creating special files via reparse points 2024-01-07 15:46:05 -06:00
dns_resolve.c
dns_resolve.h
export.c exportfs: make ->encode_fh() a mandatory method for NFS export 2023-10-28 16:15:15 +02:00
file.c cifs: change tcon status when need_reconnect is set on it 2024-02-09 14:43:23 -06:00
fs_context.c smb: Fix regression in writes when non-standard maximum write size negotiated 2024-02-15 22:19:23 -06:00
fs_context.h cifs: new mount option called retrans 2024-01-19 10:31:57 -06:00
fscache.c netfs, cachefiles: Pass upper bound length to allow expansion 2023-12-28 09:45:25 +00:00
fscache.h client: convert to new timestamp accessors 2023-10-18 14:08:27 +02:00
inode.c cifs: Share server EOF pos with netfslib 2024-01-23 18:59:05 -06:00
ioctl.c Missing field not being returned in ioctl CIFS_IOC_GET_MNT_INFO 2023-11-10 09:32:04 -06:00
Kconfig fs/smb/client: Use common code in client 2023-08-30 08:55:52 -05:00
link.c smb: client: allow creating symlinks via reparse points 2024-01-07 15:46:06 -06:00
Makefile smb: client: get rid of dfs code dep in namespace.c 2023-08-20 16:05:50 -05:00
misc.c smb3: show beginning time for per share stats 2024-01-18 12:07:51 -06:00
namespace.c smb: client: set correct id, uid and cruid for multiuser automounts 2024-02-12 12:46:49 -06:00
netlink.c
netlink.h
netmisc.c
nterr.c
nterr.h
ntlmssp.h cifs: Add client version details to NTLM authenticate message 2023-10-22 19:03:42 -05:00
readdir.c smb: client: set correct d_type for reparse points under DFS mounts 2024-02-08 10:50:40 -06:00
rfc1002pdu.h
sess.c cifs: handle cases where multiple sessions share connection 2024-02-09 14:43:25 -06:00
smb1ops.c smb: client: introduce cifs_sfu_make_node() 2023-11-23 11:46:05 -06:00
smb2file.c
smb2glob.h smb: client: optimise reparse point querying 2024-01-07 15:46:05 -06:00
smb2inode.c cifs: commands that are retried should have replay flag set 2024-01-23 20:23:29 -06:00
smb2maperror.c cifs: new nt status codes from MS-SMB2 2024-01-18 21:01:04 -06:00
smb2misc.c smb: client: fix potential OOB in smb2_dump_detail() 2023-12-19 10:33:39 -06:00
smb2ops.c smb: client: handle path separator of created SMB symlinks 2024-02-12 12:47:21 -06:00
smb2pdu.c cifs: update the same create_guid on replay 2024-02-11 19:07:08 -06:00
smb2pdu.h smb: client, common: fix fortify warnings 2023-11-30 11:17:03 -06:00
smb2proto.h cifs: commands that are retried should have replay flag set 2024-01-23 20:23:29 -06:00
smb2status.h cifs: new nt status codes from MS-SMB2 2024-01-18 21:01:04 -06:00
smb2transport.c cifs: fix check of rc in function generate_smb3signingkey 2023-11-13 16:22:30 -06:00
smbdirect.c smb3: Improve exception handling in allocate_mr_list() 2024-01-07 15:46:06 -06:00
smbdirect.h
smbencrypt.c smb: client: delete "true", "false" defines 2024-01-23 12:41:02 -06:00
smberr.h
trace.c
trace.h smb: client: optimise reparse point querying 2024-01-07 15:46:05 -06:00
transport.c smb: client: increase number of PDUs allowed in a compound request 2024-02-01 12:15:51 -06:00
unc.c
winucase.c
xattr.c smb3: fix caching of ctime on setxattr 2023-11-09 10:25:58 -06:00