[Pull Request][Jammy linux-azure] Azure: Update cifs to Linux v6.5
Tim Gardner
tim.gardner at canonical.com
Mon Sep 18 19:47:17 UTC 2023
BugLink: https://bugs.launchpad.net/bugs/2036450
SRU Justification
[Impact]
Microsoft has requested this patch set to update CIFS and smbfs to the
Linux kernel version 6.5.
This pull request is hideously large, partly because in order to match
sources with what MSFT has backported I ended up reverting all changes
to the fs/cifs and fs/smbfs directories since the v5.15 release. This is
due to an earlier backport plus some stable updates. It just seemed
simpler to start with a clean slate before applying the backport patches
The end result is identical cifs and smbfs sources between Ubuntu Azure
and [1].
All patches are clean cherry picks from Steve French's repository, which
in turn are cherry picks and backports from mainline. There is no
discussion in those patches as to which are backports and which are
clean cherry picks.
[1] - git://git.samba.org/sfrench/cifs-2.6.git 5.15-backport-8-16-23
[Test Plan]
Microsoft has tested with positive results.
[Regression Potential]
This is a huge patch set. The potential exists for corruption,
connection instabilities, or other cifs related maladies.
[Other Info]
SF: #00365185
----------------------------------------------------------------
The following changes since commit e485c2884527c97b3a2f62e767d685f7c82d93c5:
UBUNTU: Ubuntu-azure-5.15.0-1048.55 (2023-09-11 10:57:25 -0600)
are available in the Git repository at:
git://git.launchpad.net/~timg-tpi/ubuntu/+source/linux/+git/jammy
5.15-backport-8-16-23
for you to fetch changes up to c299676859266bea6b237350fc974bd391bfdcf5:
smb: client: fix null auth (2023-09-18 13:29:29 -0600)
----------------------------------------------------------------
Amir Goldstein (1):
cifs: fix set of group SID via NTSD xattrs
Anastasia Belova (2):
cifs: add check for returning value of SMB2_close_init
cifs: add check for returning value of SMB2_set_info_init
Andy Shevchenko (1):
cifs: Get rid of unneeded conditional in the smb2_get_aead_req()
Bharath SM (5):
SMB3: fix lease break timeout when multiple deferred close
handles for the same file.
SMB3: Add missing locks to protect deferred close file list
SMB3: Close deferred file handles in case of handle lease break
SMB3: Close all deferred handles of inode in case of handle lease
break
SMB3: drop reference to cfile before sending oplock break
ChenXiaoSong (2):
cifs: return the more nuanced writeback error on close()
cifs: fix missing unlock in cifs_file_copychunk_range()
Christophe JAILLET (1):
cifs: Use kstrtobool() instead of strtobool()
Colin Ian King (3):
cifs: remove redundant assignment to pointer p
cifs: remove redundant initialization to variable mnt_sign_enabled
cifs: remove redundant assignment to the variable match
Dan Carpenter (2):
cifs: Use after free in debug code
cifs: double lock in cifs_reconnect_tcon()
David Disseldorp (2):
cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL
cifs: fix negotiate context parsing
David Howells (9):
Fix a warning about a malformed kernel doc comment in cifs
cifs: Check the IOCB_DIRECT flag, not O_DIRECT
cifs: Split the smb3_add_credits tracepoint
smb3: missing inode locks in zero range
smb3: missing inode locks in punch hole
smb3: Move the flush out of smb2_copychunk_range() into its callers
smb3: fix temporary data corruption in insert range
cifs: Fix oops due to uncleared server->smbd_conn in reconnect
cifs: Add a function to read into an iter from a socket
Enzo Matsumiya (16):
cifs: fix hang on cifs_get_next_mid()
cifs: don't call cifs_dfs_query_info_nonascii_quirk() if nodfs
was set
cifs: return ENOENT for DFS lookup_cache_entry()
cifs: print TIDs as hex
cifs: remove repeated debug message on cifs_put_smb_ses()
smb2: small refactor in smb2_check_message()
cifs: list_for_each() -> list_for_each_entry()
cifs: remove useless DeleteMidQEntry()
cifs: remove unused server parameter from calc_smb_size()
cifs: remove useless parameter 'is_fsctl' from SMB2_ioctl()
cifs: fix small mempool leak in SMB2_negotiate()
cifs: return correct error in ->calc_signature()
smb3: rename encryption/decryption TFMs
cifs: secmech: use shash_desc directly, remove sdesc
cifs: use ALIGN() and round_up() macros
cifs: do not include page data when checking signature
Eugene Korenevsky (3):
cifs: fix FILE_BOTH_DIRECTORY_INFO definition
cifs: alloc_path_with_tree_prefix: do not append sep. if the path
is empty
cifs: quirk for STATUS_OBJECT_NAME_INVALID returned for non-ASCII
dfs refs
Gustavo A. R. Silva (3):
treewide: Replace zero-length arrays with flexible-array members
cifs: Replace a couple of one-element arrays with flexible-array
members
cifs: Replace zero-length arrays with flexible-array members
Haowen Bai (1):
cifs: Use kzalloc instead of kmalloc/memset
Harshit Mogalapalli (1):
cifs: potential buffer overflow in handling symlinks
Ira Weiny (1):
cifs: Fix kmap_local_page() unmapping
Jakob Koschel (1):
cifs: remove check of list iterator against head past the loop body
Jeff Layton (1):
cifs: move superblock magic defitions to magic.h
Jiangshan Yi (1):
cifs: misc: fix spelling typo in comment
Julia Lawall (1):
cifs: smbd: fix typo in comment
Kees Cook (4):
cred: Do not default to init_cred in prepare_kernel_cred()
cifs: Convert struct fealist away from 1-element array
cifs: Replace remaining 1-element arrays
smb3: Replace smb2pdu 1-element arrays with flex-arrays
Muhammad Usama Anjum (2):
cifs: remove unused variable ses_selected
cifs: remove initialization value
Namjae Jeon (1):
cifs: remove unneeded 2bytes of padding from smb2 tree connect
Paulo Alcantara (92):
cifs: fix print of hdr_flags in dfscache_proc_show()
cifs: introduce new helper for cifs_reconnect()
cifs: convert list_for_each to entry variant
cifs: split out dfs code from cifs_reconnect()
cifs: set a minimum of 120s for next dns resolution
cifs: support nested dfs links over reconnect
cifs: fix memory leak of smb3_fs_context_dup::server_hostname
cifs: fix potential use-after-free bugs
cifs: introduce cifs_ses_mark_for_reconnect() helper
cifs: fix missed refcounting of ipc tcon
cifs: fix ntlmssp auth when there is no key exchange
cifs: do not skip link targets when an I/O fails
cifs: fix bad fids sent over wire
cifs: prevent bad output lengths in smb2_ioctl_query_info()
cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
cifs: fix potential race with cifsd thread
cifs: force new session setup and tcon for dfs
cifs: fix NULL ptr dereference in refresh_mounts()
cifs: use correct lock type in cifs_reconnect()
cifs: fix signed integer overflow when fl_end is OFFSET_MAX
cifs: fix ntlmssp on old servers
cifs: skip trailing separators of prefix paths
cifs: fix reconnect on smb3 mount types
cifs: update cifs_ses::ip_addr after failover
cifs: fix lock length calculation
cifs: skip extra NULL byte in filenames
cifs: add missing spinlock around tcon refcount
cifs: improve symlink handling for smb2+
cifs: fix uninitialised var in smb2_compound_op()
cifs: prevent copying past input buffer boundaries
cifs: fix static checker warning
cifs: fix double-fault crash during ntlmssp
cifs: fix memory leaks in session setup
cifs: skip alloc when request has no pages
cifs: fix oops during encryption
cifs: set correct tcon status after initial tree connect
cifs: set correct ipc status after initial tree connect
cifs: reduce roundtrips on create/qinfo requests
cifs: use fs_context for automounts
cifs: get rid of mount options string parsing
cifs: remove unused smb3_fs_context::mount_options
cifs: set resolved ip in sockaddr
cifs: share dfs connections and supers
cifs: don't refresh cached referrals from unactive mounts
cifs: fix refresh of cached referrals
cifs: refresh root referrals
cifs: don't block in dfs_cache_noreq_update_tgthint()
cifs: fix confusing debug message
cifs: fix source pathname comparison of dfs supers
cifs: optimize reconnect of nested links
cifs: set correct status of tcon ipc when reconnecting
cifs: use origin fullpath for automounts
cifs: don't leak -ENOMEM in smb2_open_file()
cifs: ignore ipc reconnect failures during dfs failover
cifs: fix race in assemble_neg_contexts()
cifs: protect access of TCP_Server_Info::{dstaddr,hostname}
cifs: fix file info setting in cifs_query_path_info()
cifs: fix file info setting in cifs_open_file()
cifs: fix double free on failed kerberos auth
cifs: do not query ifaces on smb1 mounts
cifs: fix potential memory leaks in session setup
cifs: fix potential deadlock in cache_refresh_path()
cifs: avoid re-lookups in dfs_cache_find()
cifs: don't take exclusive lock for updating target hints
cifs: remove duplicate code in __refresh_tcon()
cifs: handle cache lookup errors different than -ENOENT
cifs: fix return of uninitialized rc in dfs_cache_update_tgthint()
cifs: remove unused function
cifs: prevent data race in smb2_reconnect()
cifs: get rid of unneeded conditional in cifs_get_num_sgs()
cifs: fix mount on old smb servers
cifs: get rid of dns resolve worker
cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID
cifs: prevent data race in cifs_reconnect_tcon()
cifs: set DFS root session in cifs_get_smb_ses()
cifs: fix use-after-free bug in refresh_cache_worker()
cifs: return DFS root session id in DebugData
cifs: use DFS root session instead of tcon ses
cifs: fix missing unload_nls() in smb2_reconnect()
cifs: fix dentry lookups in directory handle cache
cifs: avoid races in parallel reconnects in smb1
cifs: prevent infinite recursion in CIFSGetDFSRefer()
cifs: get rid of dead check in smb2_reconnect()
cifs: avoid dup prefix path in dfs_get_automount_devname()
cifs: protect session status check in smb2_reconnect()
cifs: print smb3_fs_context::source when mounting
cifs: fix potential use-after-free bugs in TCP_Server_Info::hostname
cifs: fix potential race when tree connecting ipc
cifs: protect access of TCP_Server_Info::{origin,leaf}_fullpath
cifs: avoid potential races when handling multiple dfs tcons
cifs: fix sharing of DFS connections
cifs: fix smb1 mount regression
Pawel Witek (1):
cifs: fix pcchunk length type in smb2_copychunk_range
Ronnie Sahlberg (35):
cifs: Create a new shared file holding smb2 pdu definitions
cifs: move NEGOTIATE_PROTOCOL definitions out into the common area
cifs: Move more definitions into the shared area
cifs: Move more definitions into the shared area
cifs: Move SMB2_Create definitions to the shared area
cifs: serialize all mount attempts
cifs: do not use uninitialized data in the owner/group sid
cifs: fix double free race when mount fails in cifs_get_root()
cifs: modefromsids must add an ACE for authenticated users
cifs: fix handlecache and multiuser
cifs: truncate the inode and mapping when we simulate fcollapse
cifs: we do not need a spinlock around the tree access during umount
cifs: convert the path to utf16 in smb2_query_info_compound
cifs: change smb2_query_info_compound to use a cached fid, if
available
cifs: verify that tcon is valid before dereference in cifs_kill_sb
cifs: destage any unwritten data to the server before calling
copychunk_write
cifs: move definition of cifs_fattr earlier in cifsglob.h
cifs: check for smb1 in open_cached_dir()
cifs: set the CREATE_NOT_FILE when opening the directory in
use_cached_dir()
cifs: cache the dirents for entries in a cached directory
cifs: fix potential double free during failed mount
cifs: when extending a file with falloc we should make files
not-sparse
cifs: Do not use tcon->cfid directly, use the cfid we get from
open_cached_dir
cifs: Do not access tcon->cfids->cfid directly from
is_path_accessible
cifs: revalidate mapping when doing direct writes
cifs: destage dirty pages before re-reading them for cache=none
cifs: improve handlecaching
cifs: store a pointer to a fid in the cfid structure instead of
the struct
cifs: fix skipping to incorrect offset in emit_cached_dirents
cifs: fix regression in very old smb1 mounts
cifs: enable caching of directories for which a lease is held
cifs: find and use the dentry for cached non-root directories also
cifs: set rc to -ENOENT if we can not get a dentry for the cached dir
cifs: drop the lease for cached directories on rmdir or rename
cifs: Check the lease context if we actually got a lease
cifs: return a single-use cfid if we did not get a lease
Ryan Bair (1):
cifs: fix workstation_name for multiuser mounts
Shyam Prasad N (70):
cifs: To match file servers, make sure the server hostname matches
cifs: nosharesock should not share socket with future sessions
cifs: send workstation name during ntlmssp session setup
cifs: for compound requests, use open handle if possible
cifs: do not negotiate session if session already exists
cifs: protect session channel fields with chan_lock
cifs: connect individual channel servers to primary channel server
cifs: do not duplicate fscache cookie for secondary channels
cifs: nosharesock should be set on new server
cifs: populate server_hostname for extra channels
cifs: wait for tcon resource_id before getting fscache super
cifs: add server conn_id to fscache client cookie
cifs: avoid use of dstaddr as key for fscache client cookie
cifs: ignore resource_id while getting fscache super cookie
cifs: track individual channel status using chans_need_reconnect
cifs: use the chans_need_reconnect bitmap for reconnect status
cifs: adjust DebugData to use chans_need_reconnect for conn status
cifs: add WARN_ON for when chan_count goes below minimum
cifs: reconnect only the connection and not smb session where
possible
cifs: take cifs_tcp_ses_lock for status checks
cifs: maintain a state machine for tcp/smb/tcon sessions
cifs: avoid race during socket reconnect between send and recv
cifs: free ntlmsspblob allocated in negotiate
cifs: check reconnects for channels of active tcons too
cifs: fix the connection state transitions with multichannel
cifs: protect all accesses to chan_* with chan_lock
cifs: fix the cifs_reconnect path for DFS
cifs: remove repeated state change in dfs tree connect
cifs: make status checks in version independent callers
cifs: update tcpStatus during negotiate and sess setup
cifs: cifs_ses_mark_for_reconnect should also update reconnect bits
cifs: unlock chan_lock before calling cifs_put_tcp_session
cifs: call cifs_reconnect when a connection is marked
cifs: call helper functions for marking channels for reconnect
cifs: mark sessions for reconnection in helper function
cifs: use a different reconnect helper for non-cifsd threads
cifs: release cached dentries only if mount is complete
cifs: do not use tcpStatus after negotiate completes
cifs: use new enum for ses_status
cifs: avoid parallel session setups on same channel
cifs: return errors during session setup during reconnects
cifs: populate empty hostnames for extra channels
cifs: when a channel is not found for server, log its connection id
smb3: use netname when available on secondary channels
cifs: change iface_list from array to sorted linked list
cifs: during reconnect, update interface if necessary
cifs: periodically query network interfaces from server
cifs: avoid deadlocks while updating iface
cifs: fix race condition with delayed threads
cifs: remove unnecessary locking of chan_lock while freeing session
cifs: avoid use of global locks for high contention data
cifs: always iterate smb sessions using primary channel
cifs: avoid unnecessary iteration of tcp sessions
cifs: refcount only the selected iface during interface update
cifs: fix interface count calculation during refresh
cifs: print last update time for interface list
cifs: use the least loaded channel for sending requests
cifs: use tcon allocation functions even for dummy tcon
cifs: update ip_addr for ses only for primary chan setup
cifs: match even the scope id for ipv6 addresses
cifs: reuse cifs_match_ipaddr for comparison of dstaddr too
cifs: generate signkey for the channel that's reconnecting
cifs: check only tcon status on tcon related functions
cifs: lock chan_lock outside match_session
cifs: do not poll server interfaces too regularly
cifs: empty interface list when server doesn't support query
interfaces
cifs: dump pending mids for all channels in DebugData
cifs: print session id while listing open files
cifs: append path to open_enter trace event
cifs: avoid race conditions with parallel reconnects
Stefan Metzmacher (5):
cifs: don't send down the destination address to sendmsg for a
SOCK_STREAM
cifs: always initialize struct msghdr smb_msg completely
cifs: introduce cifs_io_parms in smb2_async_writev()
cifs: split out smb3_use_rdma_offload() helper
cifs: don't try to use rdma offload on encrypted connections
Steve French (143):
cifs: add mount parameter tcpnodelay
smb3: add dynamic trace points for socket connection
smb3: do not error on fsync when readonly
smb3: remove trivial dfs compile warning
smb3: add additional null check in SMB2_ioctl
smb3: add additional null check in SMB2_open
smb3: add additional null check in SMB2_tcon
cifs: release lock earlier in dequeue_mid error case
smb3: add additional null check in SMB311_posix_mkdir
smb3: do not setup the fscache_super_cookie until fsinfo initialized
cifs: move debug print out of spinlock
cifs: protect srv_count with cifs_tcp_ses_lock
smb2: clarify rc initialization in smb2_reconnect
cifs: update internal version number
smb3: add new defines from protocol specification
smb3: send NTLMSSP version information
cifs: update internal module number
improve error message when mount options conflict with posix
smb3: fix snapshot mount option
cifs: fix confusing unneeded warning message on smb2.1 and earlier
smb3: fix incorrect session setup check for multiuser mounts
Adjust cifssb maximum read size
move more common protocol header definitions to smbfs_common
smb3: move defines for ioctl protocol header and SMB2 sizes to
smbfs_common
smb3: move defines for query info and query fsinfo to smbfs_common
smb3: cleanup and clarify status of tree connections
smb3: fix ksmbd bigendian bug in oplock break, and move its
struct to smbfs_common
cifs: update internal module number
SMB3: EBADF/EIO errors in rename/open caused by race condition in
smb2_compound_op
smb3: add trace point for lease not found issue
smb3: add trace point for oplock not found
Add defines for various newer FSCTLs
Add various fsctl structs
cifs: fix minor compile warning
smb3: check for null tcon
smb3: don't set rc when used and unneeded in query_info_compound
smb3: add mount parm nosparse
smb3: remove unneeded null check in cifs_readdir
cifs: do not build smb1ops if legacy support is disabled
cifs: version operations for smb20 unneeded when legacy support
disabled
cifs: update internal module number
cifs: fix uninitialized pointer in error case in
dfs_cache_get_tgt_share
smb3: add trace point for SMB2_set_eof
smb3: fix empty netname context on secondary channels
smb3: workaround negprot bug in some Samba servers
smb3: check xattr value length earlier
cifs: remove some camelCase and also some static build warnings
cifs: remove minor build warning
cifs: remove remaining build warnings
cifs: when insecure legacy is disabled shrink amount of SMB1 code
cifs: remove "cifs_" prefix from init/destroy mids functions
cifs: alloc_mid function should be marked as static
cifs: update internal module number
cifs: Move cached-dir functions into a separate file
smb3: allow deferred close timeout to be configurable
cifs: Add constructor/destructors for tcon->cfid
smb3: fix temporary data corruption in collapse range
smb3: use filemap_write_and_wait_range instead of
filemap_write_and_wait
cifs: update internal module number
smb3: add dynamic trace points for tree disconnect
cifs: Make tcon contain a wrapper structure cached_fids instead
of cached_fid
smb3: define missing create contexts
smb3: do not log confusing message when server returns no network
interfaces
cifs: replace kfree() with kfree_sensitive() for sensitive data
smb3: fix oops in calculating shash_setkey
smb3: clarify multichannel warning
smb3: must initialize two ACL struct fields to zero
cifs: lease key is uninitialized in smb1 paths
cifs: lease key is uninitialized in two additional functions when
smb1
smb3: improve SMB3 change notification support
smb3: interface count displayed incorrectly
cifs: update internal module number
cifs: fix use-after-free on the link name
cifs: minor cleanup of some headers
cifs: fix various whitespace errors in headers
cifs: fix missing display of three mount options
cifs: print warning when conflicting soft vs. hard mount options
specified
cifs: split out ses and tcon retrieval from mount_get_conns()
cifs: update internal module number
cifs: update Kconfig description
cifs: fix indentation in make menuconfig options
update internal module version number for cifs.ko
smb3: lower default deferred close timeout to address perf regression
smb3: fix unusable share after force unmount failure
cifs: missing lock when updating session status
SMB3.1.1: add new tree connect ShareFlags
smb3: make query_on_disk_id open context consistent and move to
common code
smb3: move some common open context structs to smbfs_common
cifs: update internal module version number for cifs.ko
SMB3.1.1: correct definition for app_instance_id create contexts
do not reuse connection if share marked as isolated
smb3: improve parallel reads of large files
SMB3: force unmount was failing to close deferred close files
smb3: fix problem remounting a share after shutdown
cifs: release leases for deferred close handles when freezing
smb3: display debug information better for encryption
cifs: mapchars mount option ignored
smb3: missing null check in SMB2_change_notify
smb: delete an unnecessary statement
cifs: address unused variable warning
smb: remove obsolete comment
cifs: fix status checks in cifs_tree_connect
cifs: print all credit counters in DebugData
smb/client: print "Unknown" instead of bogus link speed value
cifs: fix sockaddr comparison in iface_cmp
cifs: fix max_credits implementation
cifs: fix lease break oops in xfstest generic/098
cifs: add a warning when the in-flight count goes negative
SMB3: Do not send lease break acknowledgment if all file handles
have been closed
cifs: print nosharesock value while dumping mount options
smb: client: fix warning in cifs_match_super()
smb: client: fix warning in cifs_smb3_do_mount()
cifs: print more detail when invalidate_inode_mapping fails
smb3: do not reserve too many oplock credits
smb: client: fix warning in CIFSFindFirst()
smb: client: fix warning in CIFSFindNext()
smb: client: fix warning in generic_ip_connect()
cifs: prevent use-after-free by freeing the cfile later
cifs: do all necessary checks for credits within or before locking
cifs: fix session state check in reconnect to avoid
use-after-free issue
cifs: fix session state check in smb2_find_smb_ses
cifs: print client_guid in DebugData
smb: client: fix broken file attrs with nodfs mounts
smb: client: fix parsing of source mount option
smb: client: fix shared DFS root mounts with different prefixes
smb: client: improve DFS mount check
cifs: log session id when a matching ses is not found
cifs: new dynamic tracepoint to track ses not found errors
cifs: fix session state transition to avoid use-after-free issue
smb: client: remove redundant pointer 'server'
cifs: if deferred close is disabled then close files immediately
smb: client: Fix -Wstringop-overflow issues
smb: client: fix missed ses refcounting
cifs: fix mid leak during reconnection after timeout threshold
cifs: update internal module version number for cifs.ko
cifs: allow dumping keys for directories too
smb3: do not set NTLMSSP_VERSION flag for negotiate not auth request
cifs: add missing return value check for cifs_sb_tlink
smb: client: fix dfs link mount against w2k8
cifs: fix potential oops in cifs_oplock_break
cifs: Release folio lock on fscache read hit.
smb3: display network namespace in debug information
smb: client: fix null auth
Thiago Rafael Becker (2):
cifs: sanitize multiple delimiters in prepath
cifs: sanitize paths in cifs_update_super_prepath.
Tim Gardner (232):
Revert "UBUNTU: SAUCE: Fix cifs: fix mid leak during reconnection
after timeout threshold"
Revert "smb3: lower default deferred close timeout to address
perf regression"
Revert "smb3: allow deferred close timeout to be configurable"
Revert "cifs: remove minor build warning"
Revert "cifs: remove some camelCase and also some static build
warnings"
Revert "cifs: remove unnecessary (void*) conversions."
Revert "cifs: remove unnecessary type castings"
Revert "cifs: remove redundant initialization to variable
mnt_sign_enabled"
Revert "smb3: workaround negprot bug in some Samba servers"
Revert "cifs: remove unnecessary locking of chan_lock while
freeing session"
Revert "cifs: fix race condition with delayed threads"
Revert "cifs: update cifs_ses::ip_addr after failover"
Revert "cifs: avoid deadlocks while updating iface"
Revert "cifs: periodically query network interfaces from server"
Revert "cifs: during reconnect, update interface if necessary"
Revert "cifs: change iface_list from array to sorted linked list"
Revert "smb3: use netname when available on secondary channels"
Revert "smb3: fix empty netname context on secondary channels"
Revert "cifs: when a channel is not found for server, log its
connection id"
Revert "smb3: add trace point for SMB2_set_eof"
Revert "cifs: populate empty hostnames for extra channels"
Revert "cifs: fix uninitialized pointer in error case in
dfs_cache_get_tgt_share"
Revert "cifs: skip trailing separators of prefix paths"
Revert "cifs: update internal module number"
Revert "cifs: do not build smb1ops if legacy support is disabled"
Revert "cifs: fix potential deadlock in direct reclaim"
Revert "cifs: remove repeated debug message on cifs_put_smb_ses()"
Revert "smb3: remove unneeded null check in cifs_readdir"
Revert "cifs: fix ntlmssp on old servers"
Revert "cifs: cache the dirents for entries in a cached directory"
Revert "cifs: avoid parallel session setups on same channel"
Revert "cifs: use new enum for ses_status"
Revert "cifs: do not use tcpStatus after negotiate completes"
Revert "smb3: add mount parm nosparse"
Revert "smb3: don't set rc when used and unneeded in
query_info_compound"
Revert "cifs: fix minor compile warning"
Revert "Add various fsctl structs"
Revert "Add defines for various newer FSCTLs"
Revert "smb3: add trace point for oplock not found"
Revert "cifs: return the more nuanced writeback error on close()"
Revert "smb3: add trace point for lease not found issue"
Revert "cifs: smbd: fix typo in comment"
Revert "cifs: set the CREATE_NOT_FILE when opening the directory
in use_cached_dir()"
Revert "cifs: check for smb1 in open_cached_dir()"
Revert "cifs: move definition of cifs_fattr earlier in cifsglob.h"
Revert "cifs: print TIDs as hex"
Revert "cifs: return ENOENT for DFS lookup_cache_entry()"
Revert "cifs: don't call cifs_dfs_query_info_nonascii_quirk() if
nodfs was set"
Revert "cifs: fix signed integer overflow when fl_end is OFFSET_MAX"
Revert "cifs: use correct lock type in cifs_reconnect()"
Revert "cifs: fix NULL ptr dereference in refresh_mounts()"
Revert "cifs: Use kzalloc instead of kmalloc/memset"
Revert "cifs: Split the smb3_add_credits tracepoint"
Revert "cifs: update internal module number"
Revert "cifs: force new session setup and tcon for dfs"
Revert "cifs: remove check of list iterator against head past the
loop body"
Revert "cifs: fix potential race with cifsd thread"
Revert "fs: Remove ->readpages address space operation"
Revert "smb3: fix ksmbd bigendian bug in oplock break, and move
its struct to smbfs_common"
Revert "smb3: cleanup and clarify status of tree connections"
Revert "smb3: move defines for query info and query fsinfo to
smbfs_common"
Revert "smb3: move defines for ioctl protocol header and SMB2
sizes to smbfs_common"
Revert "move more common protocol header definitions to smbfs_common"
Revert "cifs: fix incorrect use of list iterator after the loop"
Revert "cifs: fix bad fids sent over wire"
Revert "cifs: change smb2_query_info_compound to use a cached
fid, if available"
Revert "cifs: convert the path to utf16 in smb2_query_info_compound"
Revert "cifs: do not skip link targets when an I/O fails"
Revert "cifs: use a different reconnect helper for non-cifsd threads"
Revert "cifs: truncate the inode and mapping when we simulate
fcollapse"
Revert "smb3: fix incorrect session setup check for multiuser mounts"
Revert "treewide: Replace zero-length arrays with flexible-array
members"
Revert "cifs: mark sessions for reconnection in helper function"
Revert "cifs: call helper functions for marking channels for
reconnect"
Revert "cifs: call cifs_reconnect when a connection is marked"
Revert "improve error message when mount options conflict with posix"
Revert "cifs: fix workstation_name for multiuser mounts"
Revert "cifs: unlock chan_lock before calling cifs_put_tcp_session"
Revert "Fix a warning about a malformed kernel doc comment in cifs"
Revert "cifs: update internal module number"
Revert "smb3: send NTLMSSP version information"
Revert "cifs: cifs_ses_mark_for_reconnect should also update
reconnect bits"
Revert "cifs: update tcpStatus during negotiate and sess setup"
Revert "cifs: make status checks in version independent callers"
Revert "cifs: remove repeated state change in dfs tree connect"
Revert "cifs: fix the cifs_reconnect path for DFS"
Revert "cifs: remove unused variable ses_selected"
Revert "cifs: protect all accesses to chan_* with chan_lock"
Revert "cifs: fix the connection state transitions with multichannel"
Revert "cifs: check reconnects for channels of active tcons too"
Revert "smb3: add new defines from protocol specification"
Revert "cifs: serialize all mount attempts"
Revert "cifs: quirk for STATUS_OBJECT_NAME_INVALID returned for
non-ASCII dfs refs"
Revert "cifs: alloc_path_with_tree_prefix: do not append sep. if
the path is empty"
Revert "cifs: clean up an inconsistent indenting"
Revert "cifs: free ntlmsspblob allocated in negotiate"
Revert "cifs: fix FILE_BOTH_DIRECTORY_INFO definition"
Revert "cifs: move superblock magic defitions to magic.h"
Revert "cifs: Fix smb311_update_preauth_hash() kernel-doc comment"
Revert "cifs: avoid race during socket reconnect between send and
recv"
Revert "cifs: maintain a state machine for tcp/smb/tcon sessions"
Revert "cifs: fix hang on cifs_get_next_mid()"
Revert "cifs: take cifs_tcp_ses_lock for status checks"
Revert "cifs: reconnect only the connection and not smb session
where possible"
Revert "cifs: add WARN_ON for when chan_count goes below minimum"
Revert "cifs: adjust DebugData to use chans_need_reconnect for
conn status"
Revert "cifs: use the chans_need_reconnect bitmap for reconnect
status"
Revert "cifs: track individual channel status using
chans_need_reconnect"
Revert "cifs: remove redundant assignment to pointer p"
Revert "cifs: ignore resource_id while getting fscache super cookie"
Revert "cifs: fix ntlmssp auth when there is no key exchange"
Revert "cifs: avoid use of dstaddr as key for fscache client cookie"
Revert "cifs: add server conn_id to fscache client cookie"
Revert "cifs: wait for tcon resource_id before getting fscache super"
Revert "cifs: update internal version number"
Revert "smb2: clarify rc initialization in smb2_reconnect"
Revert "cifs: populate server_hostname for extra channels"
Revert "cifs: introduce cifs_ses_mark_for_reconnect() helper"
Revert "cifs: protect srv_count with cifs_tcp_ses_lock"
Revert "cifs: move debug print out of spinlock"
Revert "cifs: do not duplicate fscache cookie for secondary channels"
Revert "cifs: connect individual channel servers to primary
channel server"
Revert "cifs: do not negotiate session if session already exists"
Revert "smb3: do not setup the fscache_super_cookie until fsinfo
initialized"
Revert "cifs: fix potential use-after-free bugs"
Revert "smb3: add additional null check in SMB311_posix_mkdir"
Revert "cifs: release lock earlier in dequeue_mid error case"
Revert "smb3: add additional null check in SMB2_tcon"
Revert "smb3: add additional null check in SMB2_open"
Revert "smb3: add additional null check in SMB2_ioctl"
Revert "smb3: remove trivial dfs compile warning"
Revert "cifs: for compound requests, use open handle if possible"
Revert "cifs: convert list_for_each to entry variant"
Revert "cifs: fix print of hdr_flags in dfscache_proc_show()"
Revert "cifs: send workstation name during ntlmssp session setup"
Revert "smb3: add dynamic trace points for socket connection"
Revert "cifs: Move SMB2_Create definitions to the shared area"
Revert "cifs: Move more definitions into the shared area"
Revert "cifs: move NEGOTIATE_PROTOCOL definitions out into the
common area"
Revert "cifs: Create a new shared file holding smb2 pdu definitions"
Revert "cifs: add mount parameter tcpnodelay"
Revert "SMB3: Do not send lease break acknowledgment if all file
handles have been closed"
Revert "cifs: fix lease break oops in xfstest generic/098"
Revert "cifs: fix mid leak during reconnection after timeout
threshold"
Revert "cifs: mapchars mount option ignored"
Revert "SMB3: drop reference to cfile before sending oplock break"
Revert "SMB3: Close all deferred handles of inode in case of
handle lease break"
Revert "SMB3: force unmount was failing to close deferred close
files"
Revert "smb3: fix problem remounting a share after shutdown"
Revert "cifs: release leases for deferred close handles when
freezing"
Revert "cifs: fix pcchunk length type in smb2_copychunk_range"
Revert "SMB3: Close deferred file handles in case of handle lease
break"
Revert "SMB3: Add missing locks to protect deferred close file list"
Revert "cifs: sanitize paths in cifs_update_super_prepath."
Revert "smb3: lower default deferred close timeout to address
perf regression"
Revert "smb3: allow deferred close timeout to be configurable"
Revert "cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL"
Revert "cifs: prevent infinite recursion in CIFSGetDFSRefer()"
Revert "cifs: print session id while listing open files"
Revert "cifs: empty interface list when server doesn't support
query interfaces"
Revert "cifs: Fix smb2_set_path_size()"
Revert "cifs: Move the in_send statistic to __smb_send_rqst()"
Revert "cifs: Fix uninitialized memory read in smb3_qfs_tcon()"
Revert "cifs: Fix warning and UAF when destroy the MR list"
Revert "cifs: Fix lost destroy smbd connection when MR allocate
failed"
Revert "cifs: Fix use-after-free in rdata->read_into_pages()"
Revert "cifs: fix return of uninitialized rc in
dfs_cache_update_tgthint()"
Revert "cifs: Fix oops due to uncleared server->smbd_conn in
reconnect"
Revert "cifs: fix potential deadlock in cache_refresh_path()"
Revert "cifs: do not include page data when checking signature"
Revert "cifs: Fix uninitialized memory read for smb311 posix
symlink create"
Revert "cifs: fix missing display of three mount options"
Revert "cifs: fix confusing debug message"
Revert "cifs: fix oops during encryption"
Revert "cifs: fix use-after-free caused by invalid pointer
`hostname`"
Revert "cifs: fix missed refcounting of ipc tcon"
Revert "cifs: Fix connections leak when tlink setup failed"
Revert "cifs: support nested dfs links over reconnect"
Revert "cifs: split out dfs code from cifs_reconnect()"
Revert "cifs: introduce new helper for cifs_reconnect()"
Revert "cifs: add check for returning value of SMB2_set_info_init"
Revert "cifs: Fix wrong return value checking when GETFLAGS"
Revert "cifs: add check for returning value of SMB2_close_init"
Revert "cifs: fix regression in very old smb1 mounts"
Revert "cifs: Fix xid leak in cifs_ses_add_channel()"
Revert "cifs: Fix xid leak in cifs_flock()"
Revert "cifs: Fix xid leak in cifs_copy_file_range()"
Revert "cifs: Fix xid leak in cifs_create()"
Revert "cifs: return correct error in ->calc_signature()"
Revert "smb3: must initialize two ACL struct fields to zero"
Revert "cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO
message"
Revert "cifs: destage dirty pages before re-reading them for
cache=none"
Revert "cifs: always initialize struct msghdr smb_msg completely"
Revert "cifs: don't send down the destination address to sendmsg
for a SOCK_STREAM"
Revert "cifs: revalidate mapping when doing direct writes"
Revert "cifs: fix small mempool leak in SMB2_negotiate()"
Revert "smb3: missing inode locks in punch hole"
Revert "smb3: check xattr value length earlier"
Revert "cifs: Fix memory leak on the deferred close"
Revert "SMB3: fix lease break timeout when multiple deferred
close handles for the same file."
Revert "cifs: fix reconnect on smb3 mount types"
Revert "cifs: return errors during session setup during reconnects"
Revert "cifs: version operations for smb20 unneeded when legacy
support disabled"
Revert "SMB3: EBADF/EIO errors in rename/open caused by race
condition in smb2_compound_op"
Revert "smb3: check for null tcon"
Revert "cifs: when extending a file with falloc we should make
files not-sparse"
Revert "cifs: fix potential double free during failed mount"
Revert "cifs: destage any unwritten data to the server before
calling copychunk_write"
Revert "cifs: Check the IOCB_DIRECT flag, not O_DIRECT"
Revert "cifs: verify that tcon is valid before dereference in
cifs_kill_sb"
Revert "cifs: potential buffer overflow in handling symlinks"
Revert "cifs: release cached dentries only if mount is complete"
Revert "Adjust cifssb maximum read size"
Revert "cifs: fix NULL ptr dereference in smb2_ioctl_query_info()"
Revert "cifs: prevent bad output lengths in smb2_ioctl_query_info()"
Revert "cifs: we do not need a spinlock around the tree access
during umount"
Revert "cifs: fix handlecache and multiuser"
Revert "cifs: fix confusing unneeded warning message on smb2.1
and earlier"
Revert "cifs: protect session channel fields with chan_lock"
Revert "cifs: modefromsids must add an ACE for authenticated users"
Revert "cifs: fix double free race when mount fails in
cifs_get_root()"
Revert "cifs: do not use uninitialized data in the owner/group sid"
Revert "smb3: fix snapshot mount option"
Revert "cifs: fix set of group SID via NTSD xattrs"
Revert "cifs: sanitize multiple delimiters in prepath"
Revert "cifs: Fix crash on unload of cifs_arc4.ko"
Revert "cifs: nosharesock should be set on new server"
Revert "cifs: nosharesock should not share socket with future
sessions"
Revert "cifs: fix memory leak of
smb3_fs_context_dup::server_hostname"
Revert "smb3: do not error on fsync when readonly"
Revert "cifs: set a minimum of 120s for next dns resolution"
Revert "cifs: To match file servers, make sure the server
hostname matches"
Tom Talpey (4):
Decrease the number of SMB3 smbdirect client SGEs
Reduce client smbdirect max receive segment size
Handle variable number of SGEs in client smbdirect send.
Fix formatting of client smbdirect RDMA logging
Vincent Whitchurch (2):
cifs: Fix crash on unload of cifs_arc4.ko
cifs: fix potential deadlock in direct reclaim
Volker Lendecke (10):
cifs: Add "extbuf" and "extbuflen" args to smb2_compound_op()
cifs: Parse owner/group for stat in smb311 posix extensions
cifs: Fix uninitialized memory read for smb311 posix symlink create
cifs: Fix uninitialized memory read in smb3_qfs_tcon()
cifs: Fix uninitialized memory reads for oparms.mode
cifs: Fix smb2_set_path_size()
cifs: Simplify SMB2_open_init()
cifs: Simplify SMB2_open_init()
cifs: Simplify SMB2_open_init()
cifs: Avoid a cast in add_lease_context()
Wolfram Sang (1):
cifs: move from strlcpy with unused retval to strscpy
Xiaomeng Tong (1):
cifs: fix incorrect use of list iterator after the loop
Yang Li (3):
cifs: Fix smb311_update_preauth_hash() kernel-doc comment
cifs: clean up an inconsistent indenting
cifs: Remove duplicated include in cifsglob.h
Yang Yingliang (2):
cifs: fix wrong unlock before return from cifs_tree_connect()
cifs: use LIST_HEAD() and list_move() to simplify code
Yu Zhe (2):
cifs: remove unnecessary type castings
cifs: remove unnecessary (void*) conversions.
Zeng Heng (1):
cifs: fix use-after-free caused by invalid pointer `hostname`
Zhang Xiaoxu (18):
cifs: Fix memory leak on the deferred close
cifs: Use help macro to get the header preamble size
cifs: Use help macro to get the mid header size
cifs: Add helper function to check smb1+ server
cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO message
cifs: Fix xid leak in cifs_create()
cifs: Fix xid leak in cifs_copy_file_range()
cifs: Fix xid leak in cifs_flock()
cifs: Fix xid leak in cifs_ses_add_channel()
cifs: Fix xid leak in cifs_get_file_info_unix()
cifs: Fix memory leak when build ntlmssp negotiate blob failed
cifs: Fix pages array leak when writedata alloc failed in
cifs_writedata_alloc()
cifs: Fix pages leak when writedata alloc failed in
cifs_write_from_iter()
cifs: Fix connections leak when tlink setup failed
cifs: Fix wrong return value checking when GETFLAGS
cifs: Fix lost destroy smbd connection when MR allocate failed
cifs: Fix warning and UAF when destroy the MR list
cifs: Move the in_send statistic to __smb_send_rqst()
ZhaoLong Wang (1):
cifs: Fix use-after-free in rdata->read_into_pages()
fs/cifs/Kconfig | 65 +-
fs/cifs/Makefile | 8 +-
fs/cifs/cached_dir.c | 606 +++++++++++++++++
fs/cifs/cached_dir.h | 80 +++
fs/cifs/cifs_debug.c | 207 ++++--
fs/cifs/cifs_debug.h | 18 +-
fs/cifs/cifs_dfs_ref.c | 264 ++------
fs/cifs/cifs_fs_sb.h | 2 -
fs/cifs/cifs_ioctl.h | 10 +-
fs/cifs/cifs_spnego.c | 2 +-
fs/cifs/cifs_spnego.h | 2 +-
fs/cifs/cifs_swn.c | 12 +-
fs/cifs/cifsacl.c | 38 +-
fs/cifs/cifsencrypt.c | 110 ++-
fs/cifs/cifsfs.c | 154 +++--
fs/cifs/cifsfs.h | 8 +-
fs/cifs/cifsglob.h | 382 +++++------
fs/cifs/cifspdu.h | 155 ++---
fs/cifs/cifsproto.h | 122 +++-
fs/cifs/cifsroot.c | 2 +-
fs/cifs/cifssmb.c | 787 ++++------------------
fs/cifs/connect.c | 1619
++++++++++++++++-----------------------------
fs/cifs/dfs.c | 596 +++++++++++++++++
fs/cifs/dfs.h | 85 +++
fs/cifs/dfs_cache.c | 703 +++++---------------
fs/cifs/dfs_cache.h | 16 +-
fs/cifs/dir.c | 84 +--
fs/cifs/dns_resolve.c | 49 +-
fs/cifs/dns_resolve.h | 4 +-
fs/cifs/file.c | 391 +++++++++--
fs/cifs/fs_context.c | 99 ++-
fs/cifs/fs_context.h | 5 +-
fs/cifs/fscache.c | 2 +-
fs/cifs/inode.c | 310 +++++----
fs/cifs/ioctl.c | 57 +-
fs/cifs/link.c | 196 ++----
fs/cifs/misc.c | 335 ++++++----
fs/cifs/netmisc.c | 2 +-
fs/cifs/ntlmssp.h | 4 +-
fs/cifs/readdir.c | 48 +-
fs/cifs/sess.c | 74 ++-
fs/cifs/smb1ops.c | 189 +++---
fs/cifs/smb2file.c | 128 +++-
fs/cifs/smb2inode.c | 277 +++++---
fs/cifs/smb2misc.c | 152 +++--
fs/cifs/smb2ops.c | 1121 +++++++++++++------------------
fs/cifs/smb2pdu.c | 631 ++++++++++--------
fs/cifs/smb2pdu.h | 25 +-
fs/cifs/smb2proto.h | 44 +-
fs/cifs/smb2transport.c | 176 ++---
fs/cifs/smbdirect.c | 227 +++----
fs/cifs/smbdirect.h | 14 +-
fs/cifs/trace.h | 35 +-
fs/cifs/transport.c | 386 ++++++++---
fs/cifs/xattr.c | 5 +-
fs/smbfs_common/smb2pdu.h | 124 +++-
56 files changed, 6028 insertions(+), 5219 deletions(-)
create mode 100644 fs/cifs/cached_dir.c
create mode 100644 fs/cifs/cached_dir.h
create mode 100644 fs/cifs/dfs.c
create mode 100644 fs/cifs/dfs.h
--
-----------
Tim Gardner
Canonical, Inc
More information about the kernel-team
mailing list