Linux 6.6.32
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.32 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/stable/sysfs-block | 10 Documentation/admin-guide/hw-vuln/core-scheduling.rst | 4 Documentation/admin-guide/mm/damon/usage.rst | 2 Documentation/sphinx/kernel_include.py | 1 Makefile | 2 block/genhd.c | 15 block/partitions/core.c | 5 drivers/android/binder.c | 2 drivers/android/binder_internal.h | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 7 drivers/mmc/core/mmc.c | 9 drivers/net/ethernet/intel/ice/ice_virtchnl.c | 22 drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c | 3 drivers/net/ethernet/micrel/ks8851_common.c | 18 drivers/net/usb/ax88179_178a.c | 37 drivers/remoteproc/mtk_scp.c | 10 drivers/tty/serial/kgdboc.c | 30 drivers/usb/dwc3/gadget.c | 4 drivers/usb/typec/tipd/core.c | 45 drivers/usb/typec/tipd/tps6598x.h | 11 drivers/usb/typec/ucsi/displayport.c | 4 fs/erofs/internal.h | 7 fs/erofs/super.c | 124 - fs/smb/client/Makefile | 2 fs/smb/client/cached_dir.c | 24 fs/smb/client/cifs_debug.c | 38 fs/smb/client/cifsfs.c | 10 fs/smb/client/cifsglob.h | 93 - fs/smb/client/cifsproto.h | 39 fs/smb/client/cifssmb.c | 18 fs/smb/client/connect.c | 57 fs/smb/client/dir.c | 14 fs/smb/client/file.c | 39 fs/smb/client/fs_context.c | 43 fs/smb/client/fs_context.h | 13 fs/smb/client/fscache.c | 7 fs/smb/client/inode.c | 235 +-- fs/smb/client/ioctl.c | 6 fs/smb/client/link.c | 41 fs/smb/client/misc.c | 47 fs/smb/client/ntlmssp.h | 4 fs/smb/client/readdir.c | 32 fs/smb/client/reparse.c | 532 ++++++ fs/smb/client/reparse.h | 113 + fs/smb/client/sess.c | 73 fs/smb/client/smb1ops.c | 80 - fs/smb/client/smb2glob.h | 27 fs/smb/client/smb2inode.c | 1396 +++++++++++------- fs/smb/client/smb2maperror.c | 2 fs/smb/client/smb2misc.c | 10 fs/smb/client/smb2ops.c | 589 ++----- fs/smb/client/smb2pdu.c | 336 +++- fs/smb/client/smb2pdu.h | 46 fs/smb/client/smb2proto.h | 37 fs/smb/client/smb2status.h | 2 fs/smb/client/smb2transport.c | 2 fs/smb/client/smbdirect.c | 4 fs/smb/client/smbencrypt.c | 7 fs/smb/client/trace.h | 137 + fs/smb/common/smb2pdu.h | 116 - fs/smb/common/smbfsctl.h | 6 fs/smb/server/auth.c | 14 fs/smb/server/ksmbd_netlink.h | 36 fs/smb/server/mgmt/user_session.c | 28 fs/smb/server/mgmt/user_session.h | 3 fs/smb/server/misc.c | 1 fs/smb/server/oplock.c | 96 + fs/smb/server/oplock.h | 7 fs/smb/server/smb2misc.c | 26 fs/smb/server/smb2ops.c | 6 fs/smb/server/smb2pdu.c | 338 +++- fs/smb/server/smb2pdu.h | 31 fs/smb/server/transport_tcp.c | 2 fs/smb/server/vfs.c | 28 fs/smb/server/vfs_cache.c | 137 + fs/smb/server/vfs_cache.h | 9 include/linux/blkdev.h | 13 include/linux/bpf_types.h | 3 include/net/bluetooth/hci.h | 9 include/net/bluetooth/hci_core.h | 1 net/bluetooth/hci_conn.c | 71 net/bluetooth/hci_event.c | 31 net/bluetooth/iso.c | 2 net/bluetooth/l2cap_core.c | 38 net/bluetooth/sco.c | 6 security/keys/trusted-keys/trusted_tpm2.c | 25 tools/testing/selftests/kselftest.h | 14 88 files changed, 3907 insertions(+), 1722 deletions(-)
Akira Yokosawa (1):
docs: kernel_include.py: Cope with docutils 0.21
Alexey Dobriyan (1):
smb: client: delete "true", "false" defines
AngeloGioacchino Del Regno (1):
remoteproc: mediatek: Make sure IPI buffer fits in L2TCM
Baokun Li (1):
erofs: get rid of erofs_fs_context
Bharath SM (2):
cifs: defer close file handles having RH lease
cifs: remove redundant variable assignment
Carlos Llamas (1):
binder: fix max_thread type inconsistency
Christian Brauner (1):
erofs: reliably distinguish block based and fscache mode
Christoph Hellwig (2):
block: add a disk_has_partscan helper
block: add a partscan sysfs attribute for disks
Colin Ian King (2):
cifs: remove redundant variable tcon_exist
ksmbd: Fix spelling mistake "connction" -> "connection"
Dan Carpenter (1):
smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs()
Daniel Thompson (1):
serial: kgdboc: Fix NMI-safety problems from keyboard reset code
David Howells (2):
cifs: Pass unbyteswapped eof value into SMB2_set_eof()
cifs: Add tracing for the cifs_tcon struct refcounting
Enzo Matsumiya (3):
smb: client: negotiate compression algorithms
smb: common: fix fields sizes in compression_pattern_payload_v1
smb: common: simplify compression headers
Eric Biggers (1):
smb: use crypto_shash_digest() in symlink_hash()
Greg Kroah-Hartman (1):
Linux 6.6.32
Gustavo A. R. Silva (1):
smb: smb2pdu.h: Avoid -Wflex-array-member-not-at-end warnings
Heikki Krogerus (1):
usb: typec: ucsi: displayport: Fix potential deadlock
Jacob Keller (2):
ice: pass VSI pointer into ice_vc_isvalid_q_id
ice: remove unnecessary duplicate checks for VF VSI ID
Jarkko Sakkinen (2):
KEYS: trusted: Fix memory leak in tpm2_key_encode()
KEYS: trusted: Do not use WARN when encode fails
Javier Carrasco (1):
usb: typec: tipd: fix event checking for tps6598x
Jiri Olsa (1):
bpf: Add missing BPF_LINK_TYPE invocations
Jose Fernandez (1):
drm/amd/display: Fix division by zero in setup_dsc_config
Jose Ignacio Tornos Martinez (1):
net: usb: ax88179_178a: fix link status when link is set to down/up
Marios Makassikis (1):
ksmbd: fix possible null-deref in smb_lazy_parent_lease_break_close
Mark Brown (1):
kselftest: Add a ksft_perror() helper
Markus Elfring (1):
smb3: Improve exception handling in allocate_mr_list()
Meetakshi Setiya (4):
cifs: Add client version details to NTLM authenticate message
smb: client: reuse file lease key in compound operations
smb: client: retry compound request without reusing lease
cifs: fixes for get_inode_info
Mengqi Zhang (1):
mmc: core: Add HS400 tuning in HS400es initialization
Namjae Jeon (5):
ksmbd: mark SMB2_SESSION_EXPIRED to session when destroying previous session
ksmbd: add support for durable handles v1/v2
ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
ksmbd: fix potencial out-of-bounds when buffer offset is invalid
ksmbd: add continuous availability share parameter
Paulo Alcantara (17):
smb: client: allow creating symlinks via reparse points
smb: client: cleanup smb2_query_reparse_point()
smb: client: handle special files and symlinks in SMB3 POSIX
cifs: get rid of dup length check in parse_reparse_point()
smb: client: don't clobber ->i_rdev from cached reparse points
smb: client: handle path separator of created SMB symlinks
smb: client: get rid of smb311_posix_query_path_info()
smb: client: introduce reparse mount option
smb: client: move most of reparse point handling code to common file
smb: client: fix potential broken compound request
smb: client: reduce number of parameters in smb2_compound_op()
smb: client: add support for WSL reparse points
smb: client: parse uid, gid, mode and dev from WSL reparse points
smb: client: set correct d_type for reparse DFS/DFSR and mount point
smb: client: return reparse type in /proc/mounts
smb: client: fix NULL ptr deref in cifs_mark_open_handles_for_deleted_file()
smb: client: instantiate when creating SFU files
Pierre Mariani (1):
smb: client: Fix minor whitespace errors and warnings
Prashanth K (1):
usb: dwc3: Wait unconditionally after issuing EndXfer command
Randy Dunlap (2):
ksmbd: auth: fix most kernel-doc warnings
ksmbd: vfs: fix all kernel-doc warnings
Ritvik Budhiraja (1):
cifs: fix use after free for iface while disabling secondary channels
Ronald Wahl (1):
net: ks8851: Fix another TX stall caused by wrong ISR flag handling
SeongJae Park (1):
Docs/admin-guide/mm/damon/usage: fix wrong example of DAMOS filter matching sysfs file
Shyam Prasad N (6):
cifs: print server capabilities in DebugData
cifs: pick channel for tcon and tdis
cifs: new nt status codes from MS-SMB2
cifs: new mount option called retrans
cifs: commands that are retried should have replay flag set
cifs: set replay flag for retries of write command
Srinivasan Shanmugam (1):
drm/amdgpu: Fix possible NULL dereference in amdgpu_ras_query_error_status_helper()
Steve French (23):
SMB3: clarify some of the unused CreateOption flags
Add definition for new smb3.1.1 command type
smb3: minor RDMA cleanup
smb3: more minor cleanups for session handling routines
smb3: minor cleanup of session handling code
Missing field not being returned in ioctl CIFS_IOC_GET_MNT_INFO
smb: client: introduce cifs_sfu_make_node()
smb: client: extend smb2_compound_op() to accept more commands
smb: client: allow creating special files via reparse points
smb: client: optimise reparse point querying
cifs: fix in logging in cifs_chan_update_iface
cifs: remove unneeded return statement
cifs: minor comment cleanup
cifs: update the same create_guid on replay
smb3: update allocation size more accurately on write completion
smb: client: parse owner/group when creating reparse points
smb: client: do not defer close open handles to deleted files
smb: client: introduce SMB2_OP_QUERY_WSL_EA
smb3: add dynamic trace point for ioctls
cifs: Move some extern decls from .c files to .h
smb311: correct incorrect offset field in compression header
smb311: additional compression flag defined in updated protocol spec
smb3: add trace event for mknod
Sungwoo Kim (2):
Bluetooth: L2CAP: Fix slab-use-after-free in l2cap_connect()
Bluetooth: L2CAP: Fix div-by-zero in l2cap_le_flowctl_init()
Thomas Weißschuh (1):
admin-guide/hw-vuln/core-scheduling: fix return type of PR_SCHED_CORE_GET
Yang Li (2):
smb: Fix some kernel-doc comments
ksmbd: Add kernel-doc for ksmbd_extract_sharename() function
Greg Kroah-Hartman
maintainerDocumentation/ABI/stable/sysfs-block +10 -0
@@ -101,6 +101,16 @@ Description: devices that support receiving integrity metadata. +What: /sys/block/<disk>/partscan +Date: May 2024 +Contact: Christoph Hellwig <[email protected]> +Description: + The /sys/block/<disk>/partscan files reports if partition + scanning is enabled for the disk. It returns "1" if partition + scanning is enabled, or "0" if not. The value type is a 32-bit + unsigned integer, but only "0" and "1" are valid values. + + What: /sys/block/<disk>/<partition>/alignment_offset Date: April 2009 Contact: Martin K. Petersen <[email protected]>
Documentation/admin-guide/hw-vuln/core-scheduling.rst +2 -2
@@ -67,8 +67,8 @@ arg4: will be performed for all tasks in the task group of ``pid``. arg5: - userspace pointer to an unsigned long for storing the cookie returned by - ``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands. + userspace pointer to an unsigned long long for storing the cookie returned + by ``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands. In order for a process to push a cookie to, or pull a cookie from a process, it is required to have the ptrace access mode: `PTRACE_MODE_READ_REALCREDS` to the
Documentation/admin-guide/mm/damon/usage.rst +1 -1
@@ -389,7 +389,7 @@ pages of all memory cgroups except ``/having_care_already``.:: # # further filter out all cgroups except one at '/having_care_already' echo memcg > 1/type echo /having_care_already > 1/memcg_path - echo N > 1/matching + echo Y > 1/matching Note that ``anon`` and ``memcg`` filters are currently supported only when ``paddr`` `implementation <sysfs_contexts>` is being used.
Documentation/sphinx/kernel_include.py +0 -1
@@ -97,7 +97,6 @@ class KernelInclude(Include): # HINT: this is the only line I had to change / commented out: #path = utils.relative_path(None, path) - path = nodes.reprunicode(path) encoding = self.options.get( 'encoding', self.state.document.settings.input_encoding) e_handler=self.state.document.settings.input_encoding_error_handler
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 31 +SUBLEVEL = 32 EXTRAVERSION = NAME = Hurr durr I'ma ninja sloth
block/genhd.c +10 -5
@@ -345,9 +345,7 @@ int disk_scan_partitions(struct gendisk *disk, blk_mode_t mode)struct block_device *bdev;int ret =0 ; -if (disk->flags & (GENHD_FL_NO_PART |GENHD_FL_HIDDEN )) -return -EINVAL ; -if (test_bit (GD_SUPPRESS_PART_SCAN , &disk->state)) +if (!disk_has_partscan (disk))return -EINVAL ;if (disk->open_partitions)return -EBUSY ;
@@ -503,8 +501,7 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk, goto out_unregister_bdi;/* Make sure the first partition scan will be proceed */ -if (get_capacity (disk) && !(disk->flags &GENHD_FL_NO_PART ) && - !test_bit (GD_SUPPRESS_PART_SCAN , &disk->state)) +if (get_capacity (disk) &&disk_has_partscan (disk))set_bit (GD_NEED_PART_SCAN , &disk->state);bdev_add (disk->part0, ddev->devt);
@@ -1040,6 +1037,12 @@ static ssize_t diskseq_show(struct device *dev,return sprintf (buf,"%llu\n" , disk->diskseq); } +static ssize_t partscan_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +return sprintf (buf,"%u\n" ,disk_has_partscan (dev_to_disk (dev))); +} + static DEVICE_ATTR(range, 0444, disk_range_show, NULL); static DEVICE_ATTR(ext_range, 0444, disk_ext_range_show, NULL); static DEVICE_ATTR(removable, 0444, disk_removable_show, NULL);
@@ -1053,6 +1056,7 @@ static DEVICE_ATTR(stat, 0444, part_stat_show, NULL); static DEVICE_ATTR(inflight, 0444, part_inflight_show, NULL); static DEVICE_ATTR(badblocks, 0644, disk_badblocks_show, disk_badblocks_store); static DEVICE_ATTR(diskseq, 0444, diskseq_show, NULL); +static DEVICE_ATTR(partscan, 0444, partscan_show, NULL);#ifdef CONFIG_FAIL_MAKE_REQUEST ssize_t part_fail_show(struct device *dev,
@@ -1099,6 +1103,7 @@ static struct attribute *disk_attrs[] = { &dev_attr_events_async.attr, &dev_attr_events_poll_msecs.attr, &dev_attr_diskseq.attr, + &dev_attr_partscan.attr, #ifdef CONFIG_FAIL_MAKE_REQUEST &dev_attr_fail.attr, #endif
block/partitions/core.c +1 -4
@@ -592,10 +592,7 @@ static int blk_add_partitions(struct gendisk *disk)struct parsed_partitions *state;int ret = -EAGAIN , p; -if (disk->flags &GENHD_FL_NO_PART ) -return 0 ; - -if (test_bit (GD_SUPPRESS_PART_SCAN , &disk->state)) +if (!disk_has_partscan (disk))return 0 ; state =check_partition (disk);
drivers/android/binder.c +1 -1
@@ -5368,7 +5368,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) goto err;break ;case BINDER_SET_MAX_THREADS : { -int max_threads; +u32 max_threads;if (copy_from_user (&max_threads, ubuf,sizeof (max_threads))) {
drivers/android/binder_internal.h +1 -1
@@ -421,7 +421,7 @@ struct binder_proc {struct list_head todo;struct binder_stats stats;struct list_head delivered_death; -int max_threads; +u32 max_threads;int requested_threads;int requested_threads_started;int tmp_ref;
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -0
@@ -1025,6 +1025,9 @@ int amdgpu_ras_query_error_status(struct amdgpu_device *adev,if (!obj)return -EINVAL ; +if (!info || info->head.block ==AMDGPU_RAS_BLOCK_COUNT ) +return -EINVAL ; +if (info->head.block ==AMDGPU_RAS_BLOCK__UMC ) {amdgpu_ras_get_ecc_info (adev, &err_data); }else {
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +6 -1
@@ -1033,7 +1033,12 @@ static bool setup_dsc_config(if (!is_dsc_possible) goto done; - dsc_cfg->num_slices_v = pic_height/slice_height; +if (slice_height >0 ) { + dsc_cfg->num_slices_v = pic_height / slice_height; + }else { + is_dsc_possible = false; + goto done; + }if (target_bandwidth_kbps >0 ) { is_dsc_possible = decide_dsc_target_bpp_x16(
drivers/mmc/core/mmc.c +7 -2
@@ -1819,8 +1819,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,if (err) goto free_card; - - }else if (!mmc_card_hs400es (card)) { + }else if (mmc_card_hs400es (card)) { +if (host->ops->execute_hs400_tuning) { + err = host->ops->execute_hs400_tuning (host, card); +if (err) + goto free_card; + } + }else {/* Select the desired bus width optionally */ err =mmc_select_bus_width (card);if (err >0 &&mmc_card_hs (card)) {
drivers/net/ethernet/intel/ice/ice_virtchnl.c +10 -12
@@ -547,17 +547,15 @@ bool ice_vc_isvalid_vsi_id(struct ice_vf *vf, u16 vsi_id)/** * ice_vc_isvalid_q_id -* @vf: pointer to the VF info -* @vsi_id: VSI ID +* @vsi: VSI to check queue ID against * @qid: VSI relative queue ID * * check for the valid queue ID */ -static bool ice_vc_isvalid_q_id (struct ice_vf *vf,u16 vsi_id,u8 qid) +static bool ice_vc_isvalid_q_id (struct ice_vsi *vsi,u8 qid) { -struct ice_vsi *vsi =ice_find_vsi (vf->pf, vsi_id);/* allocated Tx and Rx queues should be always equal for VF VSI */ -return (vsi && (qid < vsi->alloc_txq)); +return qid < vsi->alloc_txq; }/**
@@ -1257,7 +1255,7 @@ static int ice_vc_ena_qs_msg(struct ice_vf *vf, u8 *msg)*/ q_map = vqs->rx_queues;for_each_set_bit (vf_q_id, &q_map,ICE_MAX_RSS_QS_PER_VF ) { -if (!ice_vc_isvalid_q_id (vf, vqs->vsi_id, vf_q_id)) { +if (!ice_vc_isvalid_q_id (vsi, vf_q_id)) { v_ret =VIRTCHNL_STATUS_ERR_PARAM ; goto error_param; }
@@ -1279,7 +1277,7 @@ static int ice_vc_ena_qs_msg(struct ice_vf *vf, u8 *msg) q_map = vqs->tx_queues;for_each_set_bit (vf_q_id, &q_map,ICE_MAX_RSS_QS_PER_VF ) { -if (!ice_vc_isvalid_q_id (vf, vqs->vsi_id, vf_q_id)) { +if (!ice_vc_isvalid_q_id (vsi, vf_q_id)) { v_ret =VIRTCHNL_STATUS_ERR_PARAM ; goto error_param; }
@@ -1384,7 +1382,7 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg) q_map = vqs->tx_queues;for_each_set_bit (vf_q_id, &q_map,ICE_MAX_RSS_QS_PER_VF ) { -if (!ice_vc_isvalid_q_id (vf, vqs->vsi_id, vf_q_id)) { +if (!ice_vc_isvalid_q_id (vsi, vf_q_id)) { v_ret =VIRTCHNL_STATUS_ERR_PARAM ; goto error_param; }
@@ -1410,7 +1408,7 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)bitmap_zero (vf->rxq_ena,ICE_MAX_RSS_QS_PER_VF ); }else if (q_map) {for_each_set_bit (vf_q_id, &q_map,ICE_MAX_RSS_QS_PER_VF ) { -if (!ice_vc_isvalid_q_id (vf, vqs->vsi_id, vf_q_id)) { +if (!ice_vc_isvalid_q_id (vsi, vf_q_id)) { v_ret =VIRTCHNL_STATUS_ERR_PARAM ; goto error_param; }
@@ -1466,7 +1464,7 @@ ice_cfg_interrupt(struct ice_vf *vf, struct ice_vsi *vsi, u16 vector_id,for_each_set_bit (vsi_q_id_idx, &qmap,ICE_MAX_RSS_QS_PER_VF ) { vsi_q_id = vsi_q_id_idx; -if (!ice_vc_isvalid_q_id (vf, vsi->vsi_num, vsi_q_id)) +if (!ice_vc_isvalid_q_id (vsi, vsi_q_id))return VIRTCHNL_STATUS_ERR_PARAM ; q_vector->num_ring_rx++;
@@ -1480,7 +1478,7 @@ ice_cfg_interrupt(struct ice_vf *vf, struct ice_vsi *vsi, u16 vector_id,for_each_set_bit (vsi_q_id_idx, &qmap,ICE_MAX_RSS_QS_PER_VF ) { vsi_q_id = vsi_q_id_idx; -if (!ice_vc_isvalid_q_id (vf, vsi->vsi_num, vsi_q_id)) +if (!ice_vc_isvalid_q_id (vsi, vsi_q_id))return VIRTCHNL_STATUS_ERR_PARAM ; q_vector->num_ring_tx++;
@@ -1629,7 +1627,7 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg) qpi->txq.headwb_enabled || !ice_vc_isvalid_ring_len(qpi->txq.ring_len) || !ice_vc_isvalid_ring_len(qpi->rxq.ring_len) || - !ice_vc_isvalid_q_id(vf, qci->vsi_id, qpi->txq.queue_id)) { + !ice_vc_isvalid_q_id(vsi, qpi->txq.queue_id)) { goto error_param; }
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c +0 -3
@@ -107,9 +107,6 @@ ice_vc_fdir_param_check(struct ice_vf *vf, u16 vsi_id)if (!(vf->driver_caps &VIRTCHNL_VF_OFFLOAD_FDIR_PF ))return -EINVAL ; -if (vsi_id != vf->lan_vsi_num) -return -EINVAL ; -if (!ice_vc_isvalid_vsi_id (vf, vsi_id))return -EINVAL ;
drivers/net/ethernet/micrel/ks8851_common.c +1 -17
@@ -328,7 +328,6 @@ static irqreturn_t ks8851_irq(int irq, void *_ks) {struct ks8851_net *ks = _ks;struct sk_buff_head rxq; -unsigned handled =0 ;unsigned long flags;unsigned int status;struct sk_buff *skb;
@@ -336,24 +335,17 @@ static irqreturn_t ks8851_irq(int irq, void *_ks)ks8851_lock (ks, &flags); status =ks8851_rdreg16 (ks,KS_ISR ); +ks8851_wrreg16 (ks,KS_ISR , status);netif_dbg (ks, intr, ks->netdev,"%s: status 0x%04x\n" , __func__, status); -if (status &IRQ_LCI ) - handled |=IRQ_LCI ; -if (status &IRQ_LDI ) {u16 pmecr =ks8851_rdreg16 (ks,KS_PMECR ); pmecr &= ~PMECR_WKEVT_MASK ;ks8851_wrreg16 (ks,KS_PMECR , pmecr |PMECR_WKEVT_LINK ); - - handled |=IRQ_LDI ; } -if (status &IRQ_RXPSI ) - handled |=IRQ_RXPSI ; -if (status &IRQ_TXI ) {unsigned short tx_space =ks8851_rdreg16 (ks,KS_TXMIR );
@@ -365,20 +357,12 @@ static irqreturn_t ks8851_irq(int irq, void *_ks)if (netif_queue_stopped (ks->netdev))netif_wake_queue (ks->netdev);spin_unlock (&ks->statelock); - - handled |=IRQ_TXI ; } -if (status &IRQ_RXI ) - handled |=IRQ_RXI ; -if (status &IRQ_SPIBEI ) {netdev_err (ks->netdev,"%s: spi bus error\n" , __func__); - handled |=IRQ_SPIBEI ; } -ks8851_wrreg16 (ks,KS_ISR , handled); -if (status &IRQ_RXI ) {/* the datasheet says to disable the rx interrupt during * packet read-out, however we're masking the interrupt
drivers/net/usb/ax88179_178a.c +26 -11
@@ -174,6 +174,7 @@ struct ax88179_data {u32 wol_supported;u32 wolopts;u8 disconnecting; +u8 initialized; };struct ax88179_int_data {
@@ -1673,6 +1674,18 @@ static int ax88179_reset(struct usbnet *dev)return 0 ; } +static int ax88179_net_reset (struct usbnet *dev) +{ +struct ax88179_data *ax179_data = dev->driver_priv; + +if (ax179_data->initialized) +ax88179_reset (dev); +else + ax179_data->initialized =1 ; + +return 0 ; +} +static int ax88179_stop (struct usbnet *dev) {u16 tmp16;
@@ -1692,6 +1705,7 @@ static const struct driver_info ax88179_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1704,6 +1718,7 @@ static const struct driver_info ax88178a_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1716,7 +1731,7 @@ static const struct driver_info cypress_GX3_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1729,7 +1744,7 @@ static const struct driver_info dlink_dub1312_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1742,7 +1757,7 @@ static const struct driver_info sitecom_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1755,7 +1770,7 @@ static const struct driver_info samsung_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1768,7 +1783,7 @@ static const struct driver_info lenovo_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1781,7 +1796,7 @@ static const struct driver_info belkin_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1794,7 +1809,7 @@ static const struct driver_info toshiba_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1807,7 +1822,7 @@ static const struct driver_info mct_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1820,7 +1835,7 @@ static const struct driver_info at_umc2000_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1833,7 +1848,7 @@ static const struct driver_info at_umc200_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
@@ -1846,7 +1861,7 @@ static const struct driver_info at_umc2000sp_info = { .unbind = ax88179_unbind, .status = ax88179_status, .link_reset = ax88179_link_reset, - .reset = ax88179_reset, + .reset = ax88179_net_reset, .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup,
drivers/remoteproc/mtk_scp.c +9 -1
@@ -126,7 +126,7 @@ static int scp_elf_read_ipi_buf_addr(struct mtk_scp *scp,static int scp_ipi_init (struct mtk_scp *scp,const struct firmware *fw) {int ret; -size_t offset; +size_t buf_sz, offset;/* read the ipi buf addr from FW itself first */ ret =scp_elf_read_ipi_buf_addr (scp, fw, &offset);
@@ -138,6 +138,14 @@ static int scp_ipi_init(struct mtk_scp *scp, const struct firmware *fw) }dev_info (scp->dev,"IPI buf addr %#010zx\n" , offset); +/* Make sure IPI buffer fits in the L2TCM range assigned to this core */ + buf_sz =sizeof (*scp->recv_buf) +sizeof (*scp->send_buf); + +if (scp->sram_size < buf_sz + offset) { +dev_err (scp->dev,"IPI buffer does not fit in SRAM.\n" ); +return -EOVERFLOW ; + } + scp->recv_buf = (struct mtk_share_obj __iomem *) (scp->sram_base + offset); scp->send_buf = (struct mtk_share_obj __iomem *)
drivers/tty/serial/kgdboc.c +29 -1
@@ -19,6 +19,7 @@#include <linux/console.h> #include <linux/vt_kern.h> #include <linux/input.h> +#include <linux/irq_work.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/serial_core.h>
@@ -48,6 +49,25 @@ static struct kgdb_io kgdboc_earlycon_io_ops;static int (*earlycon_orig_exit)(struct console *con);#endif /* IS_BUILTIN(CONFIG_KGDB_SERIAL_CONSOLE) */ +/* +* When we leave the debug trap handler we need to reset the keyboard status +* (since the original keyboard state gets partially clobbered by kdb use of +* the keyboard). +* +* The path to deliver the reset is somewhat circuitous. +* +* To deliver the reset we register an input handler, reset the keyboard and +* then deregister the input handler. However, to get this done right, we do +* have to carefully manage the calling context because we can only register +* input handlers from task context. +* +* In particular we need to trigger the action from the debug trap handler with +* all its NMI and/or NMI-like oddities. To solve this the kgdboc trap exit code +* (the "post_exception" callback) uses irq_work_queue(), which is NMI-safe, to +* schedule a callback from a hardirq context. From there we have to defer the +* work again, this time using schedule_work(), to get a callback using the +* system workqueue, which runs in task context. +*/ #ifdef CONFIG_KDB_KEYBOARD static int kgdboc_reset_connect(struct input_handler *handler, struct input_dev *dev,
@@ -99,10 +119,17 @@ static void kgdboc_restore_input_helper(struct work_struct *dummy) static DECLARE_WORK(kgdboc_restore_input_work, kgdboc_restore_input_helper); +static void kgdboc_queue_restore_input_helper (struct irq_work *unused) +{ +schedule_work (&kgdboc_restore_input_work); +} + +static DEFINE_IRQ_WORK(kgdboc_restore_input_irq_work, kgdboc_queue_restore_input_helper); +static void kgdboc_restore_input (void ) {if (likely (system_state ==SYSTEM_RUNNING )) -schedule_work (&kgdboc_restore_input_work); +irq_work_queue (&kgdboc_restore_input_irq_work); }static int kgdboc_register_kbd (char **cptr)
@@ -133,6 +160,7 @@ static void kgdboc_unregister_kbd(void) i--; } } +irq_work_sync (&kgdboc_restore_input_irq_work);flush_work (&kgdboc_restore_input_work); }#else /* ! CONFIG_KDB_KEYBOARD */
drivers/usb/dwc3/gadget.c +1 -3
@@ -1718,7 +1718,6 @@ static int __dwc3_gadget_get_frame(struct dwc3 *dwc)*/ static int __dwc3_stop_active_transfer (struct dwc3_ep *dep,bool force,bool interrupt) { -struct dwc3 *dwc = dep->dwc;struct dwc3_gadget_ep_cmd_params params;u32 cmd;int ret;
@@ -1743,8 +1742,7 @@ static int __dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force, bool int dep->resource_index =0 ;if (!interrupt) { - if (!DWC3_IP_IS(DWC3) || DWC3_VER_IS_PRIOR(DWC3, 310A)) -mdelay (1 ); +mdelay (1 ); dep->flags &= ~DWC3_EP_TRANSFER_STARTED ; }else if (!ret) { dep->flags |=DWC3_EP_END_TRANSFER_PENDING ;
drivers/usb/typec/tipd/core.c +32 -13
87 lines not on this page · raw message
drivers/usb/typec/tipd/tps6598x.h +11 -0
@@ -199,4 +199,15 @@#define TPS_DATA_STATUS_DP_SPEC_PIN_ASSIGNMENT_A BIT(2)#define TPS_DATA_STATUS_DP_SPEC_PIN_ASSIGNMENT_B (BIT(2) | BIT(1)) +/* Version Register */ +#define TPS_VERSION_HW_VERSION_MASK GENMASK(31, 24) +#define TPS_VERSION_HW_VERSION (x) TPS_FIELD_GET(TPS_VERSION_HW_VERSION_MASK, (x)) +#define TPS_VERSION_HW_65981_2_6 0x00 +#define TPS_VERSION_HW_65987_8_DH 0xF7 +#define TPS_VERSION_HW_65987_8_DK 0xF9 + +/* Int Event Register length */ +#define TPS_65981_2_6_INTEVENT_LEN 8 +#define TPS_65987_8_INTEVENT_LEN 11 +#endif /* __TPS6598X_H__ */
drivers/usb/typec/ucsi/displayport.c +0 -4
@@ -275,8 +275,6 @@ static void ucsi_displayport_work(struct work_struct *work) struct ucsi_dp *dp = container_of(work, struct ucsi_dp, work);int ret; -mutex_lock (&dp->con->lock); - ret =typec_altmode_vdm (dp->alt, dp->header, dp->vdo_data, dp->vdo_size);if (ret)
@@ -285,8 +283,6 @@ static void ucsi_displayport_work(struct work_struct *work) dp->vdo_data =NULL ; dp->vdo_size =0 ; dp->header =0 ; - -mutex_unlock (&dp->con->lock); }void ucsi_displayport_remove_partner (struct typec_altmode *alt)
fs/erofs/internal.h +0 -7
@@ -82,13 +82,6 @@ struct erofs_dev_context {bool flatdev; }; -struct erofs_fs_context { -struct erofs_mount_opts opt; -struct erofs_dev_context *devs; -char *fsid; -char *domain_id; -}; -/* all filesystem-wide lz4 configurations */ struct erofs_sb_lz4_info {/* # of pages needed for EROFS lz4 rolling decompression */
fs/erofs/super.c +55 -69
254 lines not on this page · raw message
fs/smb/client/Makefile +1 -1
@@ -12,7 +12,7 @@ cifs-y := trace.o cifsfs.o cifs_debug.o connect.o dir.o file.o \ smb2ops.o smb2maperror.o smb2transport.o \ smb2misc.o smb2pdu.o smb2inode.o smb2file.o cifsacl.o fs_context.o \ dns_resolve.o cifs_spnego_negtokeninit.asn1.o asn1.o \ - namespace.o + namespace.o reparse.o $(obj)/asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.h
fs/smb/client/cached_dir.c +20 -4
@@ -145,21 +145,27 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,struct cached_fid *cfid;struct cached_fids *cfids;const char *npath; +int retries =0 , cur_sleep =1 ;if (tcon ==NULL || tcon->cfids ==NULL || tcon->nohandlecache ||is_smb1_server (tcon->ses->server) || (dir_cache_timeout ==0 ))return -EOPNOTSUPP ; ses = tcon->ses; - server =cifs_pick_channel (ses); cfids = tcon->cfids; -if (!server->ops->new_lease_key) -return -EIO ; -if (cifs_sb->root ==NULL )return -ENOENT ; +replay_again: +/* reinitialize for possible replay */ + flags =0 ; + oplock =SMB2_OPLOCK_LEVEL_II ; + server =cifs_pick_channel (ses); + +if (!server->ops->new_lease_key) +return -EIO ; + utf16_path =cifs_convert_path_to_utf16 (path, cifs_sb);if (!utf16_path)return -ENOMEM ;
@@ -237,6 +243,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, FILE_READ_EA, .disposition = FILE_OPEN, .fid = pfid, + .replay = !!(retries), }; rc = SMB2_open_init(tcon, server,
@@ -269,6 +276,11 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,*/ cfid->has_lease = true; +if (retries) { +smb2_set_replay (server, &rqst[0 ]); +smb2_set_replay (server, &rqst[1 ]); + } + rc =compound_send_recv (xid, ses, server, flags,2 , rqst, resp_buftype, rsp_iov);
@@ -369,6 +381,10 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, }kfree (utf16_path); +if (is_replayable_error (rc) && +smb2_should_replay (tcon, &retries, &cur_sleep)) + goto replay_again; +return rc; }
fs/smb/client/cifs_debug.c +30 -8
@@ -280,6 +280,24 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)return 0 ; } +static __always_inline const char *compression_alg_str(__le16 alg) +{ +switch (alg) { +case SMB3_COMPRESS_NONE : +return "NONE" ; +case SMB3_COMPRESS_LZNT1 : +return "LZNT1" ; +case SMB3_COMPRESS_LZ77 : +return "LZ77" ; +case SMB3_COMPRESS_LZ77_HUFF : +return "LZ77-Huffman" ; +case SMB3_COMPRESS_PATTERN : +return "Pattern_V1" ; +default : +return "invalid" ; + } +} +static int cifs_debug_data_proc_show (struct seq_file *m,void *v) {struct mid_q_entry *mid_entry;
@@ -425,12 +443,6 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v) server->echo_credits, server->oplock_credits, server->dialect); -if (server->compress_algorithm ==SMB3_COMPRESS_LZNT1 ) -seq_printf (m," COMPRESS_LZNT1" ); -else if (server->compress_algorithm ==SMB3_COMPRESS_LZ77 ) -seq_printf (m," COMPRESS_LZ77" ); -else if (server->compress_algorithm ==SMB3_COMPRESS_LZ77_HUFF ) -seq_printf (m," COMPRESS_LZ77_HUFF" );if (server->sign)seq_printf (m," signed" );if (server->posix_ext_supported)
@@ -438,6 +450,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)if (server->nosharesock)seq_printf (m," nosharesock" ); +seq_printf (m,"\nServer capabilities: 0x%x" , server->capabilities); +if (server->rdma)seq_printf (m,"\nRDMA " ); seq_printf(m, "\nTCP status: %d Instance: %d"
@@ -460,6 +474,14 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v) server->leaf_fullpath); } +seq_puts (m,"\nCompression: " ); +if (!server->compression.requested) +seq_puts (m,"disabled on mount" ); +else if (server->compression.enabled) +seq_printf (m,"enabled (%s)" ,compression_alg_str (server->compression.alg)); +else +seq_puts (m,"disabled (not supported by this server)" ); +seq_printf (m,"\n\n\tSessions: " ); i =0 ;list_for_each_entry (ses, &server->smb_ses_list, smb_ses_list) {
@@ -777,14 +799,14 @@ static ssize_t name##_write(struct file *file, const char __user *buffer, \ size_t count, loff_t *ppos) \ { \ int rc; \ - rc =kstrtoint_from_user (buffer, count,10 , & name); \ + rc =kstrtoint_from_user (buffer, count,10 , &name); \if (rc) \return rc; \return count; \ } \ static int name##_proc_show(struct seq_file *m, void *v) \ { \ -seq_printf (m,"%d\n" , name ); \ +seq_printf (m,"%d\n" , name); \return 0 ; \ } \ static int name##_open(struct inode *inode, struct file *file) \
fs/smb/client/cifsfs.c +6 -4
@@ -150,10 +150,6 @@ MODULE_PARM_DESC(disable_legacy_dialects, "To improve security it may be ""vers=1.0 (CIFS/SMB1) and vers=2.0 are weaker" " and less secure. Default: n/N/0"); -extern mempool_t *cifs_sm_req_poolp; -extern mempool_t *cifs_req_poolp; -extern mempool_t *cifs_mid_poolp; -struct workqueue_struct *cifsiod_wq;struct workqueue_struct *decrypt_wq;struct workqueue_struct *fileinfo_put_wq;
@@ -674,6 +670,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)seq_printf (s,",backupgid=%u" ,from_kgid_munged (&init_user_ns, cifs_sb->ctx->backupgid)); +seq_show_option (s,"reparse" , +cifs_reparse_type_str (cifs_sb->ctx->reparse_type));seq_printf (s,",rsize=%u" , cifs_sb->ctx->rsize);seq_printf (s,",wsize=%u" , cifs_sb->ctx->wsize);
@@ -682,6 +680,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)seq_printf (s,",rasize=%u" , cifs_sb->ctx->rasize);if (tcon->ses->server->min_offload)seq_printf (s,",esize=%u" , tcon->ses->server->min_offload); +if (tcon->ses->server->retrans) +seq_printf (s,",retrans=%u" , tcon->ses->server->retrans);seq_printf (s,",echo_interval=%lu" , tcon->ses->server->echo_interval /HZ );
@@ -739,6 +739,8 @@ static void cifs_umount_begin(struct super_block *sb)spin_lock (&cifs_tcp_ses_lock);spin_lock (&tcon->tc_lock); +trace_smb3_tcon_ref (tcon->debug_id, tcon->tc_count, + netfs_trace_tcon_ref_see_umount);if ((tcon->tc_count >1 ) || (tcon->status ==TID_EXITING )) {/* we have other mounts to same share or we have already tried to umount this and woken up
fs/smb/client/cifsglob.h +70 -23
192 lines not on this page · raw message
fs/smb/client/cifsproto.h +27 -12
@@ -210,11 +210,11 @@ extern struct inode *cifs_iget(struct super_block *sb,int cifs_get_inode_info (struct inode **inode,const char *full_path,struct cifs_open_info_data *data,struct super_block *sb,int xid,const struct cifs_fid *fid); -bool cifs_reparse_point_to_fattr (struct cifs_sb_info *cifs_sb, -struct cifs_fattr *fattr, -struct cifs_open_info_data *data); -extern int smb311_posix_get_inode_info (struct inode **pinode,const char *search_path, -struct super_block *sb,unsigned int xid); +extern int smb311_posix_get_inode_info (struct inode **inode, +const char *full_path, +struct cifs_open_info_data *data, +struct super_block *sb, +const unsigned int xid);extern int cifs_get_inode_info_unix (struct inode **pinode,const unsigned char *search_path,struct super_block *sb,unsigned int xid);
@@ -294,12 +294,16 @@ extern void cifs_close_all_deferred_files(struct cifs_tcon *cifs_tcon);extern void cifs_close_deferred_file_under_dentry (struct cifs_tcon *cifs_tcon,const char *path); + +extern void cifs_mark_open_handles_for_deleted_file (struct inode *inode, +const char *path); +extern struct TCP_Server_Info *cifs_get_tcp_session (struct smb3_fs_context *ctx,struct TCP_Server_Info *primary_server);extern void cifs_put_tcp_session (struct TCP_Server_Info *server,int from_reconnect); -extern void cifs_put_tcon (struct cifs_tcon *tcon); +extern void cifs_put_tcon (struct cifs_tcon *tcon,enum smb3_tcon_ref_trace trace);extern void cifs_release_automount_timer (void );
@@ -400,7 +404,8 @@ extern int CIFSSMBSetFileDisposition(const unsigned int xid, __u32 pid_of_opener);extern int CIFSSMBSetEOF (const unsigned int xid,struct cifs_tcon *tcon,const char *file_name,__u64 size, -struct cifs_sb_info *cifs_sb,bool set_allocation); +struct cifs_sb_info *cifs_sb,bool set_allocation, +struct dentry *dentry);extern int CIFSSMBSetFileSize (const unsigned int xid,struct cifs_tcon *tcon,struct cifsFileInfo *cfile,__u64 size,bool set_allocation);
@@ -436,7 +441,8 @@ extern int CIFSPOSIXDelFile(const unsigned int xid, struct cifs_tcon *tcon,const struct nls_table *nls_codepage, int remap_special_chars);extern int CIFSSMBDelFile (const unsigned int xid,struct cifs_tcon *tcon, -const char *name,struct cifs_sb_info *cifs_sb); +const char *name,struct cifs_sb_info *cifs_sb, +struct dentry *dentry); int CIFSSMBRename(const unsigned int xid, struct cifs_tcon *tcon, struct dentry *source_dentry, const char *from_name, const char *to_name,
@@ -524,8 +530,9 @@ extern int CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses);extern struct cifs_ses *sesInfoAlloc (void );extern void sesInfoFree (struct cifs_ses *); -extern struct cifs_tcon *tcon_info_alloc (bool dir_leases_enabled); -extern void tconInfoFree (struct cifs_tcon *); +extern struct cifs_tcon *tcon_info_alloc (bool dir_leases_enabled, +enum smb3_tcon_ref_trace trace); +extern void tconInfoFree (struct cifs_tcon *tcon,enum smb3_tcon_ref_trace trace);extern int cifs_sign_rqst (struct smb_rqst *rqst,struct TCP_Server_Info *server,__u32 *pexpected_response_sequence_number);
@@ -673,6 +680,9 @@ char *extract_sharename(const char *unc);int parse_reparse_point (struct reparse_data_buffer *buf,u32 plen,struct cifs_sb_info *cifs_sb,bool unicode,struct cifs_open_info_data *data); +int cifs_sfu_make_node (unsigned int xid,struct inode *inode, +struct dentry *dentry,struct cifs_tcon *tcon, +const char *full_path,umode_t mode,dev_t dev);#ifdef CONFIG_CIFS_DFS_UPCALL static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,
@@ -712,8 +722,6 @@ static inline int cifs_create_options(struct cifs_sb_info *cifs_sb, int options)return options; } -struct super_block *cifs_get_tcon_super (struct cifs_tcon *tcon); -void cifs_put_tcon_super (struct super_block *sb);int cifs_wait_for_server_reconnect (struct TCP_Server_Info *server,bool retry);/* Put references of @ses and its children */
@@ -762,4 +770,11 @@ static inline void release_mid(struct mid_q_entry *mid) kref_put(&mid->refcount, __release_mid); } +static inline void cifs_free_open_info (struct cifs_open_info_data *data) +{ +kfree (data->symlink_target); +free_rsp_buf (data->reparse.io.buftype, data->reparse.io.iov.iov_base); +memset (data,0 ,sizeof (*data)); +} +#endif /* _CIFSPROTO_H */
fs/smb/client/cifssmb.c +14 -4
@@ -738,7 +738,7 @@ CIFSPOSIXDelFile(const unsigned int xid, struct cifs_tcon *tcon,int CIFSSMBDelFile (const unsigned int xid,struct cifs_tcon *tcon,const char *name, -struct cifs_sb_info *cifs_sb) +struct cifs_sb_info *cifs_sb,struct dentry *dentry) {DELETE_FILE_REQ *pSMB =NULL ;DELETE_FILE_RSP *pSMBr =NULL ;
@@ -2700,11 +2700,12 @@ int cifs_query_reparse_point(const unsigned int xid, u32 *tag, struct kvec *rsp, int *rsp_buftype) { + struct reparse_data_buffer *buf;struct cifs_open_parms oparms;TRANSACT_IOCTL_REQ *io_req =NULL ;TRANSACT_IOCTL_RSP *io_rsp =NULL ;struct cifs_fid fid; -__u32 data_offset, data_count; +__u32 data_offset, data_count, len;__u8 *start, *end;int io_rsp_len;int oplock =0 ;
@@ -2774,7 +2775,16 @@ int cifs_query_reparse_point(const unsigned int xid, goto error; } - *tag =le32_to_cpu (((struct reparse_data_buffer *)start)->ReparseTag); + data_count =le16_to_cpu (io_rsp->ByteCount); + buf = (struct reparse_data_buffer *)start; + len =sizeof (*buf); +if (data_count < len || + data_count <le16_to_cpu (buf->ReparseDataLength) + len) { + rc = -EIO ; + goto error; + } + + *tag =le32_to_cpu (buf->ReparseTag); rsp->iov_base = io_rsp; rsp->iov_len = io_rsp_len; *rsp_buftype =CIFS_LARGE_BUFFER ;
@@ -4983,7 +4993,7 @@ CIFSSMBQFSPosixInfo(const unsigned int xid, struct cifs_tcon *tcon,int CIFSSMBSetEOF (const unsigned int xid,struct cifs_tcon *tcon,const char *file_name,__u64 size,struct cifs_sb_info *cifs_sb, -bool set_allocation) +bool set_allocation,struct dentry *dentry) {struct smb_com_transaction2_spi_req *pSMB =NULL ;struct smb_com_transaction2_spi_rsp *pSMBr =NULL ;
fs/smb/client/connect.c +36 -21
230 lines not on this page · raw message
fs/smb/client/dir.c +11 -3
@@ -627,11 +627,18 @@ int cifs_mknod(struct mnt_idmap *idmap, struct inode *inode, goto mknod_out; } +trace_smb3_mknod_enter (xid, tcon->ses->Suid, tcon->tid, full_path); + rc = tcon->ses->server->ops->make_node (xid, inode, direntry, tcon, full_path, mode, device_number); mknod_out: +if (rc) +trace_smb3_mknod_err (xid, tcon->ses->Suid, tcon->tid, rc); +else +trace_smb3_mknod_done (xid, tcon->ses->Suid, tcon->tid); +free_dentry_path (page);free_xid (xid);cifs_put_tlink (tlink);
@@ -695,9 +702,10 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, full_path, d_inode(direntry)); again: -if (pTcon->posix_extensions) - rc =smb311_posix_get_inode_info (&newInode, full_path, parent_dir_inode->i_sb, xid); -else if (pTcon->unix_ext) { +if (pTcon->posix_extensions) { + rc =smb311_posix_get_inode_info (&newInode, full_path,NULL , + parent_dir_inode->i_sb, xid); + }else if (pTcon->unix_ext) { rc =cifs_get_inode_info_unix (&newInode, full_path, parent_dir_inode->i_sb, xid); }else {
fs/smb/client/file.c +30 -9
@@ -1102,14 +1102,16 @@ cifs_reopen_file(struct cifsFileInfo *cfile, bool can_flush)if (!is_interrupt_error (rc))mapping_set_error (inode->i_mapping, rc); -if (tcon->posix_extensions) - rc =smb311_posix_get_inode_info (&inode, full_path, inode->i_sb, xid); -else if (tcon->unix_ext) +if (tcon->posix_extensions) { + rc =smb311_posix_get_inode_info (&inode, full_path, +NULL , inode->i_sb, xid); + }else if (tcon->unix_ext) { rc =cifs_get_inode_info_unix (&inode, full_path, inode->i_sb, xid); -else + }else { rc =cifs_get_inode_info (&inode, full_path,NULL , inode->i_sb, xid,NULL ); + } }/* * Else we are writing out data to server already and could deadlock if
@@ -1149,6 +1151,19 @@ void smb2_deferred_work_close(struct work_struct *work)_cifsFileInfo_put (cfile, true, false); } +static bool +smb2_can_defer_close (struct inode *inode,struct cifs_deferred_close *dclose) +{ +struct cifs_sb_info *cifs_sb =CIFS_SB (inode->i_sb); +struct cifsInodeInfo *cinode =CIFS_I (inode); + +return (cifs_sb->ctx->closetimeo && cinode->lease_granted && dclose && + (cinode->oplock ==CIFS_CACHE_RHW_FLG || + cinode->oplock ==CIFS_CACHE_RH_FLG ) && + !test_bit (CIFS_INO_CLOSE_ON_LOCK , &cinode->flags)); + +} +int cifs_close (struct inode *inode,struct file *file) {struct cifsFileInfo *cfile;
@@ -1162,10 +1177,8 @@ int cifs_close(struct inode *inode, struct file *file) cfile = file->private_data; file->private_data =NULL ; dclose =kmalloc (sizeof (struct cifs_deferred_close ),GFP_KERNEL ); -if ((cifs_sb->ctx->closetimeo && cinode->oplock ==CIFS_CACHE_RHW_FLG ) - && cinode->lease_granted && - !test_bit (CIFS_INO_CLOSE_ON_LOCK , &cinode->flags) && - dclose) { +if ((cfile->status_file_deleted == false) && + (smb2_can_defer_close (inode, dclose))) {if (test_and_clear_bit (CIFS_INO_MODIFIED_ATTR , &cinode->flags)) {inode_set_mtime_to_ts (inode,inode_set_ctime_current (inode));
@@ -3202,8 +3215,15 @@ static int cifs_write_end(struct file *file, struct address_space *mapping,if (rc >0 ) {spin_lock (&inode->i_lock);if (pos > inode->i_size) { +loff_t additional_blocks = (512 -1 + copied) >>9 ; +i_size_write (inode, pos); - inode->i_blocks = (512 -1 + pos) >>9 ; +/* +* Estimate new allocation size based on the amount written. +* This will be updated from server on close (and on queryinfo) +*/ + inode->i_blocks =min_t (blkcnt_t, (512 -1 + pos) >>9 , + inode->i_blocks + additional_blocks); }spin_unlock (&inode->i_lock); }
@@ -3411,6 +3431,7 @@ cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list,if (wdata->cfile->invalidHandle) rc = -EAGAIN ;else { + wdata->replay = true;#ifdef CONFIG_CIFS_SMB_DIRECT if (wdata->mr) { wdata->mr->need_invalidate = true;
fs/smb/client/fs_context.c +42 -1
85 lines not on this page · raw message
fs/smb/client/fs_context.h +12 -1
@@ -41,6 +41,13 @@ enum {Opt_cache_err }; +enum cifs_reparse_parm { + Opt_reparse_default, + Opt_reparse_nfs, + Opt_reparse_wsl, + Opt_reparse_err +}; +enum cifs_sec_param { Opt_sec_krb5, Opt_sec_krb5i,
@@ -118,6 +125,7 @@ enum cifs_param { Opt_file_mode, Opt_dirmode, Opt_min_enc_offload, + Opt_retrans, Opt_blocksize, Opt_rasize, Opt_rsize,
@@ -148,6 +156,7 @@ enum cifs_param { Opt_vers, Opt_sec, Opt_cache, + Opt_reparse,/* Mount options to be ignored */ Opt_ignore,
@@ -249,6 +258,7 @@ struct smb3_fs_context {unsigned int rsize;unsigned int wsize;unsigned int min_offload; +unsigned int retrans; bool sockopt_tcp_nodelay:1;/* attribute cache timemout for files and directories in jiffies */ unsigned long acregmax;
@@ -267,12 +277,13 @@ struct smb3_fs_context {unsigned int max_credits;/* smb3 max_credits 10 < credits < 60000 */ unsigned int max_channels;unsigned int max_cached_dirs; -__u16 compression;/* compression algorithm 0xFFFF default 0=disabled */ +bool compress;/* enable SMB2 messages (READ/WRITE) de/compression */ bool rootfs:1; /* if it's a SMB root file system */ bool witness:1; /* use witness protocol */char *leaf_fullpath;struct cifs_ses *dfs_root_ses; bool dfs_automount:1; /* set for dfs automount only */ +enum cifs_reparse_type reparse_type; };extern const struct fs_parameter_spec smb3_fs_parameters[];
fs/smb/client/fscache.c +7 -0
@@ -94,6 +94,11 @@ int cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) }pr_err ("Cache volume key already in use (%s)\n" , key); vcookie =NULL ; +trace_smb3_tcon_ref (tcon->debug_id, tcon->tc_count, + netfs_trace_tcon_ref_see_fscache_collision); + }else { +trace_smb3_tcon_ref (tcon->debug_id, tcon->tc_count, + netfs_trace_tcon_ref_see_fscache_okay); } tcon->fscache = vcookie;
@@ -115,6 +120,8 @@ void cifs_fscache_release_super_cookie(struct cifs_tcon *tcon)cifs_fscache_fill_volume_coherency (tcon, &cd);fscache_relinquish_volume (tcon->fscache, &cd, false); tcon->fscache =NULL ; +trace_smb3_tcon_ref (tcon->debug_id, tcon->tc_count, + netfs_trace_tcon_ref_see_fscache_relinq); }void cifs_fscache_get_inode_cookie (struct inode *inode)
fs/smb/client/inode.c +104 -131
460 lines not on this page · raw message
fs/smb/client/ioctl.c +6 -0
@@ -143,6 +143,7 @@ static long smb_mnt_get_fsinfo(unsigned int xid, struct cifs_tcon *tcon, fsinf->version =1 ; fsinf->protocol_id = tcon->ses->server->vals->protocol_id; + fsinf->tcon_flags = tcon->Flags; fsinf->device_characteristics =le32_to_cpu (tcon->fsDevInfo.DeviceCharacteristics); fsinf->device_type =le32_to_cpu (tcon->fsDevInfo.DeviceType);
@@ -348,6 +349,11 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) xid =get_xid ();cifs_dbg (FYI ,"cifs ioctl 0x%x\n" , command); +if (pSMBFile ==NULL ) +trace_smb3_ioctl (xid,0 , command); +else +trace_smb3_ioctl (xid, pSMBFile->fid.persistent_fid, command); +switch (command) {case FS_IOC_GETFLAGS :if (pSMBFile ==NULL )
fs/smb/client/link.c +18 -23
80 lines not on this page · raw message
fs/smb/client/misc.c +41 -6
89 lines not on this page · raw message
fs/smb/client/ntlmssp.h +2 -2
@@ -133,8 +133,8 @@ typedef struct _AUTHENTICATE_MESSAGE {SECURITY_BUFFER WorkstationName;SECURITY_BUFFER SessionKey;__le32 NegotiateFlags; -/* SECURITY_BUFFER for version info not present since we -do not set the version is present flag */ +struct ntlmssp_version Version; +/* SECURITY_BUFFER */ char UserString[]; } __attribute__((packed)) AUTHENTICATE_MESSAGE, *PAUTHENTICATE_MESSAGE;
fs/smb/client/readdir.c +9 -23
@@ -22,6 +22,7 @@#include "smb2proto.h" #include "fs_context.h" #include "cached_dir.h" +#include "reparse.h" /* * To be safe - for UCS to UTF-8 with strings loaded with the rare long
@@ -55,23 +56,6 @@ static inline void dump_cifs_file_struct(struct file *file, char *label) }#endif /* DEBUG2 */ -/* -* Match a reparse point inode if reparse tag and ctime haven't changed. -* -* Windows Server updates ctime of reparse points when their data have changed. -* The server doesn't allow changing reparse tags from existing reparse points, -* though it's worth checking. -*/ -static inline bool reparse_inode_match (struct inode *inode, -struct cifs_fattr *fattr) -{ -struct timespec64 ctime =inode_get_ctime (inode); - -return (CIFS_I (inode)->cifsAttrs &ATTR_REPARSE ) && -CIFS_I (inode)->reparse_tag == fattr->cf_cifstag && -timespec64_equal (&ctime, &fattr->cf_ctime); -} -/* * Attempt to preload the dcache with the results from the FIND_FIRST/NEXT *
@@ -133,14 +117,16 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name,* Query dir responses don't provide enough * information about reparse points other than * their reparse tags. Save an invalidation by -* not clobbering the existing mode, size and -* symlink target (if any) when reparse tag and -* ctime haven't changed. +* not clobbering some existing attributes when +* reparse tag and ctime haven't changed. */ rc =0 ;if (fattr->cf_cifsattrs &ATTR_REPARSE ) {if (likely (reparse_inode_match (inode, fattr))) { fattr->cf_mode = inode->i_mode; + fattr->cf_rdev = inode->i_rdev; + fattr->cf_uid = inode->i_uid; + fattr->cf_gid = inode->i_gid; fattr->cf_eof =CIFS_I (inode)->server_eof; fattr->cf_symlink_target =NULL ; }else {
@@ -647,10 +633,10 @@ static int cifs_entry_is_dot(struct cifs_dirent *de, bool is_unicode)static int is_dir_changed (struct file *file) {struct inode *inode =file_inode (file); -struct cifsInodeInfo *cifsInfo =CIFS_I (inode); +struct cifsInodeInfo *cifs_inode_info =CIFS_I (inode); -if (cifsInfo->time ==0 ) -return 1 ;/* directory was changed, perhaps due to unlink */ +if (cifs_inode_info->time ==0 ) +return 1 ;/* directory was changed, e.g. unlink or new file */ else return 0 ;
fs/smb/client/reparse.c new file +532 -0
389 lines not on this page · raw message
fs/smb/client/reparse.h new file +113 -0
113 lines not on this page · raw message
fs/smb/client/sess.c +45 -28
73 lines not on this page · raw message
fs/smb/client/smb1ops.c +8 -72
80 lines not on this page · raw message
fs/smb/client/smb2inode.c +892 -504
1,396 lines not on this page · raw message
fs/smb/client/smb2ops.c +229 -360
589 lines not on this page · raw message
fs/smb/client/smb2pdu.c +287 -49
336 lines not on this page · raw message
fs/smb/client/smb2pdu.h +39 -7
46 lines not on this page · raw message
fs/smb/client/trace.h +133 -4
137 lines not on this page · raw message
fs/smb/common/smb2pdu.h +75 -41
116 lines not on this page · raw message
fs/smb/server/oplock.c +82 -14
96 lines not on this page · raw message
fs/smb/server/smb2pdu.c +287 -51
338 lines not on this page · raw message
fs/smb/server/vfs_cache.c +134 -3
137 lines not on this page · raw message
net/bluetooth/hci_conn.c +49 -22
71 lines not on this page · raw message
security/keys/trusted-keys/trusted_tpm2.c +19 -6
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.