6.6.4-rc1 review
Subsystems (8)
Greg Kroah-Hartman
maintainercover 6.6.4-rc1 review
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.6.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.6.4-rc1
Johan Hovold <[email protected]>
USB: dwc3: qcom: fix wakeup after probe deferral
Johan Hovold <[email protected]>
USB: dwc3: qcom: fix software node leak on probe errors
Ricardo Ribalda <[email protected]>
usb: dwc3: set the dma max_seg_size
Alexander Stein <[email protected]>
usb: dwc3: Fix default mode initialization
Oliver Neukum <[email protected]>
USB: dwc2: write HCINT with INTMASK applied
Badhri Jagan Sridharan <[email protected]>
usb: typec: tcpm: Skip hard reset when in error recovery
Badhri Jagan Sridharan <[email protected]>
usb: typec: tcpm: Fix sink caps op current check
Lech Perczak <[email protected]>
USB: serial: option: don't claim interface 4 for ZTE MF290
Puliang Lu <[email protected]>
USB: serial: option: fix FM101R-GL defines
Victor Fragoso <[email protected]>
USB: serial: option: add Fibocom L7xx modules
Pawel Laszczak <[email protected]>
usb: cdnsp: Fix deadlock issue during using NCM gadget
Niklas Neronin <[email protected]>
usb: config: fix iteration issue in 'usb_get_bos_descriptor()'
Johan Hovold <[email protected]>
USB: xhci-plat: fix legacy PHY double init
Mingzhe Zou <[email protected]>
bcache: fixup lock c->root error
Mingzhe Zou <[email protected]>
bcache: fixup init dirty data errors
Rand Deeb <[email protected]>
bcache: prevent potential division by zero error
Coly Li <[email protected]>
bcache: check return value from btree_node_alloc_replacement()
Peilin Ye <[email protected]>
veth: Use tstats per-CPU traffic counters
Mikulas Patocka <[email protected]>
dm-delay: fix a race between delay_presuspend and delay_bio
Stefan Binding <[email protected]>
ALSA: hda/realtek: Add quirks for ASUS 2024 Zenbooks
Vitalii Torshyn <[email protected]>
ALSA: hda: ASUS UM5302LA: Added quirks for cs35L41/10431A83 on i2c bus
Shyam Prasad N <[email protected]>
cifs: fix leak of iface for primary channel
Shyam Prasad N <[email protected]>
cifs: account for primary channel in the interface list
Shyam Prasad N <[email protected]>
cifs: distribute channels across interfaces based on speed
Johan Hovold <[email protected]>
Revert "phy: realtek: usb: Add driver for the Realtek SoC USB 2.0 PHY"
Johan Hovold <[email protected]>
Revert "phy: realtek: usb: Add driver for the Realtek SoC USB 3.0 PHY"
Johan Hovold <[email protected]>
Revert "usb: phy: add usb phy notify port status API"
Long Li <[email protected]>
hv_netvsc: Mark VF as slave before exposing it to user-mode
Haiyang Zhang <[email protected]>
hv_netvsc: Fix race of register_netdevice_notifier and VF register
Haiyang Zhang <[email protected]>
hv_netvsc: fix race of netvsc and VF register_netdevice
Stuart Hayhurst <[email protected]>
platform/x86: ideapad-laptop: Set max_brightness before using it
Shyam Sundar S K <[email protected]>
platform/x86/amd/pmc: adjust getting DRAM size behavior
Asuna Yang <[email protected]>
USB: serial: option: add Luat Air72*U series products
Stefan Eichenberger <[email protected]>
usb: misc: onboard-hub: add support for Microchip USB5744
Stefan Eichenberger <[email protected]>
dt-bindings: usb: microchip,usb5744: Add second supply
Harshit Mogalapalli <[email protected]>
platform/x86: hp-bioscfg: Fix error handling in hp_add_other_attributes()
Harshit Mogalapalli <[email protected]>
platform/x86: hp-bioscfg: move mutex_lock() down in hp_add_other_attributes()
Harshit Mogalapalli <[email protected]>
platform/x86: hp-bioscfg: Simplify return check in hp_add_other_attributes()
Jan Höppner <[email protected]>
s390/dasd: protect device queue against concurrent access
Charles Mirabile <[email protected]>
io_uring/fs: consider link->flags when getting path for LINKAT
Mingzhe Zou <[email protected]>
bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race
Song Liu <[email protected]>
md: fix bi_status reporting in md_end_clone_io
Coly Li <[email protected]>
bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
Keith Busch <[email protected]>
io_uring: fix off-by one bvec index
Jann Horn <[email protected]>
tls: fix NULL deref on tls_sw_splice_eof() with empty record
Keith Busch <[email protected]>
swiotlb-xen: provide the "max_mapping_size" method
Hans de Goede <[email protected]>
ACPI: PM: Add acpi_device_fix_up_power_children() function
Hans de Goede <[email protected]>
ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA
David Woodhouse <[email protected]>
ACPI: processor_idle: use raw_safe_halt() in acpi_idle_play_dead()
Hans de Goede <[email protected]>
ACPI: video: Use acpi_device_fix_up_power_children()
Gil Fine <[email protected]>
thunderbolt: Set lane bonding bit only for downstream port
Thomas Zimmermann <[email protected]>
drm/ast: Disconnect BMC if physical connector is connected
Bjorn Andersson <[email protected]>
drm/msm/dpu: Add missing safe_lut_tbl in sc8280xp catalog
Mark Brown <[email protected]>
kselftest/arm64: Fix output formatting for za-fork
Helge Deller <[email protected]>
prctl: Disable prctl(PR_SET_MDWE) on parisc
Florent Revest <[email protected]>
mm: add a NO_INHERIT flag to the PR_SET_MDWE prctl
Peter Zijlstra <[email protected]>
lockdep: Fix block chain corruption
Johan Hovold <[email protected]>
USB: dwc3: qcom: fix ACPI platform device leak
Johan Hovold <[email protected]>
USB: dwc3: qcom: fix resource leaks on probe deferral
Christoph Hellwig <[email protected]>
nvmet: nul-terminate the NQNs passed in the connect command
Hannes Reinecke <[email protected]>
nvme: blank out authentication fabrics options if not configured
David Howells <[email protected]>
afs: Fix file locking on R/O volumes to operate in local mode
David Howells <[email protected]>
afs: Return ENOENT if no cell DNS record can be found
Alex Elder <[email protected]>
net: ipa: fix one GSI register field width
Samuel Holland <[email protected]>
net: axienet: Fix check for partial TX checksum
Arseniy Krasnov <[email protected]>
vsock/test: fix SEQPACKET message bounds test
Ivan Vecera <[email protected]>
i40e: Fix adding unsupported cloud filters
Raju Rangoju <[email protected]>
amd-xgbe: propagate the correct speed and duplex status
Raju Rangoju <[email protected]>
amd-xgbe: handle the corner-case during tx completion
Raju Rangoju <[email protected]>
amd-xgbe: handle corner-case during sfp hotplug
Lorenzo Bianconi <[email protected]>
net: veth: fix ethtool stats reporting
Suman Ghosh <[email protected]>
octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF
Stefano Stabellini <[email protected]>
arm/xen: fix xen_vcpu_info allocation alignment
Will Deacon <[email protected]>
arm64: mm: Fix "rodata=on" when CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
Mikhail Zaslonko <[email protected]>
s390/ipl: add missing IPL_TYPE_ECKD_DUMP case to ipl_init()
D. Wythe <[email protected]>
net/smc: avoid data corruption caused by decline
Jose Ignacio Tornos Martinez <[email protected]>
net: usb: ax88179_178a: fix failed operations during ax88179_reset
Cong Yang <[email protected]>
drm/panel: boe-tv101wum-nl6: Fine tune Himax83102-j02 panel HFP and HBP
Kunwu Chan <[email protected]>
ipv4: Correct/silence an endian warning in __ip_do_redirect
Charles Yi <[email protected]>
HID: fix HID device resource race between HID core and debugging support
Jacek Lawrynowicz <[email protected]>
accel/ivpu/37xx: Fix hangs related to MMIO reset
Stanislaw Gruszka <[email protected]>
accel/ivpu: Do not initialize parameters on power up
Peilin Ye <[email protected]>
bpf: Fix dev's rx stats for bpf_redirect_peer traffic
Daniel Borkmann <[email protected]>
net: Move {l,t,d}stats allocation to core and convert veth & vrf
Daniel Borkmann <[email protected]>
net, vrf: Move dstats structure to core
David Woodhouse <[email protected]>
PM: tools: Fix sleepgraph syntax error
Jonas Karlman <[email protected]>
drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
Chuck Lever <[email protected]>
libfs: getdents() should return 0 after reaching EOD
Christoph Hellwig <[email protected]>
block: update the stable_writes flag in bdev_add
Christoph Hellwig <[email protected]>
filemap: add a per-mapping stable writes flag
Andrzej Hajda <[email protected]>
drm/i915: do not clean GT table on error path
Chen Ni <[email protected]>
ata: pata_isapnp: Add missing error check for devm_ioport_map()
Suman Ghosh <[email protected]>
octeontx2-pf: Fix memory leak during interface down
Eric Dumazet <[email protected]>
wireguard: use DEV_STATS_INC()
Jiawen Wu <[email protected]>
net: wangxun: fix kernel panic due to null pointer
Marek Vasut <[email protected]>
drm/panel: simple: Fix Innolux G101ICE-L01 timings
Marek Vasut <[email protected]>
drm/panel: simple: Fix Innolux G101ICE-L01 bus flags
Stefan Berger <[email protected]>
fs: Pass AT_GETATTR_NOSEC flag to getattr interface function
Xuxin Xiong <[email protected]>
drm/panel: auo,b101uan08.3: Fine tune the panel power sequence
Ming Lei <[email protected]>
blk-cgroup: avoid to warn !rcu_read_lock_held() in blkg_lookup()
David Howells <[email protected]>
afs: Make error on cell lookup failure consistent with OpenAFS
David Howells <[email protected]>
afs: Fix afs_server_list to be cleaned up with RCU
David Howells <[email protected]>
rxrpc: Defer the response to a PING ACK until we've parsed it
David Howells <[email protected]>
rxrpc: Fix RTT determination to use any ACK as a source
Gerd Bayer <[email protected]>
s390/ism: ism driver implies smc protocol
Jonathan Marek <[email protected]>
drm/msm/dsi: use the correct VREG_CTRL_1 value for 4nm cphy
Keisuke Nishimura <[email protected]>
sched/fair: Fix the decision for load balance
Abel Wu <[email protected]>
sched/eevdf: Fix vruntime adjustment on reweight
Ani Sinha <[email protected]>
hv/hv_kvp_daemon: Some small fixes for handling NM keyfiles
Fang Xiang <[email protected]>
irqchip/gic-v3-its: Flush ITS tables correctly in non-coherent GIC designs
Chuck Lever <[email protected]>
NFSD: Fix checksum mismatches in the duplicate reply cache
Chuck Lever <[email protected]>
NFSD: Fix "start of NFS reply" pointer passed to nfsd_cache_update()
-------------
Diffstat:
.../devicetree/bindings/usb/microchip,usb5744.yaml | 7 +- Makefile | 4 +- arch/arm/xen/enlighten.c | 3 +- arch/arm64/include/asm/setup.h | 17 +- arch/arm64/mm/pageattr.c | 7 +- arch/s390/kernel/ipl.c | 1 + block/bdev.c | 2 + block/blk-cgroup.h | 2 - drivers/accel/ivpu/ivpu_hw_37xx.c | 54 +- drivers/accel/ivpu/ivpu_hw_40xx.c | 8 +- drivers/acpi/acpi_video.c | 2 +- drivers/acpi/device_pm.c | 13 + drivers/acpi/processor_idle.c | 2 +- drivers/acpi/resource.c | 7 + drivers/ata/pata_isapnp.c | 3 + drivers/gpu/drm/ast/ast_drv.h | 13 +- drivers/gpu/drm/ast/ast_mode.c | 62 +- drivers/gpu/drm/i915/gt/intel_gt.c | 11 - drivers/gpu/drm/i915/i915_driver.c | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 1 + drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 2 +- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 9 +- drivers/gpu/drm/panel/panel-simple.c | 13 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 +- drivers/hid/hid-core.c | 12 +- drivers/hid/hid-debug.c | 3 + drivers/irqchip/irq-gic-v3-its.c | 16 +- drivers/md/bcache/btree.c | 4 +- drivers/md/bcache/sysfs.c | 2 +- drivers/md/bcache/writeback.c | 22 +- drivers/md/dm-delay.c | 17 +- drivers/md/md.c | 3 +- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 14 + drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 +- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 14 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 16 +- .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 20 +- .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 + drivers/net/ethernet/wangxun/libwx/wx_hw.c | 8 +- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 4 +- drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 4 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 66 +- drivers/net/ipa/reg/gsi_reg-v5.0.c | 2 +- drivers/net/usb/ax88179_178a.c | 4 +- drivers/net/veth.c | 46 +- drivers/net/vrf.c | 38 +- drivers/net/wireguard/device.c | 4 +- drivers/net/wireguard/receive.c | 12 +- drivers/net/wireguard/send.c | 3 +- drivers/nvme/host/fabrics.c | 2 + drivers/nvme/target/fabrics-cmd.c | 4 + drivers/phy/Kconfig | 1 - drivers/phy/Makefile | 1 - drivers/phy/realtek/Kconfig | 32 - drivers/phy/realtek/Makefile | 3 - drivers/phy/realtek/phy-rtk-usb2.c | 1325 -------------------- drivers/phy/realtek/phy-rtk-usb3.c | 761 ----------- drivers/platform/x86/amd/pmc/pmc.c | 31 +- drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 24 +- drivers/platform/x86/ideapad-laptop.c | 11 +- drivers/s390/block/dasd.c | 24 +- drivers/s390/net/Kconfig | 3 +- drivers/s390/net/ism_drv.c | 93 +- drivers/thunderbolt/switch.c | 2 +- drivers/usb/cdns3/cdnsp-ring.c | 3 + drivers/usb/core/config.c | 3 +- drivers/usb/core/hub.c | 23 - drivers/usb/dwc2/hcd_intr.c | 15 +- drivers/usb/dwc3/core.c | 2 + drivers/usb/dwc3/drd.c | 2 +- drivers/usb/dwc3/dwc3-qcom.c | 65 +- drivers/usb/host/xhci-plat.c | 50 +- drivers/usb/misc/onboard_usb_hub.c | 2 + drivers/usb/misc/onboard_usb_hub.h | 7 + drivers/usb/serial/option.c | 11 +- drivers/usb/typec/tcpm/tcpm.c | 12 +- drivers/xen/swiotlb-xen.c | 1 + fs/afs/dynroot.c | 4 +- fs/afs/internal.h | 1 + fs/afs/server_list.c | 2 +- fs/afs/super.c | 2 + fs/afs/vl_rotate.c | 10 + fs/ecryptfs/inode.c | 12 +- fs/inode.c | 2 + fs/libfs.c | 14 +- fs/nfsd/cache.h | 4 +- fs/nfsd/nfscache.c | 64 +- fs/nfsd/nfssvc.c | 14 +- fs/overlayfs/inode.c | 10 +- fs/overlayfs/overlayfs.h | 8 + fs/smb/client/cifs_debug.c | 16 + fs/smb/client/cifsglob.h | 2 + fs/smb/client/connect.c | 6 + fs/smb/client/sess.c | 112 +- fs/smb/client/smb2ops.c | 6 + fs/stat.c | 6 +- include/acpi/acpi_bus.h | 1 + include/linux/hid.h | 3 + include/linux/netdevice.h | 30 +- include/linux/pagemap.h | 17 + include/linux/sched/coredump.h | 10 + include/linux/usb/phy.h | 13 - include/trace/events/rxrpc.h | 2 +- include/uapi/linux/fcntl.h | 3 + include/uapi/linux/prctl.h | 1 + io_uring/fs.c | 2 +- io_uring/rsrc.c | 2 +- kernel/fork.c | 2 +- kernel/locking/lockdep.c | 3 +- kernel/sched/fair.c | 161 ++- kernel/sys.c | 36 +- mm/page-writeback.c | 2 +- net/core/dev.c | 57 +- net/core/filter.c | 1 + net/ipv4/route.c | 2 +- net/rxrpc/input.c | 61 +- net/smc/af_smc.c | 8 +- net/tls/tls_sw.c | 3 + sound/pci/hda/patch_realtek.c | 10 + tools/hv/hv_kvp_daemon.c | 20 +- tools/hv/hv_set_ifconfig.sh | 4 +- tools/include/uapi/linux/prctl.h | 1 + tools/power/pm-graph/sleepgraph.py | 2 +- tools/testing/selftests/arm64/fp/za-fork.c | 2 +- tools/testing/vsock/vsock_test.c | 19 +- 126 files changed, 1209 insertions(+), 2687 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 2/112 NFSD: Fix checksum mismatches in the duplicate reply cache
6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
[ Upstream commit bf51c52a1f3c238d72c64e14d5e7702d3a245b82 ]
nfsd_cache_csum() currently assumes that the server's RPC layer has been advancing rq_arg.head[0].iov_base as it decodes an incoming request, because that's the way it used to work. On entry, it expects that buf->head[0].iov_base points to the start of the NFS header, and excludes the already-decoded RPC header.
These days however, head[0].iov_base now points to the start of the RPC header during all processing. It no longer points at the NFS Call header when execution arrives at nfsd_cache_csum().
In a retransmitted RPC the XID and the NFS header are supposed to be the same as the original message, but the contents of the retransmitted RPC header can be different. For example, for krb5, the GSS sequence number will be different between the two. Thus if the RPC header is always included in the DRC checksum computation, the checksum of the retransmitted message might not match the checksum of the original message, even though the NFS part of these messages is identical.
The result is that, even if a matching XID is found in the DRC, the checksum mismatch causes the server to execute the retransmitted RPC transaction again.
--- fs/nfsd/cache.h | 4 +-- fs/nfsd/nfscache.c | 64 +++++++++++++++++++++++++++++++++++------------------ fs/nfsd/nfssvc.c | 10 +++++++- 3 files changed, 54 insertions(+), 24 deletions(-)
fs/nfsd/cache.h +2 -2
@@ -84,8 +84,8 @@ int nfsd_net_reply_cache_init(struct nfsvoid nfsd_net_reply_cache_destroy (struct nfsd_net *nn);int nfsd_reply_cache_init (struct nfsd_net *);void nfsd_reply_cache_shutdown (struct nfsd_net *); -int nfsd_cache_lookup (struct svc_rqst *rqstp, -struct nfsd_cacherep **cacherep); +int nfsd_cache_lookup (struct svc_rqst *rqstp,unsigned int start, +unsigned int len,struct nfsd_cacherep **cacherep);void nfsd_cache_update (struct svc_rqst *rqstp,struct nfsd_cacherep *rp,int cachetype,__be32 *statp);int nfsd_reply_cache_stats_show (struct seq_file *m,void *v);
fs/nfsd/nfscache.c +43 -21
96 lines not on this page · raw message
fs/nfsd/nfssvc.c +9 -1
@@ -988,6 +988,7 @@ int nfsd_dispatch(struct svc_rqst *rqstpconst struct svc_procedure *proc = rqstp->rq_procinfo;__be32 *statp = rqstp->rq_accept_statp;struct nfsd_cacherep *rp; +unsigned int start, len;__be32 *nfs_reply;/*
@@ -996,11 +997,18 @@ int nfsd_dispatch(struct svc_rqst *rqstp*/ rqstp->rq_cachetype = proc->pc_cachetype; +/* +* ->pc_decode advances the argument stream past the NFS +* Call header, so grab the header's starting location and +* size now for the call to nfsd_cache_lookup(). +*/ + start =xdr_stream_pos (&rqstp->rq_arg_stream); + len =xdr_stream_remaining (&rqstp->rq_arg_stream);if (!proc->pc_decode (rqstp, &rqstp->rq_arg_stream)) goto out_decode_err; rp =NULL ; -switch (nfsd_cache_lookup (rqstp, &rp)) { +switch (nfsd_cache_lookup (rqstp, start, len, &rp)) {case RC_DOIT :break ;case RC_REPLY :
Greg Kroah-Hartman
maintainerPATCH 11/112 afs: Fix afs_server_list to be cleaned up with RCU
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit e6bace7313d61e31f2b16fa3d774fd8cb3cb869e ]
afs_server_list is accessed with the rcu_read_lock() held from volume->servers, so it needs to be cleaned up correctly.
Fix this by using kfree_rcu() instead of kfree().
--- fs/afs/internal.h | 1 + fs/afs/server_list.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
fs/afs/internal.h +1 -0
@@ -553,6 +553,7 @@ struct afs_server_entry { };struct afs_server_list { +struct rcu_head rcu;afs_volid_t vids[AFS_MAXTYPES ];/* Volume IDs */ refcount_t usage;unsigned char nr_servers;
fs/afs/server_list.c +1 -1
@@ -17,7 +17,7 @@ void afs_put_serverlist(struct afs_net *net, struct afs_server_list *slist)for (i =0 ; i < slist->nr_servers; i++)afs_unuse_server (net, slist->servers[i].server, afs_server_trace_put_slist); -kfree (slist); +kfree_rcu (slist, rcu); } }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 12/112 afs: Make error on cell lookup failure consistent with OpenAFS
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit 2a4ca1b4b77850544408595e2433f5d7811a9daa ]
When kafs tries to look up a cell in the DNS or the local config, it will translate a lookup failure into EDESTADDRREQ whereas OpenAFS translates it into ENOENT. Applications such as West expect the latter behaviour and fail if they see the former.
This can be seen by trying to mount an unknown cell:
# mount -t afs %example.com:cell.root /mnt mount: /mnt: mount(2) system call failed: Destination address required.
--- fs/afs/dynroot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/afs/dynroot.c +2 -2
@@ -132,8 +132,8 @@ static int afs_probe_cell_name(struct dentry *dentry) ret =dns_query (net->net,"afsdb" , name, len,"srv=1" ,NULL ,NULL , false); -if (ret == -ENODATA ) - ret = -EDESTADDRREQ ; +if (ret == -ENODATA || ret == -ENOKEY ) + ret = -ENOENT ;return ret; }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 13/112 blk-cgroup: avoid to warn !rcu_read_lock_held() in blkg_lookup()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Lei <[email protected]>
[ Upstream commit 35a99d6557cacbc177314735342f77a2dda41872 ]
So far, all callers either holds spin lock or rcu read explicitly, and most of the caller has added WARN_ON_ONCE(!rcu_read_lock_held()) or lockdep_assert_held(&disk->queue->queue_lock).
Remove WARN_ON_ONCE(!rcu_read_lock_held()) from blkg_lookup() for killing the false positive warning from blkg_conf_prep().
--- block/blk-cgroup.h | 2 -- 1 file changed, 2 deletions(-)
block/blk-cgroup.h +0 -2
@@ -249,8 +249,6 @@ static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, {struct blkcg_gq *blkg; -WARN_ON_ONCE (!rcu_read_lock_held ()); -if (blkcg == &blkcg_root)return q->root_blkg;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 14/112 drm/panel: auo,b101uan08.3: Fine tune the panel power sequence
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xuxin Xiong <[email protected]>
[ Upstream commit 6965809e526917b73c8f9178173184dcf13cec4b ]
For "auo,b101uan08.3" this panel, it is stipulated in the panel spec that MIPI needs to keep the LP11 state before the lcm_reset pin is pulled high.
--- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +1 -0
@@ -2049,6 +2049,7 @@ static const struct panel_desc auo_b101uan08_3_desc = { .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | MIPI_DSI_MODE_LPM, .init_cmds = auo_b101uan08_3_init_cmd, + .lp11_before_reset = true, };static const struct drm_display_mode boe_tv105wum_nw0_default_mode = {
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 15/112 fs: Pass AT_GETATTR_NOSEC flag to getattr interface function
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Berger <[email protected]>
[ Upstream commit 8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf ]
When vfs_getattr_nosec() calls a filesystem's getattr interface function then the 'nosec' should propagate into this function so that vfs_getattr_nosec() can again be called from the filesystem's gettattr rather than vfs_getattr(). The latter would add unnecessary security checks that the initial vfs_getattr_nosec() call wanted to avoid. Therefore, introduce the getattr flag GETATTR_NOSEC and allow to pass with the new getattr_flags parameter to the getattr interface function. In overlayfs and ecryptfs use this flag to determine which one of the two functions to call.
In a recent code change introduced to IMA vfs_getattr_nosec() ended up calling vfs_getattr() in overlayfs, which in turn called security_inode_getattr() on an exiting process that did not have current->fs set anymore, which then caused a kernel NULL pointer dereference. With this change the call to security_inode_getattr() can be avoided, thus avoiding the NULL pointer dereference.
--- fs/ecryptfs/inode.c | 12 ++++++++++-- fs/overlayfs/inode.c | 10 +++++----- fs/overlayfs/overlayfs.h | 8 ++++++++ fs/stat.c | 6 +++++- include/uapi/linux/fcntl.h | 3 +++ 5 files changed, 31 insertions(+), 8 deletions(-)
fs/ecryptfs/inode.c +10 -2
@@ -998,6 +998,14 @@ static int ecryptfs_getattr_link(struct mnt_idmap *idmap,return rc; } +static int ecryptfs_do_getattr (const struct path *path,struct kstat *stat, +u32 request_mask,unsigned int flags) +{ +if (flags &AT_GETATTR_NOSEC ) +return vfs_getattr_nosec (path, stat, request_mask, flags); +return vfs_getattr (path, stat, request_mask, flags); +} +static int ecryptfs_getattr (struct mnt_idmap *idmap,const struct path *path,struct kstat *stat,u32 request_mask,unsigned int flags)
@@ -1006,8 +1014,8 @@ static int ecryptfs_getattr(struct mnt_idmap *idmap,struct kstat lower_stat;int rc; - rc =vfs_getattr (ecryptfs_dentry_to_lower_path (dentry), &lower_stat, - request_mask, flags); + rc =ecryptfs_do_getattr (ecryptfs_dentry_to_lower_path (dentry), + &lower_stat, request_mask, flags);if (!rc) {fsstack_copy_attr_all (d_inode (dentry),ecryptfs_inode_to_lower (d_inode (dentry)));
fs/overlayfs/inode.c +5 -5
@@ -171,7 +171,7 @@ int ovl_getattr(struct mnt_idmap *idmap, const struct path *path, type =ovl_path_real (dentry, &realpath); old_cred =ovl_override_creds (dentry->d_sb); - err =vfs_getattr (&realpath, stat, request_mask, flags); + err =ovl_do_getattr (&realpath, stat, request_mask, flags);if (err) goto out;
@@ -196,8 +196,8 @@ int ovl_getattr(struct mnt_idmap *idmap, const struct path *path, (!is_dir ?STATX_NLINK :0 );ovl_path_lower (dentry, &realpath); - err =vfs_getattr (&realpath, &lowerstat, - lowermask, flags); + err =ovl_do_getattr (&realpath, &lowerstat, lowermask, + flags);if (err) goto out;
@@ -249,8 +249,8 @@ int ovl_getattr(struct mnt_idmap *idmap, const struct path *path,ovl_path_lowerdata (dentry, &realpath);if (realpath.dentry) { - err =vfs_getattr (&realpath, &lowerdatastat, - lowermask, flags); + err =ovl_do_getattr (&realpath, &lowerdatastat, + lowermask, flags);if (err) goto out; }else {
fs/overlayfs/overlayfs.h +8 -0
@@ -397,6 +397,14 @@ static inline bool ovl_open_flags_need_copy_up(int flags)return ((OPEN_FMODE (flags) &FMODE_WRITE ) || (flags &O_TRUNC )); } +static inline int ovl_do_getattr (const struct path *path,struct kstat *stat, +u32 request_mask,unsigned int flags) +{ +if (flags &AT_GETATTR_NOSEC ) +return vfs_getattr_nosec (path, stat, request_mask, flags); +return vfs_getattr (path, stat, request_mask, flags); +} +/* util.c */ int ovl_want_write (struct dentry *dentry);void ovl_drop_write (struct dentry *dentry);
fs/stat.c +5 -1
@@ -133,7 +133,8 @@ int vfs_getattr_nosec(const struct path *path, struct kstat *stat, idmap =mnt_idmap (path->mnt);if (inode->i_op->getattr)return inode->i_op->getattr (idmap, path, stat, - request_mask, query_flags); + request_mask, + query_flags |AT_GETATTR_NOSEC );generic_fillattr (idmap, request_mask, inode, stat);return 0 ;
@@ -166,6 +167,9 @@ int vfs_getattr(const struct path *path, struct kstat *stat, {int retval; +if (WARN_ON_ONCE (query_flags &AT_GETATTR_NOSEC )) +return -EPERM ; + retval =security_inode_getattr (path);if (retval)return retval;
include/uapi/linux/fcntl.h +3 -0
@@ -116,5 +116,8 @@#define AT_HANDLE_FID AT_REMOVEDIR/* file handle is needed to compare object identity and may not be usable to open_by_handle_at(2) */ +#if defined(__KERNEL__) +#define AT_GETATTR_NOSEC 0x80000000 +#endif #endif /* _UAPI_LINUX_FCNTL_H */
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 16/112 drm/panel: simple: Fix Innolux G101ICE-L01 bus flags
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit 06fc41b09cfbc02977acd9189473593a37d82d9b ]
Add missing .bus_flags = DRM_BUS_FLAG_DE_HIGH to this panel description, ones which match both the datasheet and the panel display_timing flags .
--- drivers/gpu/drm/panel/panel-simple.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-simple.c +1 -0
@@ -2349,6 +2349,7 @@ static const struct panel_desc innolux_g101ice_l01 = { .disable = 200, }, .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, + .bus_flags = DRM_BUS_FLAG_DE_HIGH, .connector_type = DRM_MODE_CONNECTOR_LVDS, };
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 17/112 drm/panel: simple: Fix Innolux G101ICE-L01 timings
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit 3f9a91b6c00e655d27bd785dcda1742dbdc31bda ]
The Innolux G101ICE-L01 datasheet [1] page 17 table 6.1 INPUT SIGNAL TIMING SPECIFICATIONS
indicates that maximum vertical blanking time is 40 lines. Currently the driver uses 29 lines.
Fix it, and since this panel is a DE panel, adjust the timings to make them less hostile to controllers which cannot do 1 px HSA/VSA, distribute the delays evenly between all three parts.
[1] https://www.data-modul.com/sites/default/files/products/G101ICE-L01-C2-specification-12042389.pdf
--- drivers/gpu/drm/panel/panel-simple.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-simple.c +6 -6
@@ -2326,13 +2326,13 @@ static const struct panel_desc innolux_g070y2_t02 = {static const struct display_timing innolux_g101ice_l01_timing = { .pixelclock = {60400000 ,71100000 ,74700000 }, .hactive = {1280 ,1280 ,1280 }, - .hfront_porch = {41 ,80 ,100 }, - .hback_porch = {40 ,79 ,99 }, - .hsync_len = {1 ,1 ,1 }, + .hfront_porch = {30 ,60 ,70 }, + .hback_porch = {30 ,60 ,70 }, + .hsync_len = {22 ,40 ,60 }, .vactive = {800 ,800 ,800 }, - .vfront_porch = {5 ,11 ,14 }, - .vback_porch = {4 ,11 ,14 }, - .vsync_len = {1 ,1 ,1 }, + .vfront_porch = {3 ,8 ,14 }, + .vback_porch = {3 ,8 ,14 }, + .vsync_len = {4 ,7 ,12 }, .flags =DISPLAY_FLAGS_DE_HIGH , };
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 18/112 net: wangxun: fix kernel panic due to null pointer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiawen Wu <[email protected]>
[ Upstream commit 8ba2c459668cfe2aaacc5ebcd35b4b9ef8643013 ]
When the device uses a custom subsystem vendor ID, the function wx_sw_init() returns before the memory of 'wx->mac_table' is allocated. The null pointer will causes the kernel panic.
--- drivers/net/ethernet/wangxun/libwx/wx_hw.c | 8 +++++--- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 4 +--- drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 4 +--- 3 files changed, 7 insertions(+), 9 deletions(-)
drivers/net/ethernet/wangxun/libwx/wx_hw.c +5 -3
@@ -1677,10 +1677,12 @@ int wx_sw_init(struct wx *wx) wx->subsystem_device_id = pdev->subsystem_device; }else { err =wx_flash_read_dword (wx,0xfffdc , &ssid); -if (!err) - wx->subsystem_device_id =swab16 ((u16 )ssid); +if (err <0 ) { +wx_err (wx,"read of internal subsystem device id failed\n" ); +return err; + } -return err; + wx->subsystem_device_id =swab16 ((u16 )ssid); } wx->mac_table = kcalloc(wx->mac.num_rar_entries,
drivers/net/ethernet/wangxun/ngbe/ngbe_main.c +1 -3
@@ -121,10 +121,8 @@ static int ngbe_sw_init(struct wx *wx)/* PCI config space info */ err =wx_sw_init (wx); -if (err <0 ) { -wx_err (wx,"read of internal subsystem device id failed\n" ); +if (err <0 )return err; - }/* mac type, phy type , oem type */ ngbe_init_type_code (wx);
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c +1 -3
@@ -362,10 +362,8 @@ static int txgbe_sw_init(struct wx *wx)/* PCI config space info */ err =wx_sw_init (wx); -if (err <0 ) { -wx_err (wx,"read of internal subsystem device id failed\n" ); +if (err <0 )return err; - }txgbe_init_type_code (wx);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 19/112 wireguard: use DEV_STATS_INC()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 93da8d75a66568ba4bb5b14ad2833acd7304cd02 ]
wg_xmit() can be called concurrently, KCSAN reported [1] some device stats updates can be lost.
Use DEV_STATS_INC() for this unlikely case.
[1]
BUG: KCSAN: data-race in wg_xmit / wg_xmit
read-write to 0xffff888104239160 of 8 bytes by task 1375 on cpu 0:
wg_xmit+0x60f/0x680 drivers/net/wireguard/device.c:231 __netdev_start_xmit include/linux/netdevice.h:4918 [inline] netdev_start_xmit include/linux/netdevice.h:4932 [inline] xmit_one net/core/dev.c:3543 [inline] dev_hard_start_xmit+0x11b/0x3f0 net/core/dev.c:3559
...
read-write to 0xffff888104239160 of 8 bytes by task 1378 on cpu 1:
wg_xmit+0x60f/0x680 drivers/net/wireguard/device.c:231 __netdev_start_xmit include/linux/netdevice.h:4918 [inline] netdev_start_xmit include/linux/netdevice.h:4932 [inline] xmit_one net/core/dev.c:3543 [inline] dev_hard_start_xmit+0x11b/0x3f0 net/core/dev.c:3559
...
v2: also change wg_packet_consume_data_done() (Hangbin Liu)
and wg_packet_purge_staged_packets()
--- drivers/net/wireguard/device.c | 4 ++-- drivers/net/wireguard/receive.c | 12 ++++++------ drivers/net/wireguard/send.c | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-)
drivers/net/wireguard/device.c +2 -2
@@ -210,7 +210,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)*/ while (skb_queue_len (&peer->staged_packet_queue) >MAX_STAGED_PACKETS ) {dev_kfree_skb (__skb_dequeue (&peer->staged_packet_queue)); - ++dev->stats.tx_dropped; +DEV_STATS_INC (dev, tx_dropped); }skb_queue_splice_tail (&packets, &peer->staged_packet_queue);spin_unlock_bh (&peer->staged_packet_queue.lock);
@@ -228,7 +228,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)else if (skb->protocol ==htons (ETH_P_IPV6 ))icmpv6_ndo_send (skb,ICMPV6_DEST_UNREACH ,ICMPV6_ADDR_UNREACH ,0 ); err: - ++dev->stats.tx_errors; +DEV_STATS_INC (dev, tx_errors);kfree_skb (skb);return ret; }
drivers/net/wireguard/receive.c +6 -6
@@ -416,20 +416,20 @@ static void wg_packet_consume_data_done(struct wg_peer *peer,net_dbg_skb_ratelimited ("%s: Packet has unallowed src IP (%pISc) from peer %llu (%pISpfsc)\n" , dev->name, skb, peer->internal_id, &peer->endpoint.addr); - ++dev->stats.rx_errors; - ++dev->stats.rx_frame_errors; +DEV_STATS_INC (dev, rx_errors); +DEV_STATS_INC (dev, rx_frame_errors); goto packet_processed; dishonest_packet_type:net_dbg_ratelimited ("%s: Packet is neither ipv4 nor ipv6 from peer %llu (%pISpfsc)\n" , dev->name, peer->internal_id, &peer->endpoint.addr); - ++dev->stats.rx_errors; - ++dev->stats.rx_frame_errors; +DEV_STATS_INC (dev, rx_errors); +DEV_STATS_INC (dev, rx_frame_errors); goto packet_processed; dishonest_packet_size:net_dbg_ratelimited ("%s: Packet has incorrect size from peer %llu (%pISpfsc)\n" , dev->name, peer->internal_id, &peer->endpoint.addr); - ++dev->stats.rx_errors; - ++dev->stats.rx_length_errors; +DEV_STATS_INC (dev, rx_errors); +DEV_STATS_INC (dev, rx_length_errors); goto packet_processed; packet_processed:dev_kfree_skb (skb);
drivers/net/wireguard/send.c +2 -1
@@ -333,7 +333,8 @@ static void wg_packet_create_data(struct wg_peer *peer, struct sk_buff *first)void wg_packet_purge_staged_packets (struct wg_peer *peer) {spin_lock_bh (&peer->staged_packet_queue.lock); - peer->device->dev->stats.tx_dropped += peer->staged_packet_queue.qlen; +DEV_STATS_ADD (peer->device->dev, tx_dropped, + peer->staged_packet_queue.qlen);__skb_queue_purge (&peer->staged_packet_queue);spin_unlock_bh (&peer->staged_packet_queue.lock); }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 20/112 octeontx2-pf: Fix memory leak during interface down
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Suman Ghosh <[email protected]>
[ Upstream commit 5f228d7c8a539714c1e9b7e7534f76bb7979f268 ]
During 'ifconfig <netdev> down' one RSS memory was not getting freed. This patch fixes the same.
--- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +2 -0
@@ -1934,6 +1934,8 @@ int otx2_stop(struct net_device *netdev)/* Clear RSS enable flag */ rss = &pf->hw.rss_info; rss->enable = false; +if (!netif_is_rxfh_configured (netdev)) +kfree (rss->rss_ctx[DEFAULT_RSS_CONTEXT_GROUP ]);/* Cleanup Queue IRQ */ vec = pci_irq_vector(pf->pdev,
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 3/112 irqchip/gic-v3-its: Flush ITS tables correctly in non-coherent GIC designs
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fang Xiang <[email protected]>
[ Upstream commit d3badb15613c14dd35d3495b1dde5c90fcd616dd ]
In non-coherent GIC designs, the ITS tables must be flushed before writing to the GITS_BASER<n> registers, otherwise the ITS could read dirty tables, which results in unpredictable behavior.
Flush the tables right at the begin of its_setup_baser() to prevent that.
[ tglx: Massage changelog ]
--- drivers/irqchip/irq-gic-v3-its.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/irqchip/irq-gic-v3-its.c +10 -6
@@ -2379,12 +2379,12 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,break ; } +if (!shr) +gic_flush_dcache_to_poc (base,PAGE_ORDER_TO_SIZE (order)); +its_write_baser (its, baser, val); tmp = baser->val; -if (its->flags &ITS_FLAGS_FORCE_NON_SHAREABLE ) - tmp &= ~GITS_BASER_SHAREABILITY_MASK ; -if ((val ^ tmp) &GITS_BASER_SHAREABILITY_MASK ) {/* * Shareability didn't stick. Just use
@@ -2394,10 +2394,9 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,* non-cacheable as well. */ shr = tmp &GITS_BASER_SHAREABILITY_MASK ; -if (!shr) { +if (!shr) cache = GITS_BASER_nC; -gic_flush_dcache_to_poc (base,PAGE_ORDER_TO_SIZE (order)); - } + goto retry_baser; }
@@ -2609,6 +2608,11 @@ static int its_alloc_tables(struct its_node *its)/* erratum 24313: ignore memory access type */ cache = GITS_BASER_nCnB; +if (its->flags &ITS_FLAGS_FORCE_NON_SHAREABLE ) { + cache = GITS_BASER_nC; + shr =0 ; + } +for (i =0 ; i <GITS_BASER_NR_REGS ; i++) {struct its_baser *baser = its->tables + i;u64 val =its_read_baser (its, baser);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 21/112 ata: pata_isapnp: Add missing error check for devm_ioport_map()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ni <[email protected]>
[ Upstream commit a6925165ea82b7765269ddd8dcad57c731aa00de ]
Add missing error return check for devm_ioport_map() and return the error if this function call fails.
--- drivers/ata/pata_isapnp.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/ata/pata_isapnp.c +3 -0
@@ -82,6 +82,9 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *devif (pnp_port_valid (idev,1 )) { ctl_addr =devm_ioport_map (&idev->dev,pnp_port_start (idev,1 ),1 ); +if (!ctl_addr) +return -ENOMEM ; + ap->ioaddr.altstatus_addr = ctl_addr; ap->ioaddr.ctl_addr = ctl_addr; ap->ops = &isapnp_port_ops;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 22/112 drm/i915: do not clean GT table on error path
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrzej Hajda <[email protected]>
[ Upstream commit 0561794b6b642b84b879bf97061c4b4fa692839e ]
The only task of intel_gt_release_all is to zero gt table. Calling it on error path prevents intel_gt_driver_late_release_all (called from i915_driver_late_release) to cleanup GTs, causing leakage. After i915_driver_late_release GT array is not used anymore so it does not need cleaning at all.
Sample leak report:
BUG i915_request (...): Objects remaining in i915_request on __kmem_cache_shutdown()
...
Object 0xffff888113420040 @offset=64
Allocated in __i915_request_create+0x75/0x610 [i915] age=18339 cpu=1 pid=1454
kmem_cache_alloc+0x25b/0x270 __i915_request_create+0x75/0x610 [i915] i915_request_create+0x109/0x290 [i915] __engines_record_defaults+0xca/0x440 [i915] intel_gt_init+0x275/0x430 [i915] i915_gem_init+0x135/0x2c0 [i915] i915_driver_probe+0x8d1/0xdc0 [i915]
v2: removed whole intel_gt_release_all
--- drivers/gpu/drm/i915/gt/intel_gt.c | 11 ----------- drivers/gpu/drm/i915/i915_driver.c | 4 +--- 2 files changed, 1 insertion(+), 14 deletions(-)
drivers/gpu/drm/i915/gt/intel_gt.c +0 -11
@@ -967,8 +967,6 @@ int intel_gt_probe_all(struct drm_i915_private *i915) err:i915_probe_error (i915,"Failed to initialize %s! (%d)\n" , gtdef->name, ret); -intel_gt_release_all (i915); -return ret; }
@@ -987,15 +985,6 @@ int intel_gt_tiles_init(struct drm_i915_private *i915)return 0 ; } -void intel_gt_release_all (struct drm_i915_private *i915) -{ -struct intel_gt *gt; -unsigned int id; - -for_each_gt (gt, i915, id) - i915->gt[id] =NULL ; -} -void intel_gt_info_print (const struct intel_gt_info *info,struct drm_printer *p) {
drivers/gpu/drm/i915/i915_driver.c +1 -3
@@ -777,7 +777,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ret =i915_driver_mmio_probe (i915);if (ret <0 ) - goto out_tiles_cleanup; + goto out_runtime_pm_put; ret =i915_driver_hw_probe (i915);if (ret <0 )
@@ -837,8 +837,6 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)i915_ggtt_driver_late_release (i915); out_cleanup_mmio:i915_driver_mmio_release (i915); -out_tiles_cleanup: -intel_gt_release_all (i915); out_runtime_pm_put:enable_rpm_wakeref_asserts (&i915->runtime_pm);i915_driver_late_release (i915);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 4/112 hv/hv_kvp_daemon: Some small fixes for handling NM keyfiles
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ani Sinha <[email protected]>
[ Upstream commit c3803203bc5ec910a3eb06172cf6fb368e0e4390 ]
Some small fixes:
- lets make sure we are not adding ipv4 addresses in ipv6 section in keyfile and vice versa.
- ADDR_FAMILY_IPV6 is a bit in addr_family. Test that bit instead of checking the whole value of addr_family.
- Some trivial fixes in hv_set_ifconfig.sh.
These fixes are proposed after doing some internal testing at Red Hat.
Message-ID: <[email protected]>
--- tools/hv/hv_kvp_daemon.c | 20 ++++++++++++-------- tools/hv/hv_set_ifconfig.sh | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-)
tools/hv/hv_kvp_daemon.c +12 -8
@@ -1421,7 +1421,7 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)if (error) goto setval_error; -if (new_val->addr_family ==ADDR_FAMILY_IPV6 ) { +if (new_val->addr_family &ADDR_FAMILY_IPV6 ) { error =fprintf (nmfile,"\n[ipv6]\n" );if (error <0 ) goto setval_error;
@@ -1455,14 +1455,18 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)if (error <0 ) goto setval_error; - error =fprintf (nmfile,"gateway=%s\n" , (char *)new_val->gate_way); -if (error <0 ) - goto setval_error; - - error =fprintf (nmfile,"dns=%s\n" , (char *)new_val->dns_addr); -if (error <0 ) - goto setval_error; +/* we do not want ipv4 addresses in ipv6 section and vice versa */ +if (is_ipv6 !=is_ipv4 ((char *)new_val->gate_way)) { + error =fprintf (nmfile,"gateway=%s\n" , (char *)new_val->gate_way); +if (error <0 ) + goto setval_error; + } +if (is_ipv6 !=is_ipv4 ((char *)new_val->dns_addr)) { + error =fprintf (nmfile,"dns=%s\n" , (char *)new_val->dns_addr); +if (error <0 ) + goto setval_error; + }fclose (nmfile);fclose (ifcfg_file);
tools/hv/hv_set_ifconfig.sh +2 -2
@@ -53,7 +53,7 @@ # or "manual" if no boot-time protocol should be used) # # address1=ipaddr1/plen -# address=ipaddr2/plen +# address2=ipaddr2/plen # # gateway=gateway1;gateway2 #
@@ -61,7 +61,7 @@ # # [ipv6] # address1=ipaddr1/plen -# address2=ipaddr1/plen +# address2=ipaddr2/plen # # gateway=gateway1;gateway2 #
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 5/112 sched/eevdf: Fix vruntime adjustment on reweight
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Wu <[email protected]>
[ Upstream commit eab03c23c2a162085b13200d7942fc5a00b5ccc8 ]
vruntime of the (on_rq && !0-lag) entity needs to be adjusted when it gets re-weighted, and the calculations can be simplified based on the fact that re-weight won't change the w-average of all the entities. Please check the proofs in comments.
But adjusting vruntime can also cause position change in RB-tree hence require re-queue to fix up which might be costly. This might be avoided by deferring adjustment to the time the entity actually leaves tree (dequeue/pick), but that will negatively affect task selection and probably not good enough either.
--- kernel/sched/fair.c | 151 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 128 insertions(+), 23 deletions(-)
kernel/sched/fair.c +128 -23
@@ -3626,41 +3626,140 @@ static inline void dequeue_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) { }#endif +static void reweight_eevdf (struct cfs_rq *cfs_rq,struct sched_entity *se, +unsigned long weight) +{ +unsigned long old_weight = se->load.weight; +u64 avruntime =avg_vruntime (cfs_rq); +s64 vlag, vslice; + +/* +* VRUNTIME +* ======== +* +* COROLLARY #1: The virtual runtime of the entity needs to be +* adjusted if re-weight at !0-lag point. +* +* Proof: For contradiction assume this is not true, so we can +* re-weight without changing vruntime at !0-lag point. +* +* Weight VRuntime Avg-VRuntime +* before w v V +* after w' v' V' +* +* Since lag needs to be preserved through re-weight: +* +* lag = (V - v)*w = (V'- v')*w', where v = v' +* ==> V' = (V - v)*w/w' + v (1) +* +* Let W be the total weight of the entities before reweight, +* since V' is the new weighted average of entities: +* +* V' = (WV + w'v - wv) / (W + w' - w) (2) +* +* by using (1) & (2) we obtain: +* +* (WV + w'v - wv) / (W + w' - w) = (V - v)*w/w' + v +* ==> (WV-Wv+Wv+w'v-wv)/(W+w'-w) = (V - v)*w/w' + v +* ==> (WV - Wv)/(W + w' - w) + v = (V - v)*w/w' + v +* ==> (V - v)*W/(W + w' - w) = (V - v)*w/w' (3) +* +* Since we are doing at !0-lag point which means V != v, we +* can simplify (3): +* +* ==> W / (W + w' - w) = w / w' +* ==> Ww' = Ww + ww' - ww +* ==> W * (w' - w) = w * (w' - w) +* ==> W = w (re-weight indicates w' != w) +* +* So the cfs_rq contains only one entity, hence vruntime of +* the entity @v should always equal to the cfs_rq's weighted +* average vruntime @V, which means we will always re-weight +* at 0-lag point, thus breach assumption. Proof completed. +* +* +* COROLLARY #2: Re-weight does NOT affect weighted average +* vruntime of all the entities. +* +* Proof: According to corollary #1, Eq. (1) should be: +* +* (V - v)*w = (V' - v')*w' +* ==> v' = V' - (V - v)*w/w' (4) +* +* According to the weighted average formula, we have: +* +* V' = (WV - wv + w'v') / (W - w + w') +* = (WV - wv + w'(V' - (V - v)w/w')) / (W - w + w') +* = (WV - wv + w'V' - Vw + wv) / (W - w + w') +* = (WV + w'V' - Vw) / (W - w + w') +* +* ==> V'*(W - w + w') = WV + w'V' - Vw +* ==> V' * (W - w) = (W - w) * V (5) +* +* If the entity is the only one in the cfs_rq, then reweight +* always occurs at 0-lag point, so V won't change. Or else +* there are other entities, hence W != w, then Eq. (5) turns +* into V' = V. So V won't change in either case, proof done. +* +* +* So according to corollary #1 & #2, the effect of re-weight +* on vruntime should be: +* +* v' = V' - (V - v) * w / w' (4) +* = V - (V - v) * w / w' +* = V - vl * w / w' +* = V - vl' +*/ +if (avruntime != se->vruntime) { + vlag = (s64)(avruntime - se->vruntime); + vlag =div_s64 (vlag * old_weight, weight); + se->vruntime = avruntime - vlag; + } + +/* +* DEADLINE +* ======== +* +* When the weight changes, the virtual time slope changes and +* we should adjust the relative virtual deadline accordingly. +* +* d' = v' + (d - v)*w/w' +* = V' - (V - v)*w/w' + (d - v)*w/w' +* = V - (V - v)*w/w' + (d - v)*w/w' +* = V + (d - V)*w/w' +*/ + vslice = (s64)(se->deadline - avruntime); + vslice =div_s64 (vslice * old_weight, weight); + se->deadline = avruntime + vslice; +} +static void reweight_entity (struct cfs_rq *cfs_rq,struct sched_entity *se,unsigned long weight) { -unsigned long old_weight = se->load.weight; +bool curr = cfs_rq->curr == se;if (se->on_rq) {/* commit outstanding execution time */ -if (cfs_rq->curr == se) +if (curr)update_curr (cfs_rq);else -avg_vruntime_sub (cfs_rq, se); +__dequeue_entity (cfs_rq, se);update_load_sub (&cfs_rq->load, se->load.weight); }dequeue_load_avg (cfs_rq, se); -update_load_set (&se->load, weight); -if (!se->on_rq) {/* * Because we keep se->vlag = V - v_i, while: lag_i = w_i*(V - v_i), * we need to scale se->vlag when w_i changes. */ - se->vlag =div_s64 (se->vlag * old_weight, weight); + se->vlag =div_s64 (se->vlag * se->load.weight, weight); }else { -s64 deadline = se->deadline - se->vruntime; -/* -* When the weight changes, the virtual time slope changes and -* we should adjust the relative virtual deadline accordingly. -*/ - deadline =div_s64 (deadline * old_weight, weight); - se->deadline = se->vruntime + deadline; -if (se != cfs_rq->curr) -min_deadline_cb_propagate (&se->run_node,NULL ); +reweight_eevdf (cfs_rq, se, weight); } +update_load_set (&se->load, weight); + #ifdef CONFIG_SMP do { u32 divider = get_pelt_divider(&se->avg);
@@ -3672,8 +3771,17 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,enqueue_load_avg (cfs_rq, se);if (se->on_rq) {update_load_add (&cfs_rq->load, se->load.weight); -if (cfs_rq->curr != se) -avg_vruntime_add (cfs_rq, se); +if (!curr) { +/* +* The entity's vruntime has been adjusted, so let's check +* whether the rq-wide min_vruntime needs updated too. Since +* the calculations above require stable min_vruntime rather +* than up-to-date one, we do the update at the end of the +* reweight process. +*/ +__enqueue_entity (cfs_rq, se); +update_min_vruntime (cfs_rq); + } } }
@@ -3817,14 +3925,11 @@ static void update_cfs_group(struct sched_entity *se)#ifndef CONFIG_SMP shares =READ_ONCE (gcfs_rq->tg->shares); - -if (likely (se->load.weight == shares)) -return ;#else - shares =calc_group_shares (gcfs_rq); + shares =calc_group_shares (gcfs_rq);#endif - - reweight_entity(cfs_rq_of(se), se, shares); +if (unlikely (se->load.weight != shares)) + reweight_entity(cfs_rq_of(se), se, shares); }#else /* CONFIG_FAIR_GROUP_SCHED */
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 6/112 sched/fair: Fix the decision for load balance
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keisuke Nishimura <[email protected]>
[ Upstream commit 6d7e4782bcf549221b4ccfffec2cf4d1a473f1a3 ]
should_we_balance is called for the decision to do load-balancing. When sched ticks invoke this function, only one CPU should return true. However, in the current code, two CPUs can return true. The following situation, where b means busy and i means idle, is an example, because CPU 0 and CPU 2 return true.
[0, 1] [2, 3]
b b i b
This fix checks if there exists an idle CPU with busy sibling(s) after looking for a CPU on an idle core. If some idle CPUs with busy siblings are found, just the first one should do load-balancing.
--- kernel/sched/fair.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
kernel/sched/fair.c +7 -3
@@ -11121,12 +11121,16 @@ static int should_we_balance(struct lb_env *env)continue ; } -/* Are we the first idle CPU? */ +/* +* Are we the first idle core in a non-SMT domain or higher, +* or the first idle CPU in a SMT domain? +*/ return cpu == env->dst_cpu; } -if (idle_smt == env->dst_cpu) -return true; +/* Are we the first idle CPU with busy siblings? */ +if (idle_smt !=-1 ) +return idle_smt == env->dst_cpu;/* Are we the first CPU of this group ? */ return group_balance_cpu (sg) == env->dst_cpu;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 7/112 drm/msm/dsi: use the correct VREG_CTRL_1 value for 4nm cphy
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonathan Marek <[email protected]>
[ Upstream commit b3e0f94d15700ac8e8c1c2355834f5d5c753c41d ]
Use the same value as the downstream driver. This change is needed for CPHY mode to work correctly.
Patchwork: https://patchwork.freedesktop.org/patch/566987/
--- drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +1 -1
@@ -918,7 +918,7 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy,if ((phy->cfg->quirks &DSI_PHY_7NM_QUIRK_V5_2 )) {if (phy->cphy_mode) { vreg_ctrl_0 =0x45 ; - vreg_ctrl_1 =0x45 ; + vreg_ctrl_1 =0x41 ; glbl_rescode_top_ctrl =0x00 ; glbl_rescode_bot_ctrl =0x00 ; }else {
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 8/112 s390/ism: ism driver implies smc protocol
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gerd Bayer <[email protected]>
[ Upstream commit d565fa4300d9ebd5ba3bbd259ce841f8dab609d6 ]
Since commit a72178cfe855 ("net/smc: Fix dependency of SMC on ISM") you can build the ism code without selecting the SMC network protocol. That leaves some ism functions be reported as unused. Move these functions under the conditional compile with CONFIG_SMC.
Also codify the suggestion to also configure the SMC protocol in ism's Kconfig - but with an "imply" rather than a "select" as SMC depends on other config options and allow for a deliberate decision not to build SMC. Also, mention that in ISM's help.
--- drivers/s390/net/Kconfig | 3 +- drivers/s390/net/ism_drv.c | 93 +++++++++++++++++++------------------- 2 files changed, 48 insertions(+), 48 deletions(-)
drivers/s390/net/Kconfig +2 -1
@@ -103,10 +103,11 @@ config CCWGROUP config ISM tristate "Support for ISM vPCI Adapter" depends on PCI + imply SMC default n help Select this option if you want to use the Internal Shared Memory - vPCI Adapter. + vPCI Adapter. The adapter can be used with the SMC network protocol. To compile as a module choose M. The module name is ism. If unsure, choose N.
drivers/s390/net/ism_drv.c +46 -47
146 lines not on this page · raw message
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 9/112 rxrpc: Fix RTT determination to use any ACK as a source
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit 3798680f2fbbe0ca3ab6138b34e0d161c36497ee ]
Fix RTT determination to be able to use any type of ACK as the response from which RTT can be calculated provided its ack.serial is non-zero and matches the serial number of an outgoing DATA or ACK packet. This shouldn't be limited to REQUESTED-type ACKs as these can have other types substituted for them for things like duplicate or out-of-order packets.
--- include/trace/events/rxrpc.h | 2 +- net/rxrpc/input.c | 35 ++++++++++++++++------------------- 2 files changed, 17 insertions(+), 20 deletions(-)
include/trace/events/rxrpc.h +1 -1
@@ -328,7 +328,7 @@ E_(rxrpc_rtt_tx_ping, "PING")#define rxrpc_rtt_rx_traces \ - EM(rxrpc_rtt_rx_cancel, "CNCL") \ + EM(rxrpc_rtt_rx_other_ack, "OACK") \ EM(rxrpc_rtt_rx_obsolete, "OBSL") \ EM(rxrpc_rtt_rx_lost, "LOST") \ EM(rxrpc_rtt_rx_ping_response, "PONG") \
net/rxrpc/input.c +16 -19
@@ -643,12 +643,8 @@ static void rxrpc_complete_rtt_probe(struct rxrpc_call *call,clear_bit (i +RXRPC_CALL_RTT_PEND_SHIFT , &call->rtt_avail);smp_mb ();/* Read data before setting avail bit */ set_bit (i, &call->rtt_avail); -if (type != rxrpc_rtt_rx_cancel) -rxrpc_peer_add_rtt (call, type, i, acked_serial, ack_serial, - sent_at, resp_time); -else -trace_rxrpc_rtt_rx (call, rxrpc_rtt_rx_cancel, i, - orig_serial, acked_serial,0 ,0 ); +rxrpc_peer_add_rtt (call, type, i, acked_serial, ack_serial, + sent_at, resp_time); matched = true; }
@@ -801,20 +797,21 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) summary.ack_reason, nr_acks);rxrpc_inc_stat (call->rxnet, stat_rx_acks[ack.reason]); -switch (ack.reason) { -case RXRPC_ACK_PING_RESPONSE : -rxrpc_complete_rtt_probe (call, skb->tstamp, acked_serial, ack_serial, - rxrpc_rtt_rx_ping_response); -break ; -case RXRPC_ACK_REQUESTED : -rxrpc_complete_rtt_probe (call, skb->tstamp, acked_serial, ack_serial, - rxrpc_rtt_rx_requested_ack); -break ; -default : -if (acked_serial !=0 ) +if (acked_serial !=0 ) { +switch (ack.reason) { +case RXRPC_ACK_PING_RESPONSE :rxrpc_complete_rtt_probe (call, skb->tstamp, acked_serial, ack_serial, - rxrpc_rtt_rx_cancel); -break ; + rxrpc_rtt_rx_ping_response); +break ; +case RXRPC_ACK_REQUESTED : +rxrpc_complete_rtt_probe (call, skb->tstamp, acked_serial, ack_serial, + rxrpc_rtt_rx_requested_ack); +break ; +default : +rxrpc_complete_rtt_probe (call, skb->tstamp, acked_serial, ack_serial, + rxrpc_rtt_rx_other_ack); +break ; + } }if (ack.reason ==RXRPC_ACK_PING ) {
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 10/112 rxrpc: Defer the response to a PING ACK until weve parsed it
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit 1a01319feef7047aa2ba400ffa3e047776aa29ca ]
Defer the generation of a PING RESPONSE ACK in response to a PING ACK until we've parsed the PING ACK so that we pick up any changes to the packet queue so that we can update ackinfo.
This is also applied to an ACK generated in response to an ACK with the REQUEST_ACK flag set.
Note that whilst the problem was added in commit 248f219cb8bc, it didn't really matter at that point because the ACK was proposed in softirq mode and generated asynchronously later in process context, taking the latest values at the time. But this fix is only needed since the move to parse incoming packets in an I/O thread rather than in softirq and generate the ACK at point of proposal (b0346843b1076b34a0278ff601f8f287535cb064).
--- net/rxrpc/input.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
net/rxrpc/input.c +13 -13
@@ -814,14 +814,6 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) } } -if (ack.reason ==RXRPC_ACK_PING ) { -rxrpc_send_ACK (call,RXRPC_ACK_PING_RESPONSE , ack_serial, - rxrpc_propose_ack_respond_to_ping); - }else if (sp->hdr.flags &RXRPC_REQUEST_ACK ) { -rxrpc_send_ACK (call,RXRPC_ACK_REQUESTED , ack_serial, - rxrpc_propose_ack_respond_to_ack); - } -/* If we get an EXCEEDS_WINDOW ACK from the server, it probably * indicates that the client address changed due to NAT. The server * lost the call because it switched to a different peer.
@@ -832,7 +824,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) rxrpc_is_client_call(call)) {rxrpc_set_call_completion (call,RXRPC_CALL_REMOTELY_ABORTED ,0 , -ENETRESET ); -return ; + goto send_response; }/* If we get an OUT_OF_SEQUENCE ACK from the server, that can also
@@ -846,7 +838,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) rxrpc_is_client_call(call)) {rxrpc_set_call_completion (call,RXRPC_CALL_REMOTELY_ABORTED ,0 , -ENETRESET ); -return ; + goto send_response; }/* Discard any out-of-order or duplicate ACKs (outside lock). */
@@ -854,7 +846,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb)trace_rxrpc_rx_discard_ack (call->debug_id, ack_serial, first_soft_ack, call->acks_first_seq, prev_pkt, call->acks_prev_seq); -return ; + goto send_response; } info.rxMTU =0 ;
@@ -894,7 +886,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb)case RXRPC_CALL_SERVER_AWAIT_ACK :break ;default : -return ; + goto send_response; } if (before(hard_ack, call->acks_hard_ack) ||
@@ -906,7 +898,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb)if (after (hard_ack, call->acks_hard_ack)) {if (rxrpc_rotate_tx_window (call, hard_ack, &summary)) {rxrpc_end_tx_phase (call, false, rxrpc_eproto_unexpected_ack); -return ; + goto send_response; } }
@@ -924,6 +916,14 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) rxrpc_propose_ack_ping_for_lost_reply);rxrpc_congestion_management (call, skb, &summary, acked_serial); + +send_response: +if (ack.reason ==RXRPC_ACK_PING ) +rxrpc_send_ACK (call,RXRPC_ACK_PING_RESPONSE , ack_serial, + rxrpc_propose_ack_respond_to_ping); +else if (sp->hdr.flags &RXRPC_REQUEST_ACK ) +rxrpc_send_ACK (call,RXRPC_ACK_REQUESTED , ack_serial, + rxrpc_propose_ack_respond_to_ack); }/*
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 1/112 NFSD: Fix "start of NFS reply" pointer passed to nfsd_cache_update()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
[ Upstream commit 1caf5f61dd8430ae5a0b4538afe4953ce7517cbb ]
The "statp + 1" pointer that is passed to nfsd_cache_update() is supposed to point to the start of the egress NFS Reply header. In fact, it does point there for AUTH_SYS and RPCSEC_GSS_KRB5 requests.
But both krb5i and krb5p add fields between the RPC header's accept_stat field and the start of the NFS Reply header. In those cases, "statp + 1" points at the extra fields instead of the Reply. The result is that nfsd_cache_update() caches what looks to the client like garbage.
A connection break can occur for a number of reasons, but the most common reason when using krb5i/p is a GSS sequence number window underrun. When an underrun is detected, the server is obliged to drop the RPC and the connection to force a retransmit with a fresh GSS sequence number. The client presents the same XID, it hits in the server's DRC, and the server returns the garbage cache entry.
The "statp + 1" argument has been used since the oldest changeset in the kernel history repo, so it has been in nfsd_dispatch() literally since before history began. The problem arose only when the server-side GSS implementation was added twenty years ago.
--- fs/nfsd/nfssvc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/nfsd/nfssvc.c +3 -1
@@ -988,6 +988,7 @@ int nfsd_dispatch(struct svc_rqst *rqstpconst struct svc_procedure *proc = rqstp->rq_procinfo;__be32 *statp = rqstp->rq_accept_statp;struct nfsd_cacherep *rp; +__be32 *nfs_reply;/* * Give the xdr decoder a chance to change this if it wants
@@ -1008,6 +1009,7 @@ int nfsd_dispatch(struct svc_rqst *rqstp goto out_dropit; } + nfs_reply =xdr_inline_decode (&rqstp->rq_res_stream,0 ); *statp = proc->pc_func (rqstp);if (test_bit (RQ_DROPME , &rqstp->rq_flags)) goto out_update_drop;
@@ -1015,7 +1017,7 @@ int nfsd_dispatch(struct svc_rqst *rqstpif (!proc->pc_encode (rqstp, &rqstp->rq_res_stream)) goto out_encode_err; -nfsd_cache_update (rqstp, rp, rqstp->rq_cachetype, statp +1 ); +nfsd_cache_update (rqstp, rp, rqstp->rq_cachetype, nfs_reply); out_cached_reply:return 1 ;
Greg Kroah-Hartman
maintainerPATCH 24/112 block: update the stable_writes flag in bdev_add
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <[email protected]>
[ Upstream commit 1898efcdbed32bb1c67269c985a50bab0dbc9493 ]
Propagate the per-queue stable_write flags into each bdev inode in bdev_add. This makes sure devices that require stable writes have it set for I/O on the block device node as well.
Note that this doesn't cover the case of a flag changing on a live device yet. We should handle that as well, but I plan to cover it as part of a more general rework of how changing runtime paramters on block devices works.
--- block/bdev.c | 2 ++ 1 file changed, 2 insertions(+)
block/bdev.c +2 -0
@@ -425,6 +425,8 @@ void bdev_set_nr_sectors(struct block_device *bdev, sector_t sectors)void bdev_add (struct block_device *bdev,dev_t dev) { +if (bdev_stable_writes (bdev)) +mapping_set_stable_writes (bdev->bd_inode->i_mapping); bdev->bd_dev = dev; bdev->bd_inode->i_rdev = dev; bdev->bd_inode->i_ino = dev;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 33/112 HID: fix HID device resource race between HID core and debugging support
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Yi <[email protected]>
[ Upstream commit fc43e9c857b7aa55efba9398419b14d9e35dcc7d ]
hid_debug_events_release releases resources bound to the HID device instance. hid_device_release releases the underlying HID device instance potentially before hid_debug_events_release has completed releasing debug resources bound to the same HID device instance.
Reference count to prevent the HID device instance from being torn down preemptively when HID debugging support is used. When count reaches zero, release core resources of HID device instance using hiddev_free.
The crash:
[ 120.728477][ T4396] kernel BUG at lib/list_debug.c:53! [ 120.728505][ T4396] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 120.739806][ T4396] Modules linked in: bcmdhd dhd_static_buf 8822cu pcie_mhi r8168 [ 120.747386][ T4396] CPU: 1 PID: 4396 Comm: hidt_bridge Not tainted 5.10.110 #257 [ 120.754771][ T4396] Hardware name: Rockchip RK3588 EVB4 LP4 V10 Board (DT) [ 120.761643][ T4396] pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=--) [ 120.768338][ T4396] pc : __list_del_entry_valid+0x98/0xac [ 120.773730][ T4396] lr : __list_del_entry_valid+0x98/0xac [ 120.779120][ T4396] sp : ffffffc01e62bb60 [ 120.783126][ T4396] x29: ffffffc01e62bb60 x28: ffffff818ce3a200 [ 120.789126][ T4396] x27: 0000000000000009 x26: 0000000000980000 [ 120.795126][ T4396] x25: ffffffc012431000 x24: ffffff802c6d4e00 [ 120.801125][ T4396] x23: ffffff8005c66f00 x22: ffffffc01183b5b8 [ 120.807125][ T4396] x21: ffffff819df2f100 x20: 0000000000000000 [ 120.813124][ T4396] x19: ffffff802c3f0700 x18: ffffffc01d2cd058 [ 120.819124][ T4396] x17: 0000000000000000 x16: 0000000000000000 [ 120.825124][ T4396] x15: 0000000000000004 x14: 0000000000003fff [ 120.831123][ T4396] x13: ffffffc012085588 x12: 0000000000000003 [ 120.837123][ T4396] x11: 00000000ffffbfff x10: 0000000000000003 [ 120.843123][ T4396] x9 : 455103d46b329300 x8 : 455103d46b329300 [ 120.849124][ T4396] x7 : 74707572726f6320 x6 : ffffffc0124b8cb5 [ 120.855124][ T4396] x5 : ffffffffffffffff x4 : 0000000000000000 [ 120.861123][ T4396] x3 : ffffffc011cf4f90 x2 : ffffff81fee7b948 [ 120.867122][ T4396] x1 : ffffffc011cf4f90 x0 : 0000000000000054 [ 120.873122][ T4396] Call trace: [ 120.876259][ T4396] __list_del_entry_valid+0x98/0xac [ 120.881304][ T4396] hid_debug_events_release+0x48/0x12c [ 120.886617][ T4396] full_proxy_release+0x50/0xbc [ 120.891323][ T4396] __fput+0xdc/0x238 [ 120.895075][ T4396] ____fput+0x14/0x24 [ 120.898911][ T4396] task_work_run+0x90/0x148 [ 120.903268][ T4396] do_exit+0x1bc/0x8a4 [ 120.907193][ T4396] do_group_exit+0x8c/0xa4 [ 120.911458][ T4396] get_signal+0x468/0x744 [ 120.915643][ T4396] do_signal+0x84/0x280 [ 120.919650][ T4396] do_notify_resume+0xd0/0x218 [ 120.924262][ T4396] work_pending+0xc/0x3f0
--- drivers/hid/hid-core.c | 12 ++++++++++-- drivers/hid/hid-debug.c | 3 +++ include/linux/hid.h | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-)
drivers/hid/hid-core.c +10 -2
@@ -702,15 +702,22 @@ static void hid_close_report(struct hid_device *device)* Free a device structure, all reports, and all fields. */ -static void hid_device_release (struct device *dev) +void hiddev_free (struct kref *ref) { -struct hid_device *hid =to_hid_device (dev); + struct hid_device *hid = container_of(ref, struct hid_device, ref);hid_close_report (hid);kfree (hid->dev_rdesc);kfree (hid); } +static void hid_device_release (struct device *dev) +{ +struct hid_device *hid =to_hid_device (dev); + +kref_put (&hid->ref, hiddev_free); +} +/* * Fetch a report description item from the data stream. We support long * items, though they are not used yet.
@@ -2846,6 +2853,7 @@ struct hid_device *hid_allocate_device(void)spin_lock_init (&hdev->debug_list_lock);sema_init (&hdev->driver_input_lock,1 );mutex_init (&hdev->ll_open_lock); +kref_init (&hdev->ref);hid_bpf_device_init (hdev);
drivers/hid/hid-debug.c +3 -0
@@ -1135,6 +1135,7 @@ static int hid_debug_events_open(struct inode *inode, struct file *file) goto out; } list->hdev = (struct hid_device *) inode->i_private; +kref_get (&list->hdev->ref); file->private_data = list;mutex_init (&list->read_mutex);
@@ -1227,6 +1228,8 @@ static int hid_debug_events_release(struct inode *inode, struct file *file)list_del (&list->node);spin_unlock_irqrestore (&list->hdev->debug_list_lock, flags);kfifo_free (&list->hid_debug_fifo); + +kref_put (&list->hdev->ref, hiddev_free);kfree (list);return 0 ;
include/linux/hid.h +3 -0
@@ -679,6 +679,7 @@ struct hid_device { /* device report descriptor */struct list_head debug_list;spinlock_t debug_list_lock;wait_queue_head_t debug_wait; +struct kref ref;unsigned int id;/* system unique id */
@@ -687,6 +688,8 @@ struct hid_device { /* device report descriptor */#endif /* CONFIG_BPF */ }; +void hiddev_free (struct kref *ref); +#define to_hid_device (pdev) \ container_of(pdev, struct hid_device, dev)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 34/112 ipv4: Correct/silence an endian warning in __ip_do_redirect
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kunwu Chan <[email protected]>
[ Upstream commit c0e2926266af3b5acf28df0a8fc6e4d90effe0bb ]
net/ipv4/route.c:783:46: warning: incorrect type in argument 2 (different base types)net/ipv4/route.c:783:46: expected unsigned int [usertype] keynet/ipv4/route.c:783:46: got restricted __be32 [usertype] new_gw
--- net/ipv4/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/route.c +1 -1
@@ -780,7 +780,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow goto reject_redirect; } - n =__ipv4_neigh_lookup (rt->dst.dev, new_gw); + n =__ipv4_neigh_lookup (rt->dst.dev, (__force u32 )new_gw);if (!n) n =neigh_create (&arp_tbl, &new_gw, rt->dst.dev);if (!IS_ERR (n)) {
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 35/112 drm/panel: boe-tv101wum-nl6: Fine tune Himax83102-j02 panel HFP and HBP
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cong Yang <[email protected]>
[ Upstream commit cea7008190ad65b4aaae6e94667a358d2c10a696 ]
The refresh reported by modetest is 60.46Hz, and the actual measurement is 60.01Hz, which is outside the expected tolerance. Adjust hporch and pixel clock to fix it. After repair, modetest and actual measurement were all 60.01Hz.
Modetest refresh = Pixel CLK/ htotal* vtotal, but measurement frame rate is HS->LP cycle time(Vblanking). Measured frame rate is not only affecte by Htotal/Vtotal/pixel clock, also affected by Lane-num/PixelBit/LineTime /DSI CLK. Assume that the DSI controller could not make the mode that we requested(presumably it's PLL couldn't generate the exact pixel clock?). If you use a different DSI controller, you may need to readjust these parameters. Now this panel looks like it's only used by me on the MTK platform, so let's change this set of parameters.
--- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +4 -4
@@ -2107,11 +2107,11 @@ static const struct panel_desc starry_qfh032011_53g_desc = { };static const struct drm_display_mode starry_himax83102_j02_default_mode = { - .clock =161600 , + .clock =162850 , .hdisplay =1200 , - .hsync_start =1200 +40 , - .hsync_end =1200 +40 +20 , - .htotal =1200 +40 +20 +40 , + .hsync_start =1200 +50 , + .hsync_end =1200 +50 +20 , + .htotal =1200 +50 +20 +50 , .vdisplay =1920 , .vsync_start =1920 +116 , .vsync_end =1920 +116 +8 ,
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 36/112 net: usb: ax88179_178a: fix failed operations during ax88179_reset
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jose Ignacio Tornos Martinez <[email protected]>
[ Upstream commit 0739af07d1d947af27c877f797cb82ceee702515 ]
Using generic ASIX Electronics Corp. AX88179 Gigabit Ethernet device, the following test cycle has been implemented:
- power on
- check logs
- shutdown
- after detecting the system shutdown, disconnect power
- after approximately 60 seconds of sleep, power is restored
Running some cycles, sometimes error logs like this appear:
kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -19
kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0001: -19
...These failed operation are happening during ax88179_reset execution, so the initialization could not be correct.
In order to avoid this, we need to increase the delay after reset and clock initial operations. By using these larger values, many cycles have been run and no failed operations appear.
It would be better to check some status register to verify when the operation has finished, but I do not have found any available information (neither in the public datasheets nor in the manufacturer's driver). The only available information for the necessary delays is the maufacturer's driver (original values) but the proposed values are not enough for the tested devices.
--- drivers/net/usb/ax88179_178a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/usb/ax88179_178a.c +2 -2
@@ -1583,11 +1583,11 @@ static int ax88179_reset(struct usbnet *dev) *tmp16 =AX_PHYPWR_RSTCTL_IPRL ;ax88179_write_cmd (dev,AX_ACCESS_MAC ,AX_PHYPWR_RSTCTL ,2 ,2 , tmp16); -msleep (200 ); +msleep (500 ); *tmp =AX_CLK_SELECT_ACS |AX_CLK_SELECT_BCS ;ax88179_write_cmd (dev,AX_ACCESS_MAC ,AX_CLK_SELECT ,1 ,1 , tmp); -msleep (100 ); +msleep (200 );/* Ethernet PHY Auto Detach*/ ax88179_auto_detach (dev);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 37/112 net/smc: avoid data corruption caused by decline
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: D. Wythe <[email protected]>
[ Upstream commit e6d71b437abc2f249e3b6a1ae1a7228e09c6e563 ]
We found a data corruption issue during testing of SMC-R on Redis applications.
The benchmark has a low probability of reporting a strange error as shown below.
"Error: Protocol error, got "\xe2" as reply type byte"
Finally, we found that the retrieved error data was as follows:
0xE2 0xD4 0xC3 0xD9 0x04 0x00 0x2C 0x20 0xA6 0x56 0x00 0x16 0x3E 0x0C 0xCB 0x04 0x02 0x01 0x00 0x00 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xE2
It is quite obvious that this is a SMC DECLINE message, which means that the applications received SMC protocol message.
We found that this was caused by the following situations:
client server
¦ clc proposal
------------->
¦ clc accept
<-------------
¦ clc confirm
------------->
wait llc confirm
send llc confirm
¦failed llc confirm
¦ x------
(after 2s)timeout
wait llc confirm rsp
wait decline
(after 1s) timeout
(after 2s) timeout
¦ decline
-------------->
¦ decline
<--------------As a result, a decline message was sent in the implementation, and this message was read from TCP by the already-fallback connection.
This patch double the client timeout as 2x of the server value, With this simple change, the Decline messages should never cross or collide (during Confirm link timeout).
This issue requires an immediate solution, since the protocol updates involve a more long-term solution.
--- net/smc/af_smc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
net/smc/af_smc.c +6 -2
@@ -598,8 +598,12 @@ static int smcr_clnt_conf_first_link(struct smc_sock *smc)struct smc_llc_qentry *qentry;int rc; -/* receive CONFIRM LINK request from server over RoCE fabric */ - qentry =smc_llc_wait (link->lgr,NULL ,SMC_LLC_WAIT_TIME , +/* Receive CONFIRM LINK request from server over RoCE fabric. +* Increasing the client's timeout by twice as much as the server's +* timeout by default can temporarily avoid decline messages of +* both sides crossing or colliding +*/ + qentry =smc_llc_wait (link->lgr,NULL ,2 *SMC_LLC_WAIT_TIME ,SMC_LLC_CONFIRM_LINK );if (!qentry) {struct smc_clc_msg_decline dclc;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 38/112 s390/ipl: add missing IPL_TYPE_ECKD_DUMP case to ipl_init()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Zaslonko <[email protected]>
[ Upstream commit 673752a839694133a328610fcbc54f3d59ae87f3 ]
Add missing IPL_TYPE_ECKD_DUMP case to ipl_init() creating ECKD ipl device attribute group similar to IPL_TYPE_ECKD case. Commit e2d2a2968f2a ("s390/ipl: add eckd dump support") should have had it from the beginning.
--- arch/s390/kernel/ipl.c | 1 + 1 file changed, 1 insertion(+)
arch/s390/kernel/ipl.c +1 -0
@@ -666,6 +666,7 @@ static int __init ipl_init(void) &ipl_ccw_attr_group_lpar);break ;case IPL_TYPE_ECKD : +case IPL_TYPE_ECKD_DUMP : rc =sysfs_create_group (&ipl_kset->kobj, &ipl_eckd_attr_group);break ;case IPL_TYPE_FCP :
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 39/112 arm64: mm: Fix "rodata=on" when CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <[email protected]>
[ Upstream commit acfa60dbe03802d6afd28401aa47801270e82021 ]
When CONFIG_RODATA_FULL_DEFAULT_ENABLED=y, passing "rodata=on" on the kernel command-line (rather than "rodata=full") should turn off the "full" behaviour, leaving writable linear aliases of read-only kernel memory. Unfortunately, the option has no effect in this situation and the only way to disable the "rodata=full" behaviour is to disable rodata protection entirely by passing "rodata=off".
Fix this by parsing the "on" and "off" options in the arch code, additionally enforcing that 'rodata_full' cannot be set without also setting 'rodata_enabled', allowing us to simplify a couple of checks in the process.
--- arch/arm64/include/asm/setup.h | 17 +++++++++++++++-- arch/arm64/mm/pageattr.c | 7 +++---- 2 files changed, 18 insertions(+), 6 deletions(-)
arch/arm64/include/asm/setup.h +15 -2
@@ -21,9 +21,22 @@ static inline bool arch_parse_debug_rodata(char *arg)extern bool rodata_enabled;extern bool rodata_full; -if (arg && !strcmp (arg,"full" )) { +if (!arg) +return false; + +if (!strcmp (arg,"full" )) { + rodata_enabled = rodata_full = true; +return true; + } + +if (!strcmp (arg,"off" )) { + rodata_enabled = rodata_full = false; +return true; + } + +if (!strcmp (arg,"on" )) { rodata_enabled = true; - rodata_full = true; + rodata_full = false;return true; }
arch/arm64/mm/pageattr.c +3 -4
@@ -29,8 +29,8 @@ bool can_set_direct_map(void)* * KFENCE pool requires page-granular mapping if initialized late. */ -return (rodata_enabled && rodata_full) ||debug_pagealloc_enabled () || -arm64_kfence_can_set_direct_map (); +return rodata_full ||debug_pagealloc_enabled () || +arm64_kfence_can_set_direct_map (); }static int change_page_range (pte_t *ptep,unsigned long addr,void *data)
@@ -105,8 +105,7 @@ static int change_memory_common(unsigned long addr, int numpages,* If we are manipulating read-only permissions, apply the same * change to the linear mapping of the pages that back this VM area. */ -if (rodata_enabled && - rodata_full && (pgprot_val (set_mask) ==PTE_RDONLY || +if (rodata_full && (pgprot_val (set_mask) ==PTE_RDONLY ||pgprot_val (clear_mask) ==PTE_RDONLY )) {for (i =0 ; i < area->nr_pages; i++) { __change_memory_common((u64)page_address(area->pages[i]),
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 40/112 arm/xen: fix xen_vcpu_info allocation alignment
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Stabellini <[email protected]>
[ Upstream commit 7bf9a6b46549852a37e6d07e52c601c3c706b562 ]
xen_vcpu_info is a percpu area than needs to be mapped by Xen. Currently, it could cross a page boundary resulting in Xen being unable to map it:
[ 0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164! [ 0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Fix the issue by using __alloc_percpu and requesting alignment for the memory allocation.
--- arch/arm/xen/enlighten.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/xen/enlighten.c +2 -1
@@ -484,7 +484,8 @@ static int __init xen_guest_init(void)* for secondary CPUs as they are brought up. * For uniformity we use VCPUOP_register_vcpu_info even on cpu0. */ - xen_vcpu_info = alloc_percpu(struct vcpu_info); + xen_vcpu_info =__alloc_percpu (sizeof (struct vcpu_info ), +1 <<fls (sizeof (struct vcpu_info ) -1 ));if (xen_vcpu_info ==NULL )return -ENOMEM ;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 41/112 octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Suman Ghosh <[email protected]>
[ Upstream commit 4aa1d8f89b10cdc25a231dabf808d8935e0b137a ]
It is possible to add a ntuple rule which would like to direct packet to a VF whose number of queues are greater/less than its PF's queue numbers. For example a PF can have 2 Rx queues but a VF created on that PF can have 8 Rx queues. As of today, ntuple rule will reject rule because it is checking the requested queue number against PF's number of Rx queues. As a part of this fix if the action of a ntuple rule is to move a packet to a VF's queue then the check is removed. Also, a debug information is printed to aware user that it is user's responsibility to cross check if the requested queue number on that VF is a valid one.
--- .../marvell/octeontx2/nic/otx2_flows.c | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c +19 -1
@@ -1088,6 +1088,7 @@ int otx2_add_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc)struct ethhdr *eth_hdr;bool new = false;int err =0 ; +u64 vf_num;u32 ring;if (!flow_cfg->max_flows) {
@@ -1100,7 +1101,21 @@ int otx2_add_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc)if (!(pfvf->flags &OTX2_FLAG_NTUPLE_SUPPORT ))return -ENOMEM ; -if (ring >= pfvf->hw.rx_queues && fsp->ring_cookie !=RX_CLS_FLOW_DISC ) +/* Number of queues on a VF can be greater or less than +* the PF's queue. Hence no need to check for the +* queue count. Hence no need to check queue count if PF +* is installing for its VF. Below is the expected vf_num value +* based on the ethtool commands. +* +* e.g. +* 1. ethtool -U <netdev> ... action -1 ==> vf_num:255 +* 2. ethtool -U <netdev> ... action <queue_num> ==> vf_num:0 +* 3. ethtool -U <netdev> ... vf <vf_idx> queue <queue_num> ==> +* vf_num:vf_idx+1 +*/ + vf_num =ethtool_get_flow_spec_ring_vf (fsp->ring_cookie); +if (!is_otx2_vf (pfvf->pcifunc) && !vf_num && + ring >= pfvf->hw.rx_queues && fsp->ring_cookie !=RX_CLS_FLOW_DISC )return -EINVAL ;if (fsp->location >=otx2_get_maxflows (flow_cfg))
@@ -1182,6 +1197,9 @@ int otx2_add_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc) flow_cfg->nr_flows++; } +if (flow->is_vf) +netdev_info (pfvf->netdev, +"Make sure that VF's queue number is within its queue limit\n" );return 0 ; }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 42/112 net: veth: fix ethtool stats reporting
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Bianconi <[email protected]>
[ Upstream commit 818ad9cc90d4a7165caaee7e32800c50d0564ec3 ]
Fix a possible misalignment between page_pool stats and tx xdp_stats reported in veth_get_ethtool_stats routine.
The issue can be reproduced configuring the veth pair with the following tx/rx queues:
$ip link add v0 numtxqueues 2 numrxqueues 4 type veth peer name v1 \
numtxqueues 1 numrxqueues 1
and loading a simple XDP program on v0 that just returns XDP_PASS. In this case on v0 the page_pool stats overwrites tx xdp_stats for queue 1. Fix the issue incrementing pp_idx of dev->real_num_tx_queues * VETH_TQ_STATS_LEN since we always report xdp_stats for all tx queues in ethtool.
--- drivers/net/veth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/veth.c +1 -1
@@ -236,8 +236,8 @@ static void veth_get_ethtool_stats(struct net_device *dev, data[tx_idx + j] += *(u64 *)(base + offset); } }while (u64_stats_fetch_retry (&rq_stats->syncp, start)); - pp_idx = tx_idx +VETH_TQ_STATS_LEN ; } + pp_idx = idx + dev->real_num_tx_queues *VETH_TQ_STATS_LEN ; page_pool_stats:veth_get_page_pool_stats (dev, &data[pp_idx]);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 25/112 libfs: getdents() should return 0 after reaching EOD
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
[ Upstream commit 796432efab1e372d404e7a71cc6891a53f105051 ]
The new directory offset helpers don't conform with the convention of getdents() returning no more entries once a directory file descriptor has reached the current end-of-directory.
To address this, copy the logic from dcache_readdir() to mark the open directory file descriptor once EOD has been reached. Seeking resets the mark.
--- fs/libfs.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
fs/libfs.c +11 -3
@@ -396,6 +396,8 @@ static loff_t offset_dir_llseek(struct file *file, loff_t offset, int whence)return -EINVAL ; } +/* In this case, ->private_data is protected by f_pos_lock */ + file->private_data =NULL ;return vfs_setpos (file, offset,U32_MAX ); }
@@ -425,7 +427,7 @@ static bool offset_dir_emit(struct dir_context *ctx, struct dentry *dentry) inode->i_ino, fs_umode_to_dtype(inode->i_mode)); } -static void offset_iterate_dir (struct inode *inode,struct dir_context *ctx) +static void *offset_iterate_dir (struct inode *inode,struct dir_context *ctx) {struct offset_ctx *so_ctx = inode->i_op->get_offset_ctx (inode);XA_STATE (xas, &so_ctx->xa, ctx->pos);
@@ -434,7 +436,7 @@ static void offset_iterate_dir(struct inode *inode, struct dir_context *ctx)while (true) { dentry =offset_find_next (&xas);if (!dentry) -break ; +return ERR_PTR (-ENOENT );if (!offset_dir_emit (ctx, dentry)) {dput (dentry);
@@ -444,6 +446,7 @@ static void offset_iterate_dir(struct inode *inode, struct dir_context *ctx)dput (dentry); ctx->pos = xas.xa_index +1 ; } +return NULL ; }/**
@@ -476,7 +479,12 @@ static int offset_readdir(struct file *file, struct dir_context *ctx)if (!dir_emit_dots (file, ctx))return 0 ; -offset_iterate_dir (d_inode (dir), ctx); +/* In this case, ->private_data is protected by f_pos_lock */ +if (ctx->pos ==2 ) + file->private_data =NULL ; +else if (file->private_data ==ERR_PTR (-ENOENT )) +return 0 ; + file->private_data =offset_iterate_dir (d_inode (dir), ctx);return 0 ; }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 43/112 amd-xgbe: handle corner-case during sfp hotplug
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raju Rangoju <[email protected]>
[ Upstream commit 676ec53844cbdf2f47e68a076cdff7f0ec6cbe3f ]
Force the mode change for SFI in Fixed PHY configurations. Fixed PHY configurations needs PLL to be enabled while doing mode set. When the SFP module isn't connected during boot, driver assumes AN is ON and attempts auto-negotiation. However, if the connected SFP comes up in Fixed PHY configuration the link will not come up as PLL isn't enabled while the initial mode set command is issued. So, force the mode change for SFI in Fixed PHY configuration to fix link issues.
--- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +13 -1
@@ -1193,7 +1193,19 @@ static int xgbe_phy_config_fixed(struct xgbe_prv_data *pdata)if (pdata->phy.duplex !=DUPLEX_FULL )return -EINVAL ; -xgbe_set_mode (pdata, mode); +/* Force the mode change for SFI in Fixed PHY config. +* Fixed PHY configs needs PLL to be enabled while doing mode set. +* When the SFP module isn't connected during boot, driver assumes +* AN is ON and attempts autonegotiation. However, if the connected +* SFP comes up in Fixed PHY config, the link will not come up as +* PLL isn't enabled while the initial mode set command is issued. +* So, force the mode change for SFI in Fixed PHY configuration to +* fix link issues. +*/ +if (mode ==XGBE_MODE_SFI ) +xgbe_change_mode (pdata, mode); +else +xgbe_set_mode (pdata, mode);return 0 ; }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 44/112 amd-xgbe: handle the corner-case during tx completion
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raju Rangoju <[email protected]>
[ Upstream commit 7121205d5330c6a3cb3379348886d47c77b78d06 ]
The existing implementation uses software logic to accumulate tx completions until the specified time (1ms) is met and then poll them. However, there exists a tiny gap which leads to a race between resetting and checking the tx_activate flag. Due to this the tx completions are not reported to upper layer and tx queue timeout kicks-in restarting the device.
To address this, introduce a tx cleanup mechanism as part of the periodic maintenance process.
--- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/net/ethernet/amd/xgbe/xgbe-drv.c +14 -0
@@ -682,10 +682,24 @@ static void xgbe_service(struct work_struct *work)static void xgbe_service_timer (struct timer_list *t) {struct xgbe_prv_data *pdata =from_timer (pdata, t, service_timer); +struct xgbe_channel *channel; +unsigned int i;queue_work (pdata->dev_workqueue, &pdata->service_work);mod_timer (&pdata->service_timer, jiffies +HZ ); + +if (!pdata->tx_usecs) +return ; + +for (i =0 ; i < pdata->channel_count; i++) { + channel = pdata->channel[i]; +if (!channel->tx_ring || channel->tx_timer_active) +break ; + channel->tx_timer_active =1 ; +mod_timer (&channel->tx_timer, + jiffies +usecs_to_jiffies (pdata->tx_usecs)); + } }static void xgbe_init_timers (struct xgbe_prv_data *pdata)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 45/112 amd-xgbe: propagate the correct speed and duplex status
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raju Rangoju <[email protected]>
[ Upstream commit 7a2323ac24a50311f64a3a9b54ed5bef5821ecae ]
xgbe_get_link_ksettings() does not propagate correct speed and duplex information to ethtool during cable unplug. Due to which ethtool reports incorrect values for speed and duplex.
Address this by propagating correct information.
--- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +8 -3
@@ -314,10 +314,15 @@ static int xgbe_get_link_ksettings(struct net_device *netdev, cmd->base.phy_address = pdata->phy.address; - cmd->base.autoneg = pdata->phy.autoneg; - cmd->base.speed = pdata->phy.speed; - cmd->base.duplex = pdata->phy.duplex; +if (netif_carrier_ok (netdev)) { + cmd->base.speed = pdata->phy.speed; + cmd->base.duplex = pdata->phy.duplex; + }else { + cmd->base.speed =SPEED_UNKNOWN ; + cmd->base.duplex =DUPLEX_UNKNOWN ; + } + cmd->base.autoneg = pdata->phy.autoneg; cmd->base.port =PORT_NONE ;XGBE_LM_COPY (cmd, supported, lks, supported);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 46/112 i40e: Fix adding unsupported cloud filters
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ivan Vecera <[email protected]>
[ Upstream commit 4e20655e503e3a478cd1682bf25e3202dd823da8 ]
If a VF tries to add unsupported cloud filter through virtchnl then i40e_add_del_cloud_filter(_big_buf) returns -ENOTSUPP but this error code is stored in 'ret' instead of 'aq_ret' that is used as error code sent back to VF. In this scenario where one of the mentioned functions fails the value of 'aq_ret' is zero so the VF will incorrectly receive a 'success'.
Use 'aq_ret' to store return value and remove 'ret' local variable. Additionally fix the issue when filter allocation fails, in this case no notification is sent back to the VF.
--- .../net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +9 -7
@@ -3842,7 +3842,7 @@ static int i40e_vc_add_cloud_filter(struct i40e_vf *vf, u8 *msg)struct i40e_pf *pf = vf->pf;struct i40e_vsi *vsi =NULL ;int aq_ret =0 ; -int i, ret; +int i;if (!i40e_sync_vf_state (vf,I40E_VF_STATE_ACTIVE )) { aq_ret = -EINVAL ;
@@ -3866,8 +3866,10 @@ static int i40e_vc_add_cloud_filter(struct i40e_vf *vf, u8 *msg) } cfilter =kzalloc (sizeof (*cfilter),GFP_KERNEL ); -if (!cfilter) -return -ENOMEM ; +if (!cfilter) { + aq_ret = -ENOMEM ; + goto err_out; + }/* parse destination mac address */ for (i =0 ; i <ETH_ALEN ; i++)
@@ -3915,13 +3917,13 @@ static int i40e_vc_add_cloud_filter(struct i40e_vf *vf, u8 *msg)/* Adding cloud filter programmed as TC filter */ if (tcf.dst_port) - ret =i40e_add_del_cloud_filter_big_buf (vsi, cfilter, true); + aq_ret =i40e_add_del_cloud_filter_big_buf (vsi, cfilter, true);else - ret =i40e_add_del_cloud_filter (vsi, cfilter, true); -if (ret) { + aq_ret =i40e_add_del_cloud_filter (vsi, cfilter, true); +if (aq_ret) {dev_err (&pf->pdev->dev,"VF %d: Failed to add cloud filter, err %pe aq_err %s\n" , - vf->vf_id,ERR_PTR (ret), + vf->vf_id,ERR_PTR (aq_ret),i40e_aq_str (&pf->hw, pf->hw.aq.asq_last_status)); goto err_free; }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 47/112 vsock/test: fix SEQPACKET message bounds test
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arseniy Krasnov <[email protected]>
[ Upstream commit f0863888f6cfef33e3117dccfe94fa78edf76be4 ]
Tune message length calculation to make this test work on machines where 'getpagesize()' returns >32KB. Now maximum message length is not hardcoded (on machines above it was smaller than 'getpagesize()' return value, thus we get negative value and test fails), but calculated at runtime and always bigger than 'getpagesize()' result. Reproduced on aarch64 with 64KB page size.
--- tools/testing/vsock/vsock_test.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
tools/testing/vsock/vsock_test.c +13 -6
@@ -392,11 +392,12 @@ static void test_stream_msg_peek_server(const struct test_opts *opts) }#define SOCK_BUF_SIZE (2 * 1024 * 1024) -#define MAX_MSG_SIZE (32 * 1024) +#define MAX_MSG_PAGES 4static void test_seqpacket_msg_bounds_client (const struct test_opts *opts) {unsigned long curr_hash; +size_t max_msg_size;int page_size;int msg_count;int fd;
@@ -412,7 +413,8 @@ static void test_seqpacket_msg_bounds_client(const struct test_opts *opts) curr_hash =0 ; page_size =getpagesize (); - msg_count =SOCK_BUF_SIZE /MAX_MSG_SIZE ; + max_msg_size =MAX_MSG_PAGES * page_size; + msg_count =SOCK_BUF_SIZE / max_msg_size;for (int i =0 ; i < msg_count; i++) {ssize_t send_size;
@@ -423,7 +425,7 @@ static void test_seqpacket_msg_bounds_client(const struct test_opts *opts)/* Use "small" buffers and "big" buffers. */ if (i &1 ) buf_size = page_size + - (rand () % (MAX_MSG_SIZE - page_size)); + (rand () % (max_msg_size - page_size));else buf_size =1 + (rand () % page_size);
@@ -479,7 +481,6 @@ static void test_seqpacket_msg_bounds_server(const struct test_opts *opts)unsigned long remote_hash;unsigned long curr_hash;int fd; -char buf[MAX_MSG_SIZE ];struct msghdr msg = {0 };struct iovec iov = {0 };
@@ -507,8 +508,13 @@ static void test_seqpacket_msg_bounds_server(const struct test_opts *opts)control_writeln ("SRVREADY" );/* Wait, until peer sends whole data. */ control_expectln ("SENDDONE" ); - iov.iov_base = buf; - iov.iov_len =sizeof (buf); + iov.iov_len =MAX_MSG_PAGES *getpagesize (); + iov.iov_base =malloc (iov.iov_len); +if (!iov.iov_base) { +perror ("malloc" ); +exit (EXIT_FAILURE ); + } + msg.msg_iov = &iov; msg.msg_iovlen =1 ;
@@ -533,6 +539,7 @@ static void test_seqpacket_msg_bounds_server(const struct test_opts *opts) curr_hash +=hash_djb2 (msg.msg_iov[0 ].iov_base, recv_size); } +free (iov.iov_base);close (fd); remote_hash =control_readulong ();
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 48/112 net: axienet: Fix check for partial TX checksum
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Samuel Holland <[email protected]>
[ Upstream commit fd0413bbf8b11f56e8aa842783b0deda0dfe2926 ]
Due to a typo, the code checked the RX checksum feature in the TX path.
--- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1 -1
@@ -822,7 +822,7 @@ axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)if (lp->features &XAE_FEATURE_FULL_TX_CSUM ) {/* Tx Full Checksum Offload Enabled */ cur_p->app0 |=2 ; - }else if (lp->features &XAE_FEATURE_PARTIAL_RX_CSUM ) { + }else if (lp->features &XAE_FEATURE_PARTIAL_TX_CSUM ) { csum_start_off =skb_transport_offset (skb); csum_index_off = csum_start_off + skb->csum_offset;/* Tx Partial Checksum Offload Enabled */
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 49/112 net: ipa: fix one GSI register field width
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Elder <[email protected]>
[ Upstream commit 37f0205538baf70beb57cdcb6c7d14aa13257926 ]
The width of the R_LENGTH field of the EV_CH_E_CNTXT_1 GSI register is 24 bits (not 20 bits) starting with IPA v5.0. Fix this.
--- drivers/net/ipa/reg/gsi_reg-v5.0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipa/reg/gsi_reg-v5.0.c +1 -1
@@ -78,7 +78,7 @@ REG_STRIDE_FIELDS(EV_CH_E_CNTXT_0, ev_ch_e_cntxt_0, 0x0001c000 + 0x12000 * GSI_EE_AP, 0x80);static const u32 reg_ev_ch_e_cntxt_1_fmask[] = { - [R_LENGTH ] =GENMASK (19 ,0 ), + [R_LENGTH ] =GENMASK (23 ,0 ), }; REG_STRIDE_FIELDS(EV_CH_E_CNTXT_1, ev_ch_e_cntxt_1,
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 26/112 drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonas Karlman <[email protected]>
[ Upstream commit bb0a05acd6121ff0e810b44fdc24dbdfaa46b642 ]
Use of DRM_FORMAT_RGB888 and DRM_FORMAT_BGR888 on e.g. RK3288, RK3328 and RK3399 result in wrong colors being displayed.
The issue can be observed using modetest:
modetest -s <connector_id>@<crtc_id>:1920x1080-60@RG24 modetest -s <connector_id>@<crtc_id>:1920x1080-60@BG24
Vendor 4.4 kernel apply an inverted rb swap for these formats on VOP full framework (IP version 3.x) compared to VOP little framework (2.x).
Fix colors by applying different rb swap for VOP full framework (3.x) and VOP little framework (2.x) similar to vendor 4.4 kernel.
--- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +11 -3
@@ -247,14 +247,22 @@ static inline void vop_cfg_done(struct vop *vop)VOP_REG_SET (vop, common, cfg_done,1 ); } -static bool has_rb_swapped (uint32_t format) +static bool has_rb_swapped (uint32_t version,uint32_t format) {switch (format) {case DRM_FORMAT_XBGR8888 :case DRM_FORMAT_ABGR8888 : -case DRM_FORMAT_BGR888 :case DRM_FORMAT_BGR565 :return true; +/* +* full framework (IP version 3.x) only need rb swapped for RGB888 and +* little framework (IP version 2.x) only need rb swapped for BGR888, +* check for 3.x to also only rb swap BGR888 for unknown vop version +*/ +case DRM_FORMAT_RGB888 : +return VOP_MAJOR (version) ==3 ; +case DRM_FORMAT_BGR888 : +return VOP_MAJOR (version) !=3 ;default :return false; }
@@ -1013,7 +1021,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,VOP_WIN_SET (vop, win, dsp_info, dsp_info);VOP_WIN_SET (vop, win, dsp_st, dsp_st); - rb_swap =has_rb_swapped (fb->format->format); + rb_swap =has_rb_swapped (vop->data->version, fb->format->format);VOP_WIN_SET (vop, win, rb_swap, rb_swap);/*
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 27/112 PM: tools: Fix sleepgraph syntax error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Woodhouse <[email protected]>
[ Upstream commit b85e2dab33ce467e8dcf1cb6c0c587132ff17f56 ]
The sleepgraph tool currently fails:
File "/usr/bin/sleepgraph", line 4155
or re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg)):
^SyntaxError: unmatched ')'
--- tools/power/pm-graph/sleepgraph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/power/pm-graph/sleepgraph.py +1 -1
@@ -4151,7 +4151,7 @@ def parseKernelLog(data): elif(re.match('Enabling non-boot CPUs .*', msg)): # start of first cpu resume cpu_start = ktime - elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)) \ + elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg) \ or re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg)): # end of a cpu suspend, start of the next m = re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 28/112 net, vrf: Move dstats structure to core
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
[ Upstream commit 79e0c5be8c73a674c92bd4ba77b75f4f8c91d32e ]
Just move struct pcpu_dstats out of the vrf into the core, and streamline the field names slightly, so they better align with the {t,l}stats ones.
No functional change otherwise. A conversion of the u64s to u64_stats_t could be done at a separate point in future. This move is needed as we are moving the {t,l,d}stats allocation/freeing to the core.
Stable-dep-of: 024ee930cb3c ("bpf: Fix dev's rx stats for bpf_redirect_peer traffic")
--- drivers/net/vrf.c | 24 +++++++----------------- include/linux/netdevice.h | 10 ++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-)
drivers/net/vrf.c +7 -17
@@ -121,22 +121,12 @@ struct net_vrf {int ifindex; }; -struct pcpu_dstats { -u64 tx_pkts; -u64 tx_bytes; -u64 tx_drps; -u64 rx_pkts; -u64 rx_bytes; -u64 rx_drps; -struct u64_stats_sync syncp; -}; -static void vrf_rx_stats (struct net_device *dev,int len) {struct pcpu_dstats *dstats =this_cpu_ptr (dev->dstats);u64_stats_update_begin (&dstats->syncp); - dstats->rx_pkts++; + dstats->rx_packets++; dstats->rx_bytes += len;u64_stats_update_end (&dstats->syncp); }
@@ -161,10 +151,10 @@ static void vrf_get_stats64(struct net_device *dev,do { start =u64_stats_fetch_begin (&dstats->syncp); tbytes = dstats->tx_bytes; - tpkts = dstats->tx_pkts; - tdrops = dstats->tx_drps; + tpkts = dstats->tx_packets; + tdrops = dstats->tx_drops; rbytes = dstats->rx_bytes; - rpkts = dstats->rx_pkts; + rpkts = dstats->rx_packets; }while (u64_stats_fetch_retry (&dstats->syncp, start)); stats->tx_bytes += tbytes; stats->tx_packets += tpkts;
@@ -421,7 +411,7 @@ static int vrf_local_xmit(struct sk_buff *skb, struct net_device *dev,if (likely (__netif_rx (skb) ==NET_RX_SUCCESS ))vrf_rx_stats (dev, len);else -this_cpu_inc (dev->dstats->rx_drps); +this_cpu_inc (dev->dstats->rx_drops);return NETDEV_TX_OK ; }
@@ -616,11 +606,11 @@ static netdev_tx_t vrf_xmit(struct sk_buff *skb, struct net_device *dev)struct pcpu_dstats *dstats =this_cpu_ptr (dev->dstats);u64_stats_update_begin (&dstats->syncp); - dstats->tx_pkts++; + dstats->tx_packets++; dstats->tx_bytes += len;u64_stats_update_end (&dstats->syncp); }else { -this_cpu_inc (dev->dstats->tx_drps); +this_cpu_inc (dev->dstats->tx_drops); }return ret;
include/linux/netdevice.h +10 -0
@@ -2725,6 +2725,16 @@ struct pcpu_sw_netstats {struct u64_stats_sync syncp; }__aligned(4 * sizeof(u64)) ; +struct pcpu_dstats { +u64 rx_packets; +u64 rx_bytes; +u64 rx_drops; +u64 tx_packets; +u64 tx_bytes; +u64 tx_drops; +struct u64_stats_sync syncp; +}__aligned(8 * sizeof(u64)) ; +struct pcpu_lstats {u64_stats_t packets;u64_stats_t bytes;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 29/112 net: Move {l,t,d}stats allocation to core and convert veth & vrf
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
[ Upstream commit 34d21de99cea9cb17967874313e5b0262527833c ]
Move {l,t,d}stats allocation to the core and let netdevs pick the stats type they need. That way the driver doesn't have to bother with error handling (allocation failure checking, making sure free happens in the right spot, etc) - all happening in the core.
Stable-dep-of: 024ee930cb3c ("bpf: Fix dev's rx stats for bpf_redirect_peer traffic")
--- drivers/net/veth.c | 16 ++----------- drivers/net/vrf.c | 14 +++-------- include/linux/netdevice.h | 20 ++++++++++++---- net/core/dev.c | 49 ++++++++++++++++++++++++++++++++++++++- 4 files changed, 69 insertions(+), 30 deletions(-)
drivers/net/veth.c +2 -14
@@ -1499,25 +1499,12 @@ static void veth_free_queues(struct net_device *dev)static int veth_dev_init (struct net_device *dev) { -int err; - - dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats); -if (!dev->lstats) -return -ENOMEM ; - - err =veth_alloc_queues (dev); -if (err) { -free_percpu (dev->lstats); -return err; - } - -return 0 ; +return veth_alloc_queues (dev); }static void veth_dev_free (struct net_device *dev) {veth_free_queues (dev); -free_percpu (dev->lstats); }#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -1789,6 +1776,7 @@ static void veth_setup(struct net_device *dev) NETIF_F_HW_VLAN_STAG_RX); dev->needs_free_netdev = true; dev->priv_destructor = veth_dev_free; + dev->pcpu_stat_type =NETDEV_PCPU_STAT_LSTATS ; dev->max_mtu =ETH_MAX_MTU ; dev->hw_features =VETH_FEATURES ;
drivers/net/vrf.c +3 -11
@@ -1164,22 +1164,15 @@ static void vrf_dev_uninit(struct net_device *dev)vrf_rtable_release (dev, vrf);vrf_rt6_release (dev, vrf); - -free_percpu (dev->dstats); - dev->dstats =NULL ; }static int vrf_dev_init (struct net_device *dev) {struct net_vrf *vrf =netdev_priv (dev); - dev->dstats = netdev_alloc_pcpu_stats(struct pcpu_dstats); -if (!dev->dstats) - goto out_nomem; -/* create the default dst which points back to us */ if (vrf_rtable_create (dev) !=0 ) - goto out_stats; + goto out_nomem;if (vrf_rt6_create (dev) !=0 ) goto out_rth;
@@ -1193,9 +1186,6 @@ static int vrf_dev_init(struct net_device *dev) out_rth:vrf_rtable_release (dev, vrf); -out_stats: -free_percpu (dev->dstats); - dev->dstats =NULL ; out_nomem:return -ENOMEM ; }
@@ -1694,6 +1684,8 @@ static void vrf_setup(struct net_device *dev) dev->min_mtu =IPV6_MIN_MTU ; dev->max_mtu =IP6_MAX_MTU ; dev->mtu = dev->max_mtu; + + dev->pcpu_stat_type =NETDEV_PCPU_STAT_DSTATS ; } static int vrf_validate(struct nlattr *tb[], struct nlattr *data[],
include/linux/netdevice.h +16 -4
@@ -1774,6 +1774,13 @@ enum netdev_ml_priv_type { ML_PRIV_CAN, }; +enum netdev_stat_type { +NETDEV_PCPU_STAT_NONE , +NETDEV_PCPU_STAT_LSTATS ,/* struct pcpu_lstats */ +NETDEV_PCPU_STAT_TSTATS ,/* struct pcpu_sw_netstats */ +NETDEV_PCPU_STAT_DSTATS ,/* struct pcpu_dstats */ +}; +/** * struct net_device - The DEVICE structure. *
@@ -1968,10 +1975,14 @@ enum netdev_ml_priv_type {* * @ml_priv: Mid-layer private * @ml_priv_type: Mid-layer private type -* @lstats: Loopback statistics -* @tstats: Tunnel statistics -* @dstats: Dummy statistics -* @vstats: Virtual ethernet statistics +* +* @pcpu_stat_type: Type of device statistics which the core should +* allocate/free: none, lstats, tstats, dstats. none +* means the driver is handling statistics allocation/ +* freeing internally. +* @lstats: Loopback statistics: packets, bytes +* @tstats: Tunnel statistics: RX/TX packets, RX/TX bytes +* @dstats: Dummy statistics: RX/TX/drop packets, RX/TX bytes * * @garp_port: GARP * @mrp_port: MRP
@@ -2328,6 +2339,7 @@ struct net_device {void *ml_priv;enum netdev_ml_priv_type ml_priv_type; + enum netdev_stat_type pcpu_stat_type:8;union {struct pcpu_lstats __percpu *lstats;struct pcpu_sw_netstats __percpu *tstats;
net/core/dev.c +48 -1
75 lines not on this page · raw message
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 30/112 bpf: Fix devs rx stats for bpf_redirect_peer traffic
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peilin Ye <[email protected]>
[ Upstream commit 024ee930cb3c9ae49e4266aee89cfde0ebb407e1 ]
Traffic redirected by bpf_redirect_peer() (used by recent CNIs like Cilium) is not accounted for in the RX stats of supported devices (that is, veth and netkit), confusing user space metrics collectors such as cAdvisor [0], as reported by Youlun.
Fix it by calling dev_sw_netstats_rx_add() in skb_do_redirect(), to update RX traffic counters. Devices that support ndo_get_peer_dev _must_ use the @tstats per-CPU counters (instead of @lstats, or @dstats).
To make this more fool-proof, error out when ndo_get_peer_dev is set but @tstats are not selected.
[0] Specifically, the "container_network_receive_{byte,packet}s_total" counters are affected.
--- net/core/dev.c | 8 ++++++++ net/core/filter.c | 1 + 2 files changed, 9 insertions(+)
net/core/dev.c +8 -0
@@ -10054,6 +10054,14 @@ static int netdev_do_alloc_pcpu_stats(struct net_device *dev) {void __percpu *v; +/* Drivers implementing ndo_get_peer_dev must support tstat +* accounting, so that skb_do_redirect() can bump the dev's +* RX stats upon network namespace switch. +*/ +if (dev->netdev_ops->ndo_get_peer_dev && + dev->pcpu_stat_type !=NETDEV_PCPU_STAT_TSTATS ) +return -EOPNOTSUPP ; +switch (dev->pcpu_stat_type) {case NETDEV_PCPU_STAT_NONE :return 0 ;
net/core/filter.c +1 -0
@@ -2489,6 +2489,7 @@ int skb_do_redirect(struct sk_buff *skb) net_eq(net, dev_net(dev)))) goto out_drop; skb->dev = dev; +dev_sw_netstats_rx_add (dev, skb->len);return -EAGAIN ; } return flags & BPF_F_NEIGH ?
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 31/112 accel/ivpu: Do not initialize parameters on power up
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanislaw Gruszka <[email protected]>
[ Upstream commit f956bf2080862cfc97412e1eaa08689bc9838d20 ]
Initialize HW specific parameters only once. We do not have to do this on every power_up (performed during initialization and on resume). Move corresponding code to ->info_init()
Stable-dep-of: 3f7c0634926d ("accel/ivpu/37xx: Fix hangs related to MMIO reset")
--- drivers/accel/ivpu/ivpu_hw_37xx.c | 8 ++++---- drivers/accel/ivpu/ivpu_hw_40xx.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/accel/ivpu/ivpu_hw_37xx.c +4 -4
@@ -625,6 +625,10 @@ static int ivpu_hw_37xx_info_init(struct ivpu_device *vdev)ivpu_hw_init_range (&hw->ranges.shave,0x180000000 ,SZ_2G );ivpu_hw_init_range (&hw->ranges.dma,0x200000000 ,SZ_8G ); +ivpu_hw_read_platform (vdev); +ivpu_hw_wa_init (vdev); +ivpu_hw_timeouts_init (vdev); +return 0 ; }
@@ -681,10 +685,6 @@ static int ivpu_hw_37xx_power_up(struct ivpu_device *vdev) {int ret; -ivpu_hw_read_platform (vdev); -ivpu_hw_wa_init (vdev); -ivpu_hw_timeouts_init (vdev); - ret =ivpu_hw_37xx_reset (vdev);if (ret)ivpu_warn (vdev,"Failed to reset HW: %d\n" , ret);
drivers/accel/ivpu/ivpu_hw_40xx.c +4 -4
@@ -728,6 +728,10 @@ static int ivpu_hw_40xx_info_init(struct ivpu_device *vdev)ivpu_hw_init_range (&vdev->hw->ranges.shave,0x80000000 +SZ_256M ,SZ_2G -SZ_256M );ivpu_hw_init_range (&vdev->hw->ranges.dma,0x200000000 ,SZ_8G ); +ivpu_hw_read_platform (vdev); +ivpu_hw_wa_init (vdev); +ivpu_hw_timeouts_init (vdev); +return 0 ; }
@@ -819,10 +823,6 @@ static int ivpu_hw_40xx_power_up(struct ivpu_device *vdev)return ret; } -ivpu_hw_read_platform (vdev); -ivpu_hw_wa_init (vdev); -ivpu_hw_timeouts_init (vdev); - ret =ivpu_hw_40xx_d0i3_disable (vdev);if (ret)ivpu_warn (vdev,"Failed to disable D0I3: %d\n" , ret);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 32/112 accel/ivpu/37xx: Fix hangs related to MMIO reset
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacek Lawrynowicz <[email protected]>
[ Upstream commit 3f7c0634926daf48cd2f6db6c1197a1047074088 ]
There is no need to call MMIO reset using VPU_37XX_BUTTRESS_VPU_IP_RESET register. IP will be reset by FLR or by entering d0i3. Also IP reset during power_up is not needed as the VPU is already in reset.
Removing MMIO reset improves stability as it a partial device reset that is not safe in some corner cases.
This change also brings back ivpu_boot_pwr_domain_disable() that helps to properly power down VPU when it is hung by a buggy workload.
--- drivers/accel/ivpu/ivpu_hw_37xx.c | 46 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 24 deletions(-)
drivers/accel/ivpu/ivpu_hw_37xx.c +22 -24
@@ -536,6 +536,16 @@ static int ivpu_boot_pwr_domain_enable(struct ivpu_device *vdev)return ret; } +static int ivpu_boot_pwr_domain_disable (struct ivpu_device *vdev) +{ +ivpu_boot_dpu_active_drive (vdev, false); +ivpu_boot_pwr_island_isolation_drive (vdev, true); +ivpu_boot_pwr_island_trickle_drive (vdev, false); +ivpu_boot_pwr_island_drive (vdev, false); + +return ivpu_boot_wait_for_pwr_island_status (vdev,0x0 ); +} +static void ivpu_boot_no_snoop_enable (struct ivpu_device *vdev) {u32 val =REGV_RD32 (VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES );
@@ -634,25 +644,17 @@ static int ivpu_hw_37xx_info_init(struct ivpu_device *vdev)static int ivpu_hw_37xx_reset (struct ivpu_device *vdev) { -int ret; -u32 val; - -if (IVPU_WA (punit_disabled)) -return 0 ; +int ret =0 ; - ret =REGB_POLL_FLD (VPU_37XX_BUTTRESS_VPU_IP_RESET ,TRIGGER ,0 ,TIMEOUT_US ); -if (ret) { -ivpu_err (vdev,"Timed out waiting for TRIGGER bit\n" ); -return ret; +if (ivpu_boot_pwr_domain_disable (vdev)) { +ivpu_err (vdev,"Failed to disable power domain\n" ); + ret = -EIO ; } - val =REGB_RD32 (VPU_37XX_BUTTRESS_VPU_IP_RESET ); - val =REG_SET_FLD (VPU_37XX_BUTTRESS_VPU_IP_RESET ,TRIGGER , val); -REGB_WR32 (VPU_37XX_BUTTRESS_VPU_IP_RESET , val); - - ret =REGB_POLL_FLD (VPU_37XX_BUTTRESS_VPU_IP_RESET ,TRIGGER ,0 ,TIMEOUT_US ); -if (ret) -ivpu_err (vdev,"Timed out waiting for RESET completion\n" ); +if (ivpu_pll_disable (vdev)) { +ivpu_err (vdev,"Failed to disable PLL\n" ); + ret = -EIO ; + }return ret; }
@@ -685,10 +687,6 @@ static int ivpu_hw_37xx_power_up(struct ivpu_device *vdev) {int ret; - ret =ivpu_hw_37xx_reset (vdev); -if (ret) -ivpu_warn (vdev,"Failed to reset HW: %d\n" , ret); - ret =ivpu_hw_37xx_d0i3_disable (vdev);if (ret)ivpu_warn (vdev,"Failed to disable D0I3: %d\n" , ret);
@@ -756,11 +754,11 @@ static int ivpu_hw_37xx_power_down(struct ivpu_device *vdev) {int ret =0 ; -if (!ivpu_hw_37xx_is_idle (vdev) &&ivpu_hw_37xx_reset (vdev)) -ivpu_err (vdev,"Failed to reset the VPU\n" ); +if (!ivpu_hw_37xx_is_idle (vdev)) +ivpu_warn (vdev,"VPU not idle during power down\n" ); -if (ivpu_pll_disable (vdev)) { -ivpu_err (vdev,"Failed to disable PLL\n" ); +if (ivpu_hw_37xx_reset (vdev)) { +ivpu_err (vdev,"Failed to reset VPU\n" ); ret = -EIO ; }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 23/112 filemap: add a per-mapping stable writes flag
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <[email protected]>
[ Upstream commit 762321dab9a72760bf9aec48362f932717c9424d ]
folio_wait_stable waits for writeback to finish before modifying the contents of a folio again, e.g. to support check summing of the data in the block integrity code.
Currently this behavior is controlled by the SB_I_STABLE_WRITES flag on the super_block, which means it is uniform for the entire file system. This is wrong for the block device pseudofs which is shared by all block devices, or file systems that can use multiple devices like XFS witht the RT subvolume or btrfs (although btrfs currently reimplements folio_wait_stable anyway).
Add a per-address_space AS_STABLE_WRITES flag to control the behavior in a more fine grained way. The existing SB_I_STABLE_WRITES is kept to initialize AS_STABLE_WRITES to the existing default which covers most cases.
Stable-dep-of: 1898efcdbed3 ("block: update the stable_writes flag in bdev_add")
--- fs/inode.c | 2 ++ include/linux/pagemap.h | 17 +++++++++++++++++ mm/page-writeback.c | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-)
fs/inode.c +2 -0
@@ -215,6 +215,8 @@ int inode_init_always(struct super_block *sb, struct inode *inode)lockdep_set_class_and_name (&mapping->invalidate_lock, &sb->s_type->invalidate_lock_key,"mapping.invalidate_lock" ); +if (sb->s_iflags &SB_I_STABLE_WRITES ) +mapping_set_stable_writes (mapping); inode->i_private =NULL ; inode->i_mapping = mapping;INIT_HLIST_HEAD (&inode->i_dentry);/* buggered by rcu freeing */
include/linux/pagemap.h +17 -0
@@ -204,6 +204,8 @@ enum mapping_flags {AS_NO_WRITEBACK_TAGS =5 ,AS_LARGE_FOLIO_SUPPORT =6 ,AS_RELEASE_ALWAYS ,/* Call ->release_folio(), even if no private data */ + AS_STABLE_WRITES, /* must wait for writeback before modifying + folio contents */ };/**
@@ -289,6 +291,21 @@ static inline void mapping_clear_release_always(struct address_space *mapping)clear_bit (AS_RELEASE_ALWAYS , &mapping->flags); } +static inline bool mapping_stable_writes (const struct address_space *mapping) +{ +return test_bit (AS_STABLE_WRITES , &mapping->flags); +} + +static inline void mapping_set_stable_writes (struct address_space *mapping) +{ +set_bit (AS_STABLE_WRITES , &mapping->flags); +} + +static inline void mapping_clear_stable_writes (struct address_space *mapping) +{ +clear_bit (AS_STABLE_WRITES , &mapping->flags); +} +static inline gfp_t mapping_gfp_mask (struct address_space * mapping) {return mapping->gfp_mask;
mm/page-writeback.c +1 -1
@@ -3110,7 +3110,7 @@ EXPORT_SYMBOL_GPL(folio_wait_writeback_killable);*/ void folio_wait_stable (struct folio *folio) { -if (folio_inode (folio)->i_sb->s_iflags &SB_I_STABLE_WRITES ) +if (mapping_stable_writes (folio_mapping (folio)))folio_wait_writeback (folio); }EXPORT_SYMBOL_GPL (folio_wait_stable);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 51/112 afs: Fix file locking on R/O volumes to operate in local mode
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit b590eb41be766c5a63acc7e8896a042f7a4e8293 ]
AFS doesn't really do locking on R/O volumes as fileservers don't maintain state with each other and thus a lock on a R/O volume file on one fileserver will not be be visible to someone looking at the same file on another fileserver.
Further, the server may return an error if you try it.
Fix this by doing what other AFS clients do and handle filelocking on R/O volume files entirely within the client and don't touch the server.
--- fs/afs/super.c | 2 ++ 1 file changed, 2 insertions(+)
fs/afs/super.c +2 -0
@@ -407,6 +407,8 @@ static int afs_validate_fc(struct fs_context *fc)return PTR_ERR (volume); ctx->volume = volume; +if (volume->type !=AFSVL_RWVOL ) + ctx->flock_mode = afs_flock_mode_local; }return 0 ;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 60/112 drm/msm/dpu: Add missing safe_lut_tbl in sc8280xp catalog
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjorn Andersson <[email protected]>
commit a33b2431d11b4df137bbcfdd5a5adfa054c2479e upstream.
During USB transfers on the SC8280XP __arm_smmu_tlb_sync() is seen to typically take 1-2ms to complete. As expected this results in poor performance, something that has been mitigated by proposing running the iommu in non-strict mode (boot with iommu.strict=0).
This turns out to be related to the SAFE logic, and programming the QOS SAFE values in the DPU (per suggestion from Rob and Doug) reduces the TLB sync time to below 10us, which means significant less time spent with interrupts disabled and a significant boost in throughput.
Patchwork: https://patchwork.freedesktop.org/patch/565094/
--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +1 -0
@@ -419,6 +419,7 @@ static const struct dpu_perf_cfg sc8280x .min_llcc_ib = 0, .min_dram_ib = 800000, .danger_lut_tbl = {0xf, 0xffff, 0x0}, + .safe_lut_tbl = {0xfe00, 0xfe00, 0xffff}, .qos_lut_tbl = { {.nentry = ARRAY_SIZE(sc8180x_qos_linear), .entries = sc8180x_qos_linear
Greg Kroah-Hartman
maintainerPATCH 61/112 drm/ast: Disconnect BMC if physical connector is connected
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Zimmermann <[email protected]>
commit 8d6ef26501b97243ee6c16b8187c5b38cb69b77d upstream.
Many user-space compositors fail with mode setting if a CRTC has more than one connected connector. This is the case with the BMC on Aspeed systems. Work around this problem by setting the BMC's connector status to disconnected when the physical connector has a display attached. This way compositors will only see one connected connector at a time; either the physical one or the BMC.
--- drivers/gpu/drm/ast/ast_drv.h | 13 +++++++- drivers/gpu/drm/ast/ast_mode.c | 62 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 8 deletions(-)
drivers/gpu/drm/ast/ast_drv.h +12 -1
@@ -172,6 +172,17 @@ to_ast_sil164_connector(struct drm_conne return container_of(connector, struct ast_sil164_connector, base); } +struct ast_bmc_connector { +struct drm_connector base; +struct drm_connector *physical_connector; +}; + +static inline struct ast_bmc_connector * +to_ast_bmc_connector (struct drm_connector *connector) +{ + return container_of(connector, struct ast_bmc_connector, base); +} +/* * Device */
@@ -216,7 +227,7 @@ struct ast_device { } astdp;struct {struct drm_encoder encoder; -struct drm_connector connector; +struct ast_bmc_connector bmc_connector; } bmc; } output;
drivers/gpu/drm/ast/ast_mode.c +55 -7
121 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 62/112 thunderbolt: Set lane bonding bit only for downstream port
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gil Fine <[email protected]>
commit 24d85bb3be373b5831699bddf698b392bd2b904d upstream.
Fix the lane bonding procedure to follow the steps described in USB4 Connection Manager guide. Hence, set the lane bonding bit only for downstream port. This is needed for certain ASMedia device, otherwise lane bonding fails and the device disconnects.
--- drivers/thunderbolt/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thunderbolt/switch.c +1 -1
@@ -1082,7 +1082,7 @@ int tb_port_lane_bonding_enable(struct t* Only set bonding if the link was not already bonded. This * avoids the lane adapter to re-enter bonding state. */ -if (width ==TB_LINK_WIDTH_SINGLE ) { +if (width ==TB_LINK_WIDTH_SINGLE && !tb_is_upstream_port (port)) { ret =tb_port_set_lane_bonding (port, true);if (ret) goto err_lane1;
Greg Kroah-Hartman
maintainerPATCH 63/112 ACPI: video: Use acpi_device_fix_up_power_children()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <[email protected]>
commit c93695494606326d7fd72b46a2a657139ccb0dec upstream.
Commit 89c290ea7589 ("ACPI: video: Put ACPI video and its child devices into D0 on boot") introduced calling acpi_device_fix_up_power_extended() on the video card for which the ACPI video bus is the companion device.
This unnecessarily touches the power-state of the GPU itself, while the issue it tries to address only requires calling _PS0 on the child devices.
Touching the power-state of the GPU itself is causing suspend / resume issues on e.g. a Lenovo ThinkPad W530.
Instead use acpi_device_fix_up_power_children(), which only touches the child devices, to fix this.
--- drivers/acpi/acpi_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpi_video.c +1 -1
@@ -2031,7 +2031,7 @@ static int acpi_video_bus_add(struct acpi_device *device)* HP ZBook Fury 16 G10 requires ACPI video's child devices have _PS0 * evaluated to have functional panel brightness control. */ -acpi_device_fix_up_power_extended (device); +acpi_device_fix_up_power_children (device); pr_info("%s [%s] (multi-head: %s rom: %s post: %s)\n", ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 64/112 ACPI: processor_idle: use raw_safe_halt() in acpi_idle_play_dead()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Woodhouse <[email protected]>
commit 9bb69ba4c177dccaa1f5b5cbdf80b67813328348 upstream.
Xen HVM guests were observed taking triple-faults when attempting to online a previously offlined vCPU.
Investigation showed that the fault was coming from a failing call to lockdep_assert_irqs_disabled(), in load_current_idt() which was too early in the CPU bringup to actually catch the exception and report the failure cleanly.
This was a false positive, caused by acpi_idle_play_dead() setting the per-cpu hardirqs_enabled flag by calling safe_halt(). Switch it to use raw_safe_halt() instead, which doesn't do so.
--- drivers/acpi/processor_idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/processor_idle.c +1 -1
@@ -592,7 +592,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)while (1 ) {if (cx->entry_method ==ACPI_CSTATE_HALT ) -safe_halt (); +raw_safe_halt ();else if (cx->entry_method ==ACPI_CSTATE_SYSTEMIO ) {io_idle (cx->address); }else
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 65/112 ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <[email protected]>
commit bd911485294a6f0596e4592ed442438015cffc8a upstream.
Like various other ASUS ExpertBook-s, the ASUS ExpertBook B1402CVA has an ACPI DSDT table that describes IRQ 1 as ActiveLow while the kernel overrides it to EdgeHigh.
This prevents the keyboard from working. To fix this issue, add this laptop to the skip_override_table so that the kernel does not override IRQ 1.
--- drivers/acpi/resource.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/acpi/resource.c +7 -0
@@ -447,6 +447,13 @@ static const struct dmi_system_id asus_l }, }, { +/* Asus ExpertBook B1402CVA */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_MATCH(DMI_BOARD_NAME, "B1402CVA"), + }, + }, + { .ident ="Asus ExpertBook B1502CBA" , .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
Greg Kroah-Hartman
maintainerPATCH 66/112 ACPI: PM: Add acpi_device_fix_up_power_children() function
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <[email protected]>
commit 37ba91a82e3b9de35f64348c62b5ec7d74e3a41c upstream.
In some cases it is necessary to fix-up the power-state of an ACPI device's children without touching the ACPI device itself add a new acpi_device_fix_up_power_children() function for this.
--- drivers/acpi/device_pm.c | 13 +++++++++++++ include/acpi/acpi_bus.h | 1 + 2 files changed, 14 insertions(+)
drivers/acpi/device_pm.c +13 -0
@@ -397,6 +397,19 @@ void acpi_device_fix_up_power_extended(s }EXPORT_SYMBOL_GPL (acpi_device_fix_up_power_extended); +/** +* acpi_device_fix_up_power_children - Force a device's children into D0. +* @adev: Parent device object whose children's power state is to be fixed up. +* +* Call acpi_device_fix_up_power() for @adev's children so long as they +* are reported as present and enabled. +*/ +void acpi_device_fix_up_power_children (struct acpi_device *adev) +{ +acpi_dev_for_each_child (adev, fix_up_power_if_applicable,NULL ); +} +EXPORT_SYMBOL_GPL (acpi_device_fix_up_power_children); +int acpi_device_update_power (struct acpi_device *device,int *state_p) {int state;
include/acpi/acpi_bus.h +1 -0
@@ -539,6 +539,7 @@ int acpi_device_set_power(struct acpi_deint acpi_bus_init_power (struct acpi_device *device);int acpi_device_fix_up_power (struct acpi_device *device);void acpi_device_fix_up_power_extended (struct acpi_device *adev); +void acpi_device_fix_up_power_children (struct acpi_device *adev);int acpi_bus_update_power (acpi_handle handle,int *state_p);int acpi_device_update_power (struct acpi_device *device,int *state_p);bool acpi_bus_power_manageable (acpi_handle handle);
Greg Kroah-Hartman
maintainerPATCH 67/112 swiotlb-xen: provide the "max_mapping_size" method
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keith Busch <[email protected]>
commit bff2a2d453a1b683378b4508b86b84389f551a00 upstream.
There's a bug that when using the XEN hypervisor with bios with large multi-page bio vectors on NVMe, the kernel deadlocks [1].
The deadlocks are caused by inability to map a large bio vector - dma_map_sgtable always returns an error, this gets propagated to the block layer as BLK_STS_RESOURCE and the block layer retries the request indefinitely.
XEN uses the swiotlb framework to map discontiguous pages into contiguous runs that are submitted to the PCIe device. The swiotlb framework has a limitation on the length of a mapping - this needs to be announced with the max_mapping_size method to make sure that the hardware drivers do not create larger mappings.
Without max_mapping_size, the NVMe block driver would create large mappings that overrun the maximum mapping size.
--- drivers/xen/swiotlb-xen.c | 1 + 1 file changed, 1 insertion(+)
drivers/xen/swiotlb-xen.c +1 -0
@@ -405,4 +405,5 @@ const struct dma_map_ops xen_swiotlb_dma .get_sgtable = dma_common_get_sgtable, .alloc_pages = dma_common_alloc_pages, .free_pages = dma_common_free_pages, + .max_mapping_size = swiotlb_max_mapping_size, };
Greg Kroah-Hartman
maintainerPATCH 68/112 tls: fix NULL deref on tls_sw_splice_eof() with empty record
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jann Horn <[email protected]>
commit 53f2cb491b500897a619ff6abd72f565933760f0 upstream.
syzkaller discovered that if tls_sw_splice_eof() is executed as part of sendfile() when the plaintext/ciphertext sk_msg are empty, the send path gets confused because the empty ciphertext buffer does not have enough space for the encryption overhead. This causes tls_push_record() to go on the split = true path (which is only supposed to be used when interacting with an attached BPF program), and then get further confused and hit the tls_merge_open_record() path, which then assumes that there must be at least one populated buffer element, leading to a NULL deref.
It is possible to have empty plaintext/ciphertext buffers if we previously bailed from tls_sw_sendmsg_locked() via the tls_trim_both_msgs() path. tls_sw_push_pending_record() already handles this case correctly; let's do the same check in tls_sw_splice_eof().
--- net/tls/tls_sw.c | 3 +++ 1 file changed, 3 insertions(+)
net/tls/tls_sw.c +3 -0
@@ -1232,11 +1232,14 @@ void tls_sw_splice_eof(struct socket *sock)lock_sock (sk); retry: +/* same checks as in tls_sw_push_pending_record() */ rec = ctx->open_rec;if (!rec) goto unlock; msg_pl = &rec->msg_plaintext; +if (msg_pl->sg.size ==0 ) + goto unlock;/* Check the BPF advisor and perform transmission. */ ret = bpf_exec_tx_verdict(msg_pl, sk, false, TLS_RECORD_TYPE_DATA,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 69/112 io_uring: fix off-by one bvec index
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keith Busch <[email protected]>
commit d6fef34ee4d102be448146f24caf96d7b4a05401 upstream.
If the offset equals the bv_len of the first registered bvec, then the request does not include any of that first bvec. Skip it so that drivers don't have to deal with a zero length bvec, which was observed to break NVMe's PRP list creation.
--- io_uring/rsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/rsrc.c +1 -1
@@ -1261,7 +1261,7 @@ int io_import_fixed(int ddir, struct iov*/ const struct bio_vec *bvec = imu->bvec; -if (offset <= bvec->bv_len) { +if (offset < bvec->bv_len) {/* * Note, huge pages buffers consists of one large * bvec entry and should always go this way. The other
Greg Kroah-Hartman
maintainerPATCH 52/112 nvme: blank out authentication fabrics options if not configured
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Reinecke <[email protected]>
[ Upstream commit c7ca9757bda35ff9ce27ab42f2cb8b84d983e6ad ]
If the config option NVME_HOST_AUTH is not selected we should not accept the corresponding fabrics options. This allows userspace to detect if NVMe authentication has been enabled for the kernel.
--- drivers/nvme/host/fabrics.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/nvme/host/fabrics.c +2 -0
@@ -645,8 +645,10 @@ static const match_table_t opt_tokens = { { NVMF_OPT_TOS, "tos=%d" }, { NVMF_OPT_FAIL_FAST_TMO, "fast_io_fail_tmo=%d" }, { NVMF_OPT_DISCOVERY, "discovery" }, +#ifdef CONFIG_NVME_HOST_AUTH { NVMF_OPT_DHCHAP_SECRET, "dhchap_secret=%s" }, { NVMF_OPT_DHCHAP_CTRL_SECRET, "dhchap_ctrl_secret=%s" }, +#endif { NVMF_OPT_ERR, NULL } };
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 70/112 bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Coly Li <[email protected]>
commit f72f4312d4388376fc8a1f6cf37cb21a0d41758b upstream.
Commit 028ddcac477b ("bcache: Remove unnecessary NULL point check in node allocations") do the following change inside btree_gc_coalesce(),
31 @@ -1340,7 +1340,7 @@ static int btree_gc_coalesce(
32 memset(new_nodes, 0, sizeof(new_nodes));
33 closure_init_stack(&cl);
34
35 - while (nodes < GC_MERGE_NODES && !IS_ERR_OR_NULL(r[nodes].b))
36 + while (nodes < GC_MERGE_NODES && !IS_ERR(r[nodes].b))
37 keys += r[nodes++].keys;
38
39 blocks = btree_default_blocks(b->c) * 2 / 3;
At line 35 the original r[nodes].b is not always allocatored from __bch_btree_node_alloc(), and possibly initialized as NULL pointer by caller of btree_gc_coalesce(). Therefore the change at line 36 is not correct.
This patch replaces the mistaken IS_ERR() by IS_ERR_OR_NULL() to avoid potential issue.
--- drivers/md/bcache/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/btree.c +1 -1
@@ -1363,7 +1363,7 @@ static int btree_gc_coalesce(struct btrememset (new_nodes,0 ,sizeof (new_nodes));closure_init_stack (&cl); -while (nodes <GC_MERGE_NODES && !IS_ERR (r[nodes].b)) +while (nodes <GC_MERGE_NODES && !IS_ERR_OR_NULL (r[nodes].b)) keys += r[nodes++].keys; blocks =btree_default_blocks (b->c) *2 /3 ;
Greg Kroah-Hartman
maintainerPATCH 71/112 md: fix bi_status reporting in md_end_clone_io
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Song Liu <[email protected]>
commit 45b478951b2ba5aea70b2850c49c1aa83aedd0d2 upstream.
md_end_clone_io() may overwrite error status in orig_bio->bi_status with BLK_STS_OK. This could happen when orig_bio has BIO_CHAIN (split by md_submit_bio => bio_split_to_limits, for example). As a result, upper layer may miss error reported from md (or the device) and consider the failed IO was successful.
Fix this by only update orig_bio->bi_status when current bio reports error and orig_bio is BLK_STS_OK. This is the same behavior as __bio_chain_endio().
--- drivers/md/md.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/md.c +2 -1
@@ -8669,7 +8669,8 @@ static void md_end_clone_io(struct bio *struct bio *orig_bio = md_io_clone->orig_bio;struct mddev *mddev = md_io_clone->mddev; - orig_bio->bi_status = bio->bi_status; +if (bio->bi_status && !orig_bio->bi_status) + orig_bio->bi_status = bio->bi_status;if (md_io_clone->start_time)bio_end_io_acct (orig_bio, md_io_clone->start_time);
Greg Kroah-Hartman
maintainerPATCH 72/112 bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingzhe Zou <[email protected]>
commit 2faac25d7958c4761bb8cec54adb79f806783ad6 upstream.
We get a kernel crash about "unable to handle kernel paging request":
```dmesg [368033.032005] BUG: unable to handle kernel paging request at ffffffffad9ae4b5 [368033.032007] PGD fc3a0d067 P4D fc3a0d067 PUD fc3a0e063 PMD 8000000fc38000e1 [368033.032012] Oops: 0003 [#1] SMP PTI [368033.032015] CPU: 23 PID: 55090 Comm: bch_dirtcnt[0] Kdump: loaded Tainted: G OE --------- - - 4.18.0-147.5.1.es8_24.x86_64 #1 [368033.032017] Hardware name: Tsinghua Tongfang THTF Chaoqiang Server/072T6D, BIOS 2.4.3 01/17/2017 [368033.032027] RIP: 0010:native_queued_spin_lock_slowpath+0x183/0x1d0 [368033.032029] Code: 8b 02 48 85 c0 74 f6 48 89 c1 eb d0 c1 e9 12 83 e0 03 83 e9 01 48 c1 e0 05 48 63 c9 48 05 c0 3d 02 00 48 03 04 cd 60 68 93 ad <48> 89 10 8b 42 08 85 c0 75 09 f3 90 8b 42 08 85 c0 74 f7 48 8b 02 [368033.032031] RSP: 0018:ffffbb48852abe00 EFLAGS: 00010082 [368033.032032] RAX: ffffffffad9ae4b5 RBX: 0000000000000246 RCX: 0000000000003bf3 [368033.032033] RDX: ffff97b0ff8e3dc0 RSI: 0000000000600000 RDI: ffffbb4884743c68 [368033.032034] RBP: 0000000000000001 R08: 0000000000000000 R09: 000007ffffffffff [368033.032035] R10: ffffbb486bb01000 R11: 0000000000000001 R12: ffffffffc068da70 [368033.032036] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000 [368033.032038] FS: 0000000000000000(0000) GS:ffff97b0ff8c0000(0000) knlGS:0000000000000000 [368033.032039] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [368033.032040] CR2: ffffffffad9ae4b5 CR3: 0000000fc3a0a002 CR4: 00000000003626e0 [368033.032042] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [368033.032043] bcache: bch_cached_dev_attach() Caching rbd479 as bcache462 on set 8cff3c36-4a76-4242-afaa-7630206bc70b [368033.032045] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [368033.032046] Call Trace: [368033.032054] _raw_spin_lock_irqsave+0x32/0x40 [368033.032061] __wake_up_common_lock+0x63/0xc0 [368033.032073] ? bch_ptr_invalid+0x10/0x10 [bcache] [368033.033502] bch_dirty_init_thread+0x14c/0x160 [bcache] [368033.033511] ? read_dirty_submit+0x60/0x60 [bcache] [368033.033516] kthread+0x112/0x130 [368033.033520] ? kthread_flush_work_fn+0x10/0x10 [368033.034505] ret_from_fork+0x35/0x40 ```
The crash occurred when call wake_up(&state->wait), and then we want to look at the value in the state. However, bch_sectors_dirty_init() is not found in the stack of any task. Since state is allocated on the stack, we guess that bch_sectors_dirty_init() has exited, causing bch_dirty_init_thread() to be unable to handle kernel paging request.
In order to verify this idea, we added some printing information during wake_up(&state->wait). We find that "wake up" is printed twice, however we only expect the last thread to wake up once.
```dmesg [ 994.641004] alcache: bch_dirty_init_thread() wake up [ 994.641018] alcache: bch_dirty_init_thread() wake up [ 994.641523] alcache: bch_sectors_dirty_init() init exit ```
There is a race. If bch_sectors_dirty_init() exits after the first wake up, the second wake up will trigger this bug("unable to handle kernel paging request").
Proceed as follows:
bch_sectors_dirty_init
kthread_run ==============> bch_dirty_init_thread(bch_dirtcnt[0])
... ...
atomic_inc(&state.started) ...
... ...
atomic_read(&state.enough) ...
... atomic_set(&state->enough, 1)
kthread_run ======================================================> bch_dirty_init_thread(bch_dirtcnt[1])
... atomic_dec_and_test(&state->started) ...
atomic_inc(&state.started) ... ...
... wake_up(&state->wait) ...
atomic_read(&state.enough) atomic_dec_and_test(&state->started)
... ...
wait_event(state.wait, atomic_read(&state.started) == 0) ...
return ...
wake_up(&state->wait)We believe it is very common to wake up twice if there is no dirty, but crash is an extremely low probability event. It's hard for us to reproduce this issue. We attached and detached continuously for a week, with a total of more than one million attaches and only one crash.
Putting atomic_inc(&state.started) before kthread_run() can avoid waking up twice.
--- drivers/md/bcache/writeback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/bcache/writeback.c +2 -1
@@ -1014,17 +1014,18 @@ void bch_sectors_dirty_init(struct bcachif (atomic_read (&state.enough))break ; +atomic_inc (&state.started); state.infos[i].state = &state; state.infos[i].thread =kthread_run (bch_dirty_init_thread, &state.infos[i],"bch_dirtcnt[%d]" , i);if (IS_ERR (state.infos[i].thread)) {pr_err ("fails to run thread bch_dirty_init[%d]\n" , i); +atomic_dec (&state.started);for (--i; i >=0 ; i--)kthread_stop (state.infos[i].thread); goto out; } -atomic_inc (&state.started); } out:
Greg Kroah-Hartman
maintainerPATCH 73/112 io_uring/fs: consider link->flags when getting path for LINKAT
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Mirabile <[email protected]>
commit 8479063f1fbee201a8739130e816cc331b675838 upstream.
In order for AT_EMPTY_PATH to work as expected, the fact that the user wants that behavior needs to make it to getname_flags or it will return ENOENT.
--- io_uring/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/fs.c +1 -1
@@ -254,7 +254,7 @@ int io_linkat_prep(struct io_kiocb *req, newf =u64_to_user_ptr (READ_ONCE (sqe->addr2)); lnk->flags =READ_ONCE (sqe->hardlink_flags); - lnk->oldpath =getname (oldf); + lnk->oldpath =getname_uflags (oldf, lnk->flags);if (IS_ERR (lnk->oldpath))return PTR_ERR (lnk->oldpath);
Greg Kroah-Hartman
maintainerPATCH 74/112 s390/dasd: protect device queue against concurrent access
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Höppner <[email protected]>
commit db46cd1e0426f52999d50fa72cfa97fa39952885 upstream.
In dasd_profile_start() the amount of requests on the device queue are counted. The access to the device queue is unprotected against concurrent access. With a lot of parallel I/O, especially with alias devices enabled, the device queue can change while dasd_profile_start() is accessing the queue. In the worst case this leads to a kernel panic due to incorrect pointer accesses.
Fix this by taking the device lock before accessing the queue and counting the requests. Additionally the check for a valid profile data pointer can be done earlier to avoid unnecessary locking in a hot path.
--- drivers/s390/block/dasd.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/s390/block/dasd.c +13 -11
@@ -674,18 +674,20 @@ static void dasd_profile_start(struct da* we count each request only once. */ device = cqr->startdev; -if (device->profile.data) { - counter =1 ;/* request is not yet queued on the start device */ -list_for_each (l, &device->ccw_queue) -if (++counter >=31 ) -break ; - } +if (!device->profile.data) +return ; + +spin_lock (get_ccwdev_lock (device->cdev)); + counter =1 ;/* request is not yet queued on the start device */ +list_for_each (l, &device->ccw_queue) +if (++counter >=31 ) +break ; +spin_unlock (get_ccwdev_lock (device->cdev)); +spin_lock (&device->profile.lock); -if (device->profile.data) { - device->profile.data->dasd_io_nr_req[counter]++; -if (rq_data_dir (req) ==READ ) - device->profile.data->dasd_read_nr_req[counter]++; - } + device->profile.data->dasd_io_nr_req[counter]++; +if (rq_data_dir (req) ==READ ) + device->profile.data->dasd_read_nr_req[counter]++;spin_unlock (&device->profile.lock); }
Greg Kroah-Hartman
maintainerPATCH 75/112 platform/x86: hp-bioscfg: Simplify return check in hp_add_other_attributes()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Harshit Mogalapalli <[email protected]>
commit c5dbf04160005e07e8ca7232a7faa77ab1547ae0 upstream.
All cases in switch-case have a same goto on error, move the return check out of the switch. This is a cleanup.
--- drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c +3 -5
@@ -630,21 +630,19 @@ static int hp_add_other_attributes(int aswitch (attr_type) {case HPWMI_SECURE_PLATFORM_TYPE : ret =hp_populate_secure_platform_data (attr_name_kobj); -if (ret) - goto err_other_attr_init;break ;case HPWMI_SURE_START_TYPE : ret =hp_populate_sure_start_data (attr_name_kobj); -if (ret) - goto err_other_attr_init;break ;default : ret = -EINVAL ; - goto err_other_attr_init; } +if (ret) + goto err_other_attr_init; +mutex_unlock (&bioscfg_drv.mutex);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 76/112 platform/x86: hp-bioscfg: move mutex_lock() down in hp_add_other_attributes()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Harshit Mogalapalli <[email protected]>
commit 5736aa9537c9b8927dec32d3d47c8c31fe560f62 upstream.
attr_name_kobj's memory allocation is done with mutex_lock() held, this is not needed.
Move allocation outside of mutex_lock() so unlock is not needed when allocation fails.
--- drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c +4 -6
@@ -592,13 +592,11 @@ static int hp_add_other_attributes(int aint ret;char *attr_name; -mutex_lock (&bioscfg_drv.mutex); - attr_name_kobj =kzalloc (sizeof (*attr_name_kobj),GFP_KERNEL ); -if (!attr_name_kobj) { - ret = -ENOMEM ; - goto err_other_attr_init; - } +if (!attr_name_kobj) +return -ENOMEM ; + +mutex_lock (&bioscfg_drv.mutex);/* Check if attribute type is supported */ switch (attr_type) {
Greg Kroah-Hartman
maintainerPATCH 53/112 nvmet: nul-terminate the NQNs passed in the connect command
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <[email protected]>
[ Upstream commit 1c22e0295a5eb571c27b53c7371f95699ef705ff ]
The host and subsystem NQNs are passed in the connect command payload and interpreted as nul-terminated strings. Ensure they actually are nul-terminated before using them.
--- drivers/nvme/target/fabrics-cmd.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/nvme/target/fabrics-cmd.c +4 -0
@@ -244,6 +244,8 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req) goto out; } + d->subsysnqn[NVMF_NQN_FIELD_LEN -1 ] ='\0' ; + d->hostnqn[NVMF_NQN_FIELD_LEN -1 ] ='\0' ; status =nvmet_alloc_ctrl (d->subsysnqn, d->hostnqn, req,le32_to_cpu (c->kato), &ctrl);if (status)
@@ -313,6 +315,8 @@ static void nvmet_execute_io_connect(struct nvmet_req *req) goto out; } + d->subsysnqn[NVMF_NQN_FIELD_LEN -1 ] ='\0' ; + d->hostnqn[NVMF_NQN_FIELD_LEN -1 ] ='\0' ; ctrl =nvmet_ctrl_find_get (d->subsysnqn, d->hostnqn,le16_to_cpu (d->cntlid), req);if (!ctrl) {
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 54/112 USB: dwc3: qcom: fix resource leaks on probe deferral
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 51392a1879ff06dc21b68aef4825f6ef68a7be42 ]
The driver needs to deregister and free the newly allocated dwc3 core platform device on ACPI probe errors (e.g. probe deferral) and on driver unbind but instead it leaked those resources while erroneously dropping a reference to the parent platform device which is still in use.
For OF probing the driver takes a reference to the dwc3 core platform device which has also always been leaked.
Fix the broken ACPI tear down and make sure to drop the dwc3 core reference for both OF and ACPI.
Stable-dep-of: 9cf87666fc6e ("USB: dwc3: qcom: fix ACPI platform device leak")
--- drivers/usb/dwc3/dwc3-qcom.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/usb/dwc3/dwc3-qcom.c +6 -3
@@ -758,6 +758,7 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)if (!qcom->dwc3) { ret = -ENODEV ;dev_err (dev,"failed to get dwc3 platform device\n" ); +of_platform_depopulate (dev); } node_put:
@@ -899,7 +900,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)if (ret) {dev_err (dev,"failed to register DWC3 Core, err=%d\n" , ret); - goto depopulate; + goto clk_disable; } ret =dwc3_qcom_interconnect_init (qcom);
@@ -934,7 +935,8 @@ static int dwc3_qcom_probe(struct platform_device *pdev)if (np)of_platform_depopulate (&pdev->dev);else -platform_device_put (pdev); +platform_device_del (qcom->dwc3); +platform_device_put (qcom->dwc3); clk_disable:for (i = qcom->num_clocks -1 ; i >=0 ; i--) {clk_disable_unprepare (qcom->clks[i]);
@@ -957,7 +959,8 @@ static void dwc3_qcom_remove(struct platform_device *pdev)if (np)of_platform_depopulate (&pdev->dev);else -platform_device_put (pdev); +platform_device_del (qcom->dwc3); +platform_device_put (qcom->dwc3);for (i = qcom->num_clocks -1 ; i >=0 ; i--) {clk_disable_unprepare (qcom->clks[i]);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 55/112 USB: dwc3: qcom: fix ACPI platform device leak
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 9cf87666fc6e08572341fe08ecd909935998fbbd ]
Make sure to free the "urs" platform device, which is created for some ACPI platforms, on probe errors and on driver unbind.
Compile-tested only.
--- drivers/usb/dwc3/dwc3-qcom.c | 37 +++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-)
drivers/usb/dwc3/dwc3-qcom.c +30 -7
@@ -767,9 +767,9 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)return ret; } -static struct platform_device * -dwc3_qcom_create_urs_usb_platdev (struct device *dev) +static struct platform_device *dwc3_qcom_create_urs_usb_platdev (struct device *dev) { +struct platform_device *urs_usb =NULL ;struct fwnode_handle *fwh;struct acpi_device *adev;char name[8 ];
@@ -789,9 +789,26 @@ dwc3_qcom_create_urs_usb_platdev(struct device *dev) adev =to_acpi_device_node (fwh);if (!adev) -return NULL ; + goto err_put_handle; + + urs_usb =acpi_create_platform_device (adev,NULL ); +if (IS_ERR_OR_NULL (urs_usb)) + goto err_put_handle; + +return urs_usb; -return acpi_create_platform_device (adev,NULL ); +err_put_handle: +fwnode_handle_put (fwh); + +return urs_usb; +} + +static void dwc3_qcom_destroy_urs_usb_platdev (struct platform_device *urs_usb) +{ +struct fwnode_handle *fwh = urs_usb->dev.fwnode; + +platform_device_unregister (urs_usb); +fwnode_handle_put (fwh); }static int dwc3_qcom_probe (struct platform_device *pdev)
@@ -875,13 +892,13 @@ static int dwc3_qcom_probe(struct platform_device *pdev) qcom->qscratch_base =devm_ioremap_resource (dev, parent_res);if (IS_ERR (qcom->qscratch_base)) { ret =PTR_ERR (qcom->qscratch_base); - goto clk_disable; + goto free_urs; } ret =dwc3_qcom_setup_irq (pdev);if (ret) {dev_err (dev,"failed to setup IRQs, err=%d\n" , ret); - goto clk_disable; + goto free_urs; }/*
@@ -900,7 +917,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)if (ret) {dev_err (dev,"failed to register DWC3 Core, err=%d\n" , ret); - goto clk_disable; + goto free_urs; } ret =dwc3_qcom_interconnect_init (qcom);
@@ -937,6 +954,9 @@ static int dwc3_qcom_probe(struct platform_device *pdev)else platform_device_del (qcom->dwc3);platform_device_put (qcom->dwc3); +free_urs: +if (qcom->urs_usb) +dwc3_qcom_destroy_urs_usb_platdev (qcom->urs_usb); clk_disable:for (i = qcom->num_clocks -1 ; i >=0 ; i--) {clk_disable_unprepare (qcom->clks[i]);
@@ -962,6 +982,9 @@ static void dwc3_qcom_remove(struct platform_device *pdev)platform_device_del (qcom->dwc3);platform_device_put (qcom->dwc3); +if (qcom->urs_usb) +dwc3_qcom_destroy_urs_usb_platdev (qcom->urs_usb); +for (i = qcom->num_clocks -1 ; i >=0 ; i--) {clk_disable_unprepare (qcom->clks[i]);clk_put (qcom->clks[i]);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 56/112 lockdep: Fix block chain corruption
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
[ Upstream commit bca4104b00fec60be330cd32818dd5c70db3d469 ]
Kent reported an occasional KASAN splat in lockdep. Mark then noted:
Quoted 3 lines
I suspect the dodgy access is to chain_block_buckets[-1], which hits the last 4 bytes of the redzone and gets (incorrectly/misleadingly) attributed to
nr_large_chain_blocks.
That would mean @size == 0, at which point size_to_bucket() returns -1 and the above happens.
alloc_chain_hlocks() has 'size - req', for the first with the precondition 'size >= rq', which allows the 0.
This code is trying to split a block, del_chain_block() takes what we need, and add_chain_block() puts back the remainder, except in the above case the remainder is 0 sized and things go sideways.
--- kernel/locking/lockdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/locking/lockdep.c +2 -1
@@ -3497,7 +3497,8 @@ static int alloc_chain_hlocks(int req) size =chain_block_size (curr);if (likely (size >= req)) {del_chain_block (0 , size,chain_block_next (curr)); -add_chain_block (curr + req, size - req); +if (size > req) +add_chain_block (curr + req, size - req);return curr; } }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 57/112 mm: add a NO_INHERIT flag to the PR_SET_MDWE prctl
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florent Revest <[email protected]>
[ Upstream commit 24e41bf8a6b424c76c5902fb999e9eca61bdf83d ]
This extends the current PR_SET_MDWE prctl arg with a bit to indicate that the process doesn't want MDWE protection to propagate to children.
To implement this no-inherit mode, the tag in current->mm->flags must be absent from MMF_INIT_MASK. This means that the encoding for "MDWE but without inherit" is different in the prctl than in the mm flags. This leads to a bit of bit-mangling in the prctl implementation.
Stable-dep-of: 793838138c15 ("prctl: Disable prctl(PR_SET_MDWE) on parisc")
--- include/linux/sched/coredump.h | 10 ++++++++++ include/uapi/linux/prctl.h | 1 + kernel/fork.c | 2 +- kernel/sys.c | 32 ++++++++++++++++++++++++++------ tools/include/uapi/linux/prctl.h | 1 + 5 files changed, 39 insertions(+), 7 deletions(-)
include/linux/sched/coredump.h +10 -0
@@ -91,4 +91,14 @@ static inline int get_dumpable(struct mm_struct *mm) MMF_DISABLE_THP_MASK | MMF_HAS_MDWE_MASK)#define MMF_VM_MERGE_ANY 29 +#define MMF_HAS_MDWE_NO_INHERIT 30 + +static inline unsigned long mmf_init_flags (unsigned long flags) +{ +if (flags & (1UL <<MMF_HAS_MDWE_NO_INHERIT )) + flags &= ~((1UL <<MMF_HAS_MDWE ) | + (1UL <<MMF_HAS_MDWE_NO_INHERIT )); +return flags &MMF_INIT_MASK ; +} +#endif /* _LINUX_SCHED_COREDUMP_H */
include/uapi/linux/prctl.h +1 -0
@@ -284,6 +284,7 @@ struct prctl_mm_map {/* Memory deny write / execute */ #define PR_SET_MDWE 65# define PR_MDWE_REFUSE_EXEC_GAIN (1UL << 0) +# define PR_MDWE_NO_INHERIT (1UL << 1)#define PR_GET_MDWE 66
kernel/fork.c +1 -1
@@ -1288,7 +1288,7 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p,hugetlb_count_init (mm);if (current->mm) { - mm->flags = current->mm->flags &MMF_INIT_MASK ; + mm->flags =mmf_init_flags (current->mm->flags); mm->def_flags = current->mm->def_flags &VM_INIT_DEF_MASK ; }else { mm->flags = default_dump_filter;
kernel/sys.c +26 -6
@@ -2368,19 +2368,41 @@ static int prctl_set_vma(unsigned long opt, unsigned long start, }#endif /* CONFIG_ANON_VMA_NAME */ +static inline unsigned long get_current_mdwe (void ) +{ +unsigned long ret =0 ; + +if (test_bit (MMF_HAS_MDWE , ¤t->mm->flags)) + ret |=PR_MDWE_REFUSE_EXEC_GAIN ; +if (test_bit (MMF_HAS_MDWE_NO_INHERIT , ¤t->mm->flags)) + ret |=PR_MDWE_NO_INHERIT ; + +return ret; +} +static inline int prctl_set_mdwe (unsigned long bits,unsigned long arg3,unsigned long arg4,unsigned long arg5) { +unsigned long current_bits; +if (arg3 || arg4 || arg5)return -EINVAL ; -if (bits & ~(PR_MDWE_REFUSE_EXEC_GAIN )) +if (bits & ~(PR_MDWE_REFUSE_EXEC_GAIN |PR_MDWE_NO_INHERIT )) +return -EINVAL ; + +/* NO_INHERIT only makes sense with REFUSE_EXEC_GAIN */ +if (bits &PR_MDWE_NO_INHERIT && !(bits &PR_MDWE_REFUSE_EXEC_GAIN ))return -EINVAL ; + current_bits =get_current_mdwe (); +if (current_bits && current_bits != bits) +return -EPERM ;/* Cannot unset the flags */ + +if (bits &PR_MDWE_NO_INHERIT ) +set_bit (MMF_HAS_MDWE_NO_INHERIT , ¤t->mm->flags);if (bits &PR_MDWE_REFUSE_EXEC_GAIN )set_bit (MMF_HAS_MDWE , ¤t->mm->flags); -else if (test_bit (MMF_HAS_MDWE , ¤t->mm->flags)) -return -EPERM ;/* Cannot unset the flag */ return 0 ; }
@@ -2390,9 +2412,7 @@ static inline int prctl_get_mdwe(unsigned long arg2, unsigned long arg3, {if (arg2 || arg3 || arg4 || arg5)return -EINVAL ; - -return test_bit (MMF_HAS_MDWE , ¤t->mm->flags) ? -PR_MDWE_REFUSE_EXEC_GAIN :0 ; +return get_current_mdwe (); }static int prctl_get_auxv (void __user *addr,unsigned long len)
tools/include/uapi/linux/prctl.h +1 -0
@@ -284,6 +284,7 @@ struct prctl_mm_map {/* Memory deny write / execute */ #define PR_SET_MDWE 65# define PR_MDWE_REFUSE_EXEC_GAIN (1UL << 0) +# define PR_MDWE_NO_INHERIT (1UL << 1)#define PR_GET_MDWE 66
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 58/112 prctl: Disable prctl(PR_SET_MDWE) on parisc
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <[email protected]>
[ Upstream commit 793838138c157d4c49f4fb744b170747e3dabf58 ]
systemd-254 tries to use prctl(PR_SET_MDWE) for it's MemoryDenyWriteExecute functionality, but fails on parisc which still needs executable stacks in certain combinations of gcc/glibc/kernel.
Disable prctl(PR_SET_MDWE) by returning -EINVAL for now on parisc, until userspace has catched up.
--- kernel/sys.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/sys.c +4 -0
@@ -2395,6 +2395,10 @@ static inline int prctl_set_mdwe(unsigned long bits, unsigned long arg3,if (bits &PR_MDWE_NO_INHERIT && !(bits &PR_MDWE_REFUSE_EXEC_GAIN ))return -EINVAL ; +/* PARISC cannot allow mdwe as it needs writable stacks */ +if (IS_ENABLED (CONFIG_PARISC )) +return -EINVAL ; + current_bits =get_current_mdwe ();if (current_bits && current_bits != bits)return -EPERM ;/* Cannot unset the flags */
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 59/112 kselftest/arm64: Fix output formatting for za-fork
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <[email protected]>
commit 460e462d22542adfafd8a5bc979437df73f1cbf3 upstream.
The za-fork test does not output a newline when reporting the result of the one test it runs, causing the counts printed by kselftest to be included in the test name. Add the newline.
--- tools/testing/selftests/arm64/fp/za-fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/arm64/fp/za-fork.c +1 -1
@@ -85,7 +85,7 @@ int main(int argc, char **argv)*/ ret =open ("/proc/sys/abi/sme_default_vector_length" ,O_RDONLY ,0 );if (ret >=0 ) { -ksft_test_result (fork_test (),"fork_test" ); +ksft_test_result (fork_test (),"fork_test\n" ); }else {ksft_print_msg ("SME not supported\n" );
Greg Kroah-Hartman
maintainerPATCH 50/112 afs: Return ENOENT if no cell DNS record can be found
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit 0167236e7d66c5e1e85d902a6abc2529b7544539 ]
Make AFS return error ENOENT if no cell SRV or AFSDB DNS record (or cellservdb config file record) can be found rather than returning EDESTADDRREQ.
Also add cell name lookup info to the cursor dump.
--- fs/afs/vl_rotate.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
fs/afs/vl_rotate.c +10 -0
@@ -58,6 +58,12 @@ static bool afs_start_vl_iteration(struct afs_vl_cursor *vc) }/* Status load is ordered after lookup counter load */ +if (cell->dns_status ==DNS_LOOKUP_GOT_NOT_FOUND ) { +pr_warn ("No record of cell %s\n" , cell->name); + vc->error = -ENOENT ; +return false; + } +if (cell->dns_source ==DNS_RECORD_UNAVAILABLE ) { vc->error = -EDESTADDRREQ ;return false;
@@ -285,6 +291,7 @@ bool afs_select_vlserver(struct afs_vl_cursor *vc)*/ static void afs_vl_dump_edestaddrreq (const struct afs_vl_cursor *vc) { +struct afs_cell *cell = vc->cell;static int count;int i;
@@ -294,6 +301,9 @@ static void afs_vl_dump_edestaddrreq(const struct afs_vl_cursor *vc)rcu_read_lock ();pr_notice ("EDESTADDR occurred\n" ); +pr_notice ("CELL: %s err=%d\n" , cell->name, cell->error); +pr_notice ("DNS: src=%u st=%u lc=%x\n" , + cell->dns_source, cell->dns_status, cell->dns_lookup_count);pr_notice ("VC: ut=%lx ix=%u ni=%hu fl=%hx err=%hd\n" , vc->untried, vc->index, vc->nr_iterations, vc->flags, vc->error);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 78/112 dt-bindings: usb: microchip,usb5744: Add second supply
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Eichenberger <[email protected]>
commit d0c930b745cafde8e7d25d0356c648bca669556a upstream.
The USB5744 has two power supplies one for 3V3 and one for 1V2. Add the second supply to the USB5744 DT binding.
--- Documentation/devicetree/bindings/usb/microchip,usb5744.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +6 -1
@@ -36,7 +36,11 @@ properties: vdd-supply: description: - VDD power supply to the hub + 3V3 power supply to the hub + + vdd2-supply: + description: + 1V2 power supply to the hub peer-hub: $ref: /schemas/types.yaml#/definitions/phandle
@@ -62,6 +66,7 @@ allOf: properties: reset-gpios: false vdd-supply: false + vdd2-supply: false peer-hub: false i2c-bus: false else:
Greg Kroah-Hartman
maintainerPATCH 87/112 Revert "phy: realtek: usb: Add driver for the Realtek SoC USB 3.0 PHY"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 258ea41c926b7b3a16d0d7aa210a1401c4a1601b upstream.
This reverts commit adda6e82a7de7d6d478f6c8ef127f0ac51c510a1.
The recently added Realtek PHY drivers depend on the new port status notification mechanism which was built on the deprecated USB PHY implementation and devicetree binding.
Specifically, using these PHYs would require describing the very same PHY using both the generic "phy" property and the deprecated "usb-phy" property which is clearly wrong.
We should not be building new functionality on top of the legacy USB PHY implementation even if it is currently stuck in some kind of transitional limbo.
Revert the new Realtek PHY drivers for now so that the port status notification interface can be reverted and replaced.
--- drivers/phy/realtek/Kconfig | 12 drivers/phy/realtek/Makefile | 1 drivers/phy/realtek/phy-rtk-usb3.c | 761 ------------------------------------- 3 files changed, 774 deletions(-) delete mode 100644 drivers/phy/realtek/phy-rtk-usb3.c
drivers/phy/realtek/Kconfig +0 -12
@@ -17,16 +17,4 @@ config PHY_RTK_RTD_USB2PHY DWC3 USB IP. This driver will do the PHY initialization of the parameters. -config PHY_RTK_RTD_USB3PHY - tristate "Realtek RTD USB3 PHY Transceiver Driver" - depends on USB_SUPPORT - select GENERIC_PHY - select USB_PHY - select USB_COMMON - help - Enable this to support Realtek SoC USB3 phy transceiver. - The DHC (digital home center) RTD series SoCs used the Synopsys - DWC3 USB IP. This driver will do the PHY initialization - of the parameters. - endif # ARCH_REALTEK || COMPILE_TEST
drivers/phy/realtek/Makefile +0 -1
@@ -1,3 +1,2 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_PHY_RTK_RTD_USB2PHY) += phy-rtk-usb2.o -obj-$(CONFIG_PHY_RTK_RTD_USB3PHY) += phy-rtk-usb3.o
drivers/phy/realtek/phy-rtk-usb3.c deleted +0 -761
761 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 88/112 Revert "phy: realtek: usb: Add driver for the Realtek SoC USB 2.0 PHY"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 7a784bcdd7e54f0599da3b2360e472238412623e upstream.
This reverts commit 134e6d25f6bd06071e5aac0a7eefcea6f7713955.
The recently added Realtek PHY drivers depend on the new port status notification mechanism which was built on the deprecated USB PHY implementation and devicetree binding.
Specifically, using these PHYs would require describing the very same PHY using both the generic "phy" property and the deprecated "usb-phy" property which is clearly wrong.
We should not be building new functionality on top of the legacy USB PHY implementation even if it is currently stuck in some kind of transitional limbo.
Revert the new Realtek PHY drivers for now so that the port status notification interface can be reverted and replaced.
--- drivers/phy/Kconfig | 1 drivers/phy/Makefile | 1 drivers/phy/realtek/Kconfig | 20 drivers/phy/realtek/Makefile | 2 drivers/phy/realtek/phy-rtk-usb2.c | 1325 ------------------------------------- 5 files changed, 1349 deletions(-) delete mode 100644 drivers/phy/realtek/Kconfig delete mode 100644 drivers/phy/realtek/Makefile delete mode 100644 drivers/phy/realtek/phy-rtk-usb2.c
drivers/phy/Kconfig +0 -1
@@ -87,7 +87,6 @@ source "drivers/phy/motorola/Kconfig" source "drivers/phy/mscc/Kconfig" source "drivers/phy/qualcomm/Kconfig" source "drivers/phy/ralink/Kconfig" -source "drivers/phy/realtek/Kconfig" source "drivers/phy/renesas/Kconfig" source "drivers/phy/rockchip/Kconfig" source "drivers/phy/samsung/Kconfig"
drivers/phy/Makefile +0 -1
@@ -26,7 +26,6 @@ obj-y += allwinner/ \ mscc/ \ qualcomm/ \ ralink/ \ - realtek/ \ renesas/ \ rockchip/ \ samsung/ \
drivers/phy/realtek/Kconfig deleted +0 -20
@@ -1,20 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -# -# Phy drivers for Realtek platforms -# - -if ARCH_REALTEK || COMPILE_TEST - -config PHY_RTK_RTD_USB2PHY - tristate "Realtek RTD USB2 PHY Transceiver Driver" - depends on USB_SUPPORT - select GENERIC_PHY - select USB_PHY - select USB_COMMON - help - Enable this to support Realtek SoC USB2 phy transceiver. - The DHC (digital home center) RTD series SoCs used the Synopsys - DWC3 USB IP. This driver will do the PHY initialization - of the parameters. - -endif # ARCH_REALTEK || COMPILE_TEST
drivers/phy/realtek/Makefile deleted +0 -2
@@ -1,2 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_PHY_RTK_RTD_USB2PHY) += phy-rtk-usb2.o
drivers/phy/realtek/phy-rtk-usb2.c deleted +0 -1325
1,325 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 89/112 cifs: distribute channels across interfaces based on speed
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Prasad N <[email protected]>
[ Upstream commit a6d8fb54a515f0546ffdb7870102b1238917e567 ]
Today, if the server interfaces RSS capable, we simply choose the fastest interface to setup a channel. This is not a scalable approach, and does not make a lot of attempt to distribute the connections.
This change does a weighted distribution of channels across all the available server interfaces, where the weight is a function of the advertised interface speed.
Also make sure that we don't mix rdma and non-rdma for channels.
Stable-dep-of: fa1d0508bdd4 ("cifs: account for primary channel in the interface list")
--- fs/smb/client/cifs_debug.c | 16 ++++++++ fs/smb/client/cifsglob.h | 2 + fs/smb/client/sess.c | 84 +++++++++++++++++++++++++++++++------- 3 files changed, 88 insertions(+), 14 deletions(-)
fs/smb/client/cifs_debug.c +16 -0
@@ -279,6 +279,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)struct cifs_ses *ses;struct cifs_tcon *tcon;struct cifs_server_iface *iface; +size_t iface_weight =0 , iface_min_speed =0 ; +struct cifs_server_iface *last_iface =NULL ;int c, i, j; seq_puts(m,
@@ -542,11 +544,25 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)"\tLast updated: %lu seconds ago" , ses->iface_count, (jiffies - ses->iface_last_update) / HZ); + + last_iface =list_last_entry (&ses->iface_list, + struct cifs_server_iface, + iface_head); + iface_min_speed = last_iface->speed; + j =0 ;list_for_each_entry (iface, &ses->iface_list, iface_head) {seq_printf (m,"\n\t%d)" , ++j);cifs_dump_iface (m, iface); + + iface_weight = iface->speed / iface_min_speed; +seq_printf (m,"\t\tWeight (cur,total): (%zu,%zu)" +"\n\t\tAllocated channels: %u\n" , + iface->weight_fulfilled, + iface_weight, + iface->num_channels); +if (is_ses_using_iface (ses, iface))seq_puts (m,"\t\t[CONNECTED]\n" ); }
fs/smb/client/cifsglob.h +2 -0
@@ -969,6 +969,8 @@ struct cifs_server_iface {struct list_head iface_head;struct kref refcount;size_t speed; +size_t weight_fulfilled; +unsigned int num_channels; unsigned int rdma_capable : 1; unsigned int rss_capable : 1; unsigned int is_active : 1; /* unset if non existent */
fs/smb/client/sess.c +70 -14
156 lines not on this page · raw message
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 90/112 cifs: account for primary channel in the interface list
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Prasad N <[email protected]>
[ Upstream commit fa1d0508bdd4a68c5e40f85f635712af8c12f180 ]
The refcounting of server interfaces should account for the primary channel too. Although this is not strictly necessary, doing so will account for the primary channel in DebugData.
--- fs/smb/client/sess.c | 28 ++++++++++++++++++++++++++++ fs/smb/client/smb2ops.c | 6 ++++++ 2 files changed, 34 insertions(+)
fs/smb/client/sess.c +28 -0
@@ -288,6 +288,7 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)struct cifs_server_iface *iface =NULL ;struct cifs_server_iface *old_iface =NULL ;struct cifs_server_iface *last_iface =NULL ; +struct sockaddr_storage ss;int rc =0 ;spin_lock (&ses->chan_lock);
@@ -306,6 +307,10 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server) }spin_unlock (&ses->chan_lock); +spin_lock (&server->srv_lock); + ss = server->dstaddr; +spin_unlock (&server->srv_lock); +spin_lock (&ses->iface_lock);if (!ses->iface_count) {spin_unlock (&ses->iface_lock);
@@ -319,6 +324,16 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)/* then look for a new one */ list_for_each_entry (iface, &ses->iface_list, iface_head) { +if (!chan_index) { +/* if we're trying to get the updated iface for primary channel */ +if (!cifs_match_ipaddr ((struct sockaddr *) &ss, + (struct sockaddr *) &iface->sockaddr)) +continue ; + +kref_get (&iface->refcount); +break ; + } +/* do not mix rdma and non-rdma interfaces */ if (iface->rdma_capable != server->rdma)continue ;
@@ -345,6 +360,13 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)cifs_dbg (FYI ,"unable to find a suitable iface\n" ); } +if (!chan_index && !iface) { +cifs_dbg (FYI ,"unable to get the interface matching: %pIS\n" , + &ss); +spin_unlock (&ses->iface_lock); +return 0 ; + } +/* now drop the ref to the current iface */ if (old_iface && iface) { cifs_dbg(FYI, "replacing iface: %pIS with %pIS\n",
@@ -367,6 +389,12 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server) old_iface->weight_fulfilled--;kref_put (&old_iface->refcount, release_iface); + }else if (!chan_index) { +/* special case: update interface for primary channel */ +cifs_dbg (FYI ,"referencing primary channel iface: %pIS\n" , + &iface->sockaddr); + iface->num_channels++; + iface->weight_fulfilled++; }else {WARN_ON (!iface);cifs_dbg (FYI ,"adding new iface: %pIS\n" , &iface->sockaddr);
fs/smb/client/smb2ops.c +6 -0
@@ -756,6 +756,7 @@ SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon, bool in_unsigned int ret_data_len =0 ;struct network_interface_info_ioctl_rsp *out_buf =NULL ;struct cifs_ses *ses = tcon->ses; +struct TCP_Server_Info *pserver;/* do not query too frequently */ if (ses->iface_last_update &&
@@ -780,6 +781,11 @@ SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon, bool in_if (rc) goto out; +/* check if iface is still active */ + pserver = ses->chans[0 ].server; +if (pserver && !cifs_chan_is_iface_active (ses, pserver)) +cifs_chan_update_iface (ses, pserver); + out:kfree (out_buf);return rc;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 91/112 cifs: fix leak of iface for primary channel
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Prasad N <[email protected]>
[ Upstream commit 29954d5b1e0d67a4cd61c30c2201030c97e94b1e ]
My last change in this area introduced a change which accounted for primary channel in the interface ref count. However, it did not reduce this ref count on deallocation of the primary channel. i.e. during umount.
Fixing this leak here, by dropping this ref count for primary channel while freeing up the session.
--- fs/smb/client/connect.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/smb/client/connect.c +6 -0
@@ -2034,6 +2034,12 @@ void __cifs_put_smb_ses(struct cifs_ses *ses) } } +/* we now account for primary channel in iface->refcount */ +if (ses->chans[0 ].iface) { +kref_put (&ses->chans[0 ].iface->refcount, release_iface); + ses->chans[0 ].server =NULL ; + } +sesInfoFree (ses);cifs_put_tcp_session (server,0 ); }
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 92/112 ALSA: hda: ASUS UM5302LA: Added quirks for cs35L41/10431A83 on i2c bus
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vitalii Torshyn <[email protected]>
[ Upstream commit 6ae90e906aed727759b88eb2b000fcdc8fcd94a3 ]
Proposed patch fixes initialization of CSC3551 on the UM5302LA laptop. Patching DSDT table is not required since ASUS did added _DSD entry. Nothing new introduced but reused work started by Stefan B.
Currently there is no official firmware available for 10431A83 on cirrus git unfortunately.
For testing used 104317f3 (which is also seems on i2c bus):
$ cd /lib/firmware/cirrus/ && \ for fw in $(find ./ -name '*104317f3*'); do newfw=$(echo $fw | sed 's/104317f3/10431a83/g'); echo echo "$fw -> $newfw"; ln -s $f $newfw; done
With the patch applied to 6.6.0 and obviously symlinks to 104317F3 FW, speakers works and to my susrprise they sound quite good and loud without distortion.
Probably confirmation from cirrus team is needed on firmware.
Stable-dep-of: 61cbc08fdb04 ("ALSA: hda/realtek: Add quirks for ASUS 2024 Zenbooks")
--- sound/pci/hda/patch_realtek.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/pci/hda/patch_realtek.c +6 -0
@@ -7366,6 +7366,7 @@ enum {ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD ,ALC2XX_FIXUP_HEADSET_MIC ,ALC289_FIXUP_DELL_CS35L41_SPI_2 , + ALC294_FIXUP_CS35L41_I2C_2, };/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -9495,6 +9496,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id =ALC289_FIXUP_DUAL_SPK }, + [ALC294_FIXUP_CS35L41_I2C_2] = { + .type = HDA_FIXUP_FUNC, + .v.func = cs35l41_fixup_i2c_two, + }, };static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -9864,6 +9869,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1043 ,0x19e1 ,"ASUS UX581LV" ,ALC295_FIXUP_ASUS_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x1a13 ,"Asus G73Jw" ,ALC269_FIXUP_ASUS_G73JW ),SND_PCI_QUIRK (0x1043 ,0x1a30 ,"ASUS X705UD" ,ALC256_FIXUP_ASUS_MIC ), +SND_PCI_QUIRK (0x1043 ,0x1a83 ,"ASUS UM5302LA" ,ALC294_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x1043 ,0x1a8f ,"ASUS UX582ZS" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x1b11 ,"ASUS UX431DA" ,ALC294_FIXUP_ASUS_COEF_1B ), SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 93/112 ALSA: hda/realtek: Add quirks for ASUS 2024 Zenbooks
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Binding <[email protected]>
[ Upstream commit 61cbc08fdb04fd445458b0f4cba7e6929afdfaef ]
These ASUS Zenbook laptops use Realtek HDA codec combined with 2xCS35L41 Amplifiers using SPI or I2C with External Boost or Internal Boost.
--- sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/pci/hda/patch_realtek.c +4 -0
@@ -9869,13 +9869,17 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1043 ,0x19e1 ,"ASUS UX581LV" ,ALC295_FIXUP_ASUS_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x1a13 ,"Asus G73Jw" ,ALC269_FIXUP_ASUS_G73JW ),SND_PCI_QUIRK (0x1043 ,0x1a30 ,"ASUS X705UD" ,ALC256_FIXUP_ASUS_MIC ), +SND_PCI_QUIRK (0x1043 ,0x1a63 ,"ASUS UX3405MA" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x1a83 ,"ASUS UM5302LA" ,ALC294_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x1043 ,0x1a8f ,"ASUS UX582ZS" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x1b11 ,"ASUS UX431DA" ,ALC294_FIXUP_ASUS_COEF_1B ),SND_PCI_QUIRK (0x1043 ,0x1b13 ,"Asus U41SV" ,ALC269_FIXUP_INV_DMIC ),SND_PCI_QUIRK (0x1043 ,0x1b93 ,"ASUS G614JVR/JIR" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x1bbd ,"ASUS Z550MA" ,ALC255_FIXUP_ASUS_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1043 ,0x1c03 ,"ASUS UM3406HA" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x1043 ,0x1c23 ,"Asus X55U" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ), +SND_PCI_QUIRK (0x1043 ,0x1c33 ,"ASUS UX5304MA" ,ALC245_FIXUP_CS35L41_SPI_2 ), +SND_PCI_QUIRK (0x1043 ,0x1c43 ,"ASUS UX8406MA" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x1c62 ,"ASUS GU603" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x1c92 ,"ASUS ROG Strix G15" ,ALC285_FIXUP_ASUS_G533Z_PINS ), SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JI", ALC285_FIXUP_ASUS_HEADSET_MIC),
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 94/112 dm-delay: fix a race between delay_presuspend and delay_bio
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
[ Upstream commit 6fc45b6ed921dc00dfb264dc08c7d67ee63d2656 ]
In delay_presuspend, we set the atomic variable may_delay and then stop the timer and flush pending bios. The intention here is to prevent the delay target from re-arming the timer again.
However, this test is racy. Suppose that one thread goes to delay_bio, sees that dc->may_delay is one and proceeds; now, another thread executes delay_presuspend, it sets dc->may_delay to zero, deletes the timer and flushes pending bios. Then, the first thread continues and adds the bio to delayed->list despite the fact that dc->may_delay is false.
Fix this bug by changing may_delay's type from atomic_t to bool and only access it while holding the delayed_bios_lock mutex. Note that we don't have to grab the mutex in delay_resume because there are no bios in flight at this point.
--- drivers/md/dm-delay.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
drivers/md/dm-delay.c +12 -5
@@ -31,7 +31,7 @@ struct delay_c {struct workqueue_struct *kdelayd_wq;struct work_struct flush_expired_bios;struct list_head delayed_bios; -atomic_t may_delay; +bool may_delay;struct delay_class read;struct delay_class write;
@@ -192,7 +192,7 @@ static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv)INIT_WORK (&dc->flush_expired_bios, flush_expired_bios);INIT_LIST_HEAD (&dc->delayed_bios);mutex_init (&dc->timer_lock); -atomic_set (&dc->may_delay,1 ); + dc->may_delay = true; dc->argc = argc; ret =delay_class_ctr (ti, &dc->read, argv);
@@ -247,7 +247,7 @@ static int delay_bio(struct delay_c *dc, struct delay_class *c, struct bio *bio)struct dm_delay_info *delayed;unsigned long expires =0 ; -if (!c->delay || !atomic_read (&dc->may_delay)) +if (!c->delay)return DM_MAPIO_REMAPPED ; delayed =dm_per_bio_data (bio,sizeof (struct dm_delay_info ));
@@ -256,6 +256,10 @@ static int delay_bio(struct delay_c *dc, struct delay_class *c, struct bio *bio) delayed->expires = expires = jiffies +msecs_to_jiffies (c->delay);mutex_lock (&delayed_bios_lock); +if (unlikely (!dc->may_delay)) { +mutex_unlock (&delayed_bios_lock); +return DM_MAPIO_REMAPPED ; + } c->ops++;list_add_tail (&delayed->list, &dc->delayed_bios);mutex_unlock (&delayed_bios_lock);
@@ -269,7 +273,10 @@ static void delay_presuspend(struct dm_target *ti) {struct delay_c *dc = ti->private; -atomic_set (&dc->may_delay,0 ); +mutex_lock (&delayed_bios_lock); + dc->may_delay = false; +mutex_unlock (&delayed_bios_lock); +del_timer_sync (&dc->delay_timer);flush_bios (flush_delayed_bios (dc,1 )); }
@@ -278,7 +285,7 @@ static void delay_resume(struct dm_target *ti) {struct delay_c *dc = ti->private; -atomic_set (&dc->may_delay,1 ); + dc->may_delay = true; }static int delay_map (struct dm_target *ti,struct bio *bio)
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 95/112 veth: Use tstats per-CPU traffic counters
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peilin Ye <[email protected]>
[ Upstream commit 6f2684bf2b4460c84d0d34612a939f78b96b03fc ]
Currently veth devices use the lstats per-CPU traffic counters, which only cover TX traffic. veth_get_stats64() actually populates RX stats of a veth device from its peer's TX counters, based on the assumption that a veth device can _only_ receive packets from its peer, which is no longer true:
For example, recent CNIs (like Cilium) can use the bpf_redirect_peer() BPF helper to redirect traffic from NIC's tc ingress to veth's tc ingress (in a different netns), skipping veth's peer device. Unfortunately, this kind of traffic isn't currently accounted for in veth's RX stats.
In preparation for the fix, use tstats (instead of lstats) to maintain both RX and TX counters for each veth device. We'll use RX counters for bpf_redirect_peer() traffic, and keep using TX counters for the usual "peer-to-peer" traffic. In veth_get_stats64(), calculate RX stats by _adding_ RX count to peer's TX count, in order to cover both kinds of traffic.
veth_stats_rx() might need a name change (perhaps to "veth_stats_xdp()") for less confusion, but let's leave it to another patch to keep the fix minimal.
--- drivers/net/veth.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-)
drivers/net/veth.c +11 -19
@@ -373,7 +373,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)skb_tx_timestamp (skb);if (likely (veth_forward_skb (rcv, skb, rq, use_napi) ==NET_RX_SUCCESS )) {if (!use_napi) -dev_lstats_add (dev, length); +dev_sw_netstats_tx_add (dev,1 , length);else __veth_xdp_flush (rq); }else {
@@ -387,14 +387,6 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)return ret; } -static u64 veth_stats_tx (struct net_device *dev,u64 *packets,u64 *bytes) -{ -struct veth_priv *priv =netdev_priv (dev); - -dev_lstats_read (dev, packets, bytes); -return atomic64_read (&priv->dropped); -} -static void veth_stats_rx (struct veth_stats *result,struct net_device *dev) {struct veth_priv *priv =netdev_priv (dev);
@@ -432,24 +424,24 @@ static void veth_get_stats64(struct net_device *dev,struct veth_priv *priv =netdev_priv (dev);struct net_device *peer;struct veth_stats rx; -u64 packets, bytes; - tot->tx_dropped =veth_stats_tx (dev, &packets, &bytes); - tot->tx_bytes = bytes; - tot->tx_packets = packets; + tot->tx_dropped =atomic64_read (&priv->dropped); +dev_fetch_sw_netstats (tot, dev->tstats);veth_stats_rx (&rx, dev); tot->tx_dropped += rx.xdp_tx_err; tot->rx_dropped = rx.rx_drops + rx.peer_tq_xdp_xmit_err; - tot->rx_bytes = rx.xdp_bytes; - tot->rx_packets = rx.xdp_packets; + tot->rx_bytes += rx.xdp_bytes; + tot->rx_packets += rx.xdp_packets;rcu_read_lock (); peer =rcu_dereference (priv->peer);if (peer) { -veth_stats_tx (peer, &packets, &bytes); - tot->rx_bytes += bytes; - tot->rx_packets += packets; +struct rtnl_link_stats64 tot_peer = {}; + +dev_fetch_sw_netstats (&tot_peer, peer->tstats); + tot->rx_bytes += tot_peer.tx_bytes; + tot->rx_packets += tot_peer.tx_packets;veth_stats_rx (&rx, peer); tot->tx_dropped += rx.peer_tq_xdp_xmit_err;
@@ -1776,7 +1768,7 @@ static void veth_setup(struct net_device *dev) NETIF_F_HW_VLAN_STAG_RX); dev->needs_free_netdev = true; dev->priv_destructor = veth_dev_free; - dev->pcpu_stat_type =NETDEV_PCPU_STAT_LSTATS ; + dev->pcpu_stat_type =NETDEV_PCPU_STAT_TSTATS ; dev->max_mtu =ETH_MAX_MTU ; dev->hw_features =VETH_FEATURES ;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 96/112 bcache: check return value from btree_node_alloc_replacement()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Coly Li <[email protected]>
commit 777967e7e9f6f5f3e153abffb562bffaf4430d26 upstream.
In btree_gc_rewrite_node(), pointer 'n' is not checked after it returns from btree_gc_rewrite_node(). There is potential possibility that 'n' is a non NULL ERR_PTR(), referencing such error code is not permitted in following code. Therefore a return value checking is necessary after 'n' is back from btree_node_alloc_replacement().
--- drivers/md/bcache/btree.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/md/bcache/btree.c +2 -0
@@ -1527,6 +1527,8 @@ static int btree_gc_rewrite_node(structreturn 0 ; n =btree_node_alloc_replacement (replace,NULL ); +if (IS_ERR (n)) +return 0 ;/* recheck reserve after allocating replacement node */ if (btree_check_reserve (b,NULL )) {
Greg Kroah-Hartman
maintainerPATCH 79/112 usb: misc: onboard-hub: add support for Microchip USB5744
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Eichenberger <[email protected]>
commit 6972b38ca05235f6142715db7062ecc87a422e22 upstream.
Add support for the Microchip USB5744 USB3.0 and USB2.0 Hub.
The Microchip USB5744 supports two power supplies, one for 1V2 and one for 3V3. According to the datasheet there is no need for a delay between power on and reset, so this value is set to 0.
--- drivers/usb/misc/onboard_usb_hub.c | 2 ++ drivers/usb/misc/onboard_usb_hub.h | 7 +++++++ 2 files changed, 9 insertions(+)
drivers/usb/misc/onboard_usb_hub.c +2 -0
@@ -437,6 +437,8 @@ static const struct usb_device_id onboar { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2412) }, /* USB2412 USB 2.0 */ { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 */ { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2517) }, /* USB2517 USB 2.0 */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2744) }, /* USB5744 USB 2.0 */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x5744) }, /* USB5744 USB 3.0 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 */
drivers/usb/misc/onboard_usb_hub.h +7 -0
@@ -16,6 +16,11 @@ static const struct onboard_hub_pdata mi .num_supplies = 1, }; +static const struct onboard_hub_pdata microchip_usb5744_data = { + .reset_us =0 , + .num_supplies =2 , +}; +static const struct onboard_hub_pdata realtek_rts5411_data = { .reset_us =0 , .num_supplies =1 ,
@@ -50,6 +55,8 @@ static const struct of_device_id onboard { .compatible = "usb424,2412", .data = µchip_usb424_data, }, { .compatible = "usb424,2514", .data = µchip_usb424_data, }, { .compatible = "usb424,2517", .data = µchip_usb424_data, }, + { .compatible = "usb424,2744", .data = µchip_usb5744_data, }, + { .compatible = "usb424,5744", .data = µchip_usb5744_data, }, { .compatible = "usb451,8140", .data = &ti_tusb8041_data, }, { .compatible = "usb451,8142", .data = &ti_tusb8041_data, }, { .compatible = "usb4b4,6504", .data = &cypress_hx3_data, },
Greg Kroah-Hartman
maintainerPATCH 97/112 bcache: prevent potential division by zero error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rand Deeb <[email protected]>
commit 2c7f497ac274a14330208b18f6f734000868ebf9 upstream.
In SHOW(), the variable 'n' is of type 'size_t.' While there is a conditional check to verify that 'n' is not equal to zero before executing the 'do_div' macro, concerns arise regarding potential division by zero error in 64-bit environments.
The concern arises when 'n' is 64 bits in size, greater than zero, and the lower 32 bits of it are zeros. In such cases, the conditional check passes because 'n' is non-zero, but the 'do_div' macro casts 'n' to 'uint32_t,' effectively truncating it to its lower 32 bits. Consequently, the 'n' value becomes zero.
To fix this potential division by zero error and ensure precise division handling, this commit replaces the 'do_div' macro with div64_u64(). div64_u64() is designed to work with 64-bit operands, guaranteeing that division is performed correctly.
This change enhances the robustness of the code, ensuring that division operations yield accurate results in all scenarios, eliminating the possibility of division by zero, and improving compatibility across different 64-bit environments.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/md/bcache/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/sysfs.c +1 -1
@@ -1103,7 +1103,7 @@ SHOW(__bch_cache) sum +=INITIAL_PRIO - cached[i];if (n) -do_div (sum, n); + sum =div64_u64 (sum, n);for (i =0 ; i <ARRAY_SIZE (q); i++) q[i] = INITIAL_PRIO - cached[n * (i + 1) /
Greg Kroah-Hartman
maintainerPATCH 98/112 bcache: fixup init dirty data errors
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingzhe Zou <[email protected]>
commit 7cc47e64d3d69786a2711a4767e26b26ba63d7ed upstream.
We found that after long run, the dirty_data of the bcache device will have errors. This error cannot be eliminated unless re-register.
We also found that reattach after detach, this error can accumulate.
In bch_sectors_dirty_init(), all inode <= d->id keys will be recounted again. This is wrong, we only need to count the keys of the current device.
--- drivers/md/bcache/writeback.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/md/bcache/writeback.c +4 -1
@@ -991,8 +991,11 @@ void bch_sectors_dirty_init(struct bcach op.count =0 ;for_each_key_filter (&c->root->keys, - k, &iter, bch_ptr_invalid) + k, &iter, bch_ptr_invalid) { +if (KEY_INODE (k) != op.inode) +continue ;sectors_dirty_init_fn (&op.op, c->root, k); + }rw_unlock (0 , c->root);return ;
Greg Kroah-Hartman
maintainerPATCH 99/112 bcache: fixup lock c->root error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingzhe Zou <[email protected]>
commit e34820f984512b433ee1fc291417e60c47d56727 upstream.
We had a problem with io hung because it was waiting for c->root to release the lock.
crash> cache_set.root -l cache_set.list ffffa03fde4c0050
root = 0xffff802ef454c800
crash> btree -o 0xffff802ef454c800 | grep rw_semaphore
[ffff802ef454c858] struct rw_semaphore lock;
crash> struct rw_semaphore ffff802ef454c858 struct rw_semaphore {
count = {
counter = -4294967297
},
wait_list = {
next = 0xffff00006786fc28,
prev = 0xffff00005d0efac8
},
wait_lock = {
raw_lock = {
{
val = {
counter = 0
},
{
locked = 0 '\000',
pending = 0 '\000'
},
{
locked_pending = 0,
tail = 0
}
}
}
},
osq = {
tail = {
counter = 0
} },
owner = 0xffffa03fdc586603
}
The "counter = -4294967297" means that lock count is -1 and a write lock is being attempted. Then, we found that there is a btree with a counter of 1 in btree_cache_freeable.
crash> cache_set -l cache_set.list ffffa03fde4c0050 -o|grep btree_cache
[ffffa03fde4c1140] struct list_head btree_cache; [ffffa03fde4c1150] struct list_head btree_cache_freeable; [ffffa03fde4c1160] struct list_head btree_cache_freed; [ffffa03fde4c1170] unsigned int btree_cache_used; [ffffa03fde4c1178] wait_queue_head_t btree_cache_wait; [ffffa03fde4c1190] struct task_struct *btree_cache_alloc_lock;
crash> list -H ffffa03fde4c1140|wc -l
973
crash> list -H ffffa03fde4c1150|wc -l
1123
crash> cache_set.btree_cache_used -l cache_set.list ffffa03fde4c0050
btree_cache_used = 2097
crash> list -s btree -l btree.list -H ffffa03fde4c1140|grep -E -A2 "^ lock = {" > btree_cache.txt
crash> list -s btree -l btree.list -H ffffa03fde4c1150|grep -E -A2 "^ lock = {" > btree_cache_freeable.txt[root@node-3 127.0.0.1-2023-08-04-16:40:28]# pwd/var/crash/127.0.0.1-2023-08-04-16:40:28
[root@node-3 127.0.0.1-2023-08-04-16:40:28]# cat btree_cache.txt|grep counter|grep -v "counter = 0" [root@node-3 127.0.0.1-2023-08-04-16:40:28]# cat btree_cache_freeable.txt|grep counter|grep -v "counter = 0"
counter = 1
We found that this is a bug in bch_sectors_dirty_init() when locking c->root:
(1). Thread X has locked c->root(A) write.
(2). Thread Y failed to lock c->root(A), waiting for the lock(c->root A).
(3). Thread X bch_btree_set_root() changes c->root from A to B.
(4). Thread X releases the lock(c->root A).
(5). Thread Y successfully locks c->root(A).
(6). Thread Y releases the lock(c->root B).
down_write locked ---(1)----------------------┐
| |
| down_read waiting ---(2)----┐ |
| | ┌-------------┐ ┌-------------┐
bch_btree_set_root ===(3)========>> | c->root A | | c->root B |
| | └-------------┘ └-------------┘
up_write ---(4)---------------------┘ | |
| | |
down_read locked ---(5)-----------┘ |
| |
up_read ---(6)-----------------------------┘Since c->root may change, the correct steps to lock c->root should be the same as bch_root_usage(), compare after locking.
static unsigned int bch_root_usage(struct cache_set *c)
{
unsigned int bytes = 0;
struct bkey *k;
struct btree *b;
struct btree_iter iter;
goto lock_root;
do {
rw_unlock(false, b);
lock_root:
b = c->root;
rw_lock(false, b, b->level);
} while (b != c->root);
for_each_key_filter(&b->keys, k, &iter, bch_ptr_bad)
bytes += bkey_bytes(k);
rw_unlock(false, b);
return (bytes * 100) / btree_bytes(c);
}--- drivers/md/bcache/writeback.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/md/bcache/writeback.c +11 -3
@@ -977,14 +977,22 @@ static int bch_btre_dirty_init_thread_nrvoid bch_sectors_dirty_init (struct bcache_device *d) {int i; +struct btree *b =NULL ;struct bkey *k =NULL ;struct btree_iter iter;struct sectors_dirty_init op;struct cache_set *c = d->c;struct bch_dirty_init_state state; +retry_lock: + b = c->root; +rw_lock (0 , b, b->level); +if (b != c->root) { +rw_unlock (0 , b); + goto retry_lock; + } +/* Just count root keys if no leaf node */ -rw_lock (0 , c->root, c->root->level);if (c->root->level ==0 ) {bch_btree_op_init (&op.op,-1 ); op.inode = d->id;
@@ -997,7 +1005,7 @@ void bch_sectors_dirty_init(struct bcachsectors_dirty_init_fn (&op.op, c->root, k); } -rw_unlock (0 , c->root); +rw_unlock (0 , b);return ; }
@@ -1034,7 +1042,7 @@ void bch_sectors_dirty_init(struct bcach out:/* Must wait for all threads to stop. */ wait_event (state.wait,atomic_read (&state.started) ==0 ); -rw_unlock (0 , c->root); +rw_unlock (0 , b); }void bch_cached_dev_writeback_init (struct cached_dev *dc)
Greg Kroah-Hartman
maintainerPATCH 100/112 USB: xhci-plat: fix legacy PHY double init
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 16b7e0cccb243033de4406ffb4d892365041a1e7 upstream.
Commits 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") and 9134c1fd0503 ("usb: xhci: plat: Add USB 3.0 phy support") added support for looking up legacy PHYs from the sysdev devicetree node and initialising them.
This broke drivers such as dwc3 which manages PHYs themself as the PHYs would now be initialised twice, something which specifically can lead to resources being left enabled during suspend (e.g. with the usb_phy_generic PHY driver).
As the dwc3 driver uses driver-name matching for the xhci platform device, fix this by only looking up and initialising PHYs for devices that have been matched using OF.
Note that checking that the platform device has a devicetree node would currently be sufficient, but that could lead to subtle breakages in case anyone ever tries to reuse an ancestor's node.
--- drivers/usb/host/xhci-plat.c | 50 +++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 20 deletions(-)
drivers/usb/host/xhci-plat.c +30 -20
@@ -13,6 +13,7 @@#include <linux/module.h> #include <linux/pci.h> #include <linux/of.h> +#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/usb/phy.h> #include <linux/slab.h>
@@ -148,7 +149,7 @@ int xhci_plat_probe(struct platform_deviint ret;int irq;struct xhci_plat_priv *priv =NULL ; - +bool of_match;if (usb_disabled ())return -ENODEV ;
@@ -253,16 +254,23 @@ int xhci_plat_probe(struct platform_devi &xhci->imod_interval); } - hcd->usb_phy =devm_usb_get_phy_by_phandle (sysdev,"usb-phy" ,0 ); -if (IS_ERR (hcd->usb_phy)) { - ret =PTR_ERR (hcd->usb_phy); -if (ret == -EPROBE_DEFER ) - goto disable_clk; - hcd->usb_phy =NULL ; - }else { - ret =usb_phy_init (hcd->usb_phy); -if (ret) - goto disable_clk; +/* +* Drivers such as dwc3 manages PHYs themself (and rely on driver name +* matching for the xhci platform device). +*/ + of_match =of_match_device (pdev->dev.driver->of_match_table, &pdev->dev); +if (of_match) { + hcd->usb_phy =devm_usb_get_phy_by_phandle (sysdev,"usb-phy" ,0 ); +if (IS_ERR (hcd->usb_phy)) { + ret =PTR_ERR (hcd->usb_phy); +if (ret == -EPROBE_DEFER ) + goto disable_clk; + hcd->usb_phy =NULL ; + }else { + ret =usb_phy_init (hcd->usb_phy); +if (ret) + goto disable_clk; + } } hcd->tpl_support =of_usb_host_tpl_support (sysdev->of_node);
@@ -285,15 +293,17 @@ int xhci_plat_probe(struct platform_devi goto dealloc_usb2_hcd; } - xhci->shared_hcd->usb_phy =devm_usb_get_phy_by_phandle (sysdev, -"usb-phy" ,1 ); -if (IS_ERR (xhci->shared_hcd->usb_phy)) { - xhci->shared_hcd->usb_phy =NULL ; - }else { - ret =usb_phy_init (xhci->shared_hcd->usb_phy); -if (ret) -dev_err (sysdev,"%s init usb3phy fail (ret=%d)\n" , - __func__, ret); +if (of_match) { + xhci->shared_hcd->usb_phy =devm_usb_get_phy_by_phandle (sysdev, +"usb-phy" ,1 ); +if (IS_ERR (xhci->shared_hcd->usb_phy)) { + xhci->shared_hcd->usb_phy =NULL ; + }else { + ret =usb_phy_init (xhci->shared_hcd->usb_phy); +if (ret) +dev_err (sysdev,"%s init usb3phy fail (ret=%d)\n" , + __func__, ret); + } } xhci->shared_hcd->tpl_support = hcd->tpl_support;
Greg Kroah-Hartman
maintainerPATCH 101/112 usb: config: fix iteration issue in usb_get_bos_descriptor()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niklas Neronin <[email protected]>
commit 974bba5c118f4c2baf00de0356e3e4f7928b4cbc upstream.
The BOS descriptor defines a root descriptor and is the base descriptor for accessing a family of related descriptors.
Function 'usb_get_bos_descriptor()' encounters an iteration issue when skipping the 'USB_DT_DEVICE_CAPABILITY' descriptor type. This results in the same descriptor being read repeatedly.
To address this issue, a 'goto' statement is introduced to ensure that the pointer and the amount read is updated correctly. This ensures that the function iterates to the next descriptor instead of reading the same descriptor repeatedly.
--- drivers/usb/core/config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/core/config.c +2 -1
@@ -1047,7 +1047,7 @@ int usb_get_bos_descriptor(struct usb_deif (cap->bDescriptorType !=USB_DT_DEVICE_CAPABILITY ) {dev_notice (ddev,"descriptor type invalid, skip\n" ); -continue ; + goto skip_to_next_descriptor; }switch (cap_type) {
@@ -1078,6 +1078,7 @@ int usb_get_bos_descriptor(struct usb_debreak ; } +skip_to_next_descriptor: total_len -= length; buffer += length; }
Greg Kroah-Hartman
maintainerPATCH 102/112 usb: cdnsp: Fix deadlock issue during using NCM gadget
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pawel Laszczak <[email protected]>
commit 58f2fcb3a845fcbbad2f3196bb37d744e0506250 upstream.
The interrupt service routine registered for the gadget is a primary handler which mask the interrupt source and a threaded handler which handles the source of the interrupt. Since the threaded handler is voluntary threaded, the IRQ-core does not disable bottom halves before invoke the handler like it does for the forced-threaded handler.
Due to changes in networking it became visible that a network gadget's completions handler may schedule a softirq which remains unprocessed. The gadget's completion handler is usually invoked either in hard-IRQ or soft-IRQ context. In this context it is enough to just raise the softirq because the softirq itself will be handled once that context is left. In the case of the voluntary threaded handler, there is nothing that will process pending softirqs. Which means it remain queued until another random interrupt (on this CPU) fires and handles it on its exit path or another thread locks and unlocks a lock with the bh suffix. Worst case is that the CPU goes idle and the NOHZ complains about unhandled softirqs.
Disable bottom halves before acquiring the lock (and disabling interrupts) and enable them after dropping the lock. This ensures that any pending softirqs will handled right away.
--- drivers/usb/cdns3/cdnsp-ring.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/cdns3/cdnsp-ring.c +3 -0
@@ -1529,6 +1529,7 @@ irqreturn_t cdnsp_thread_irq_handler(intunsigned long flags;int counter =0 ; +local_bh_disable ();spin_lock_irqsave (&pdev->lock, flags);if (pdev->cdnsp_state & (CDNSP_STATE_HALTED |CDNSP_STATE_DYING )) {
@@ -1541,6 +1542,7 @@ irqreturn_t cdnsp_thread_irq_handler(intcdnsp_died (pdev);spin_unlock_irqrestore (&pdev->lock, flags); +local_bh_enable ();return IRQ_HANDLED ; }
@@ -1557,6 +1559,7 @@ irqreturn_t cdnsp_thread_irq_handler(intcdnsp_update_erst_dequeue (pdev, event_ring_deq,1 );spin_unlock_irqrestore (&pdev->lock, flags); +local_bh_enable ();return IRQ_HANDLED ; }
Greg Kroah-Hartman
maintainerPATCH 80/112 USB: serial: option: add Luat Air72*U series products
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Asuna Yang <[email protected]>
commit da90e45d5afc4da2de7cd3ea7943d0f1baa47cc2 upstream.
Update the USB serial option driver support for Luat Air72*U series products.
ID 1782:4e00 Spreadtrum Communications Inc. UNISOC-8910
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 13 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1782 ProdID=4e00 Rev=00.00
S: Manufacturer=UNISOC
S: Product=UNISOC-8910
C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=400mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=4096ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
If#= 2: AT
If#= 3: PPP + AT
If#= 4: Debug
--- drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/serial/option.c +3 -0
@@ -609,6 +609,8 @@ static void option_instat_callback(struc#define UNISOC_VENDOR_ID 0x1782/* TOZED LT70-C based on UNISOC SL8563 uses UNISOC's vendor ID */ #define TOZED_PRODUCT_LT70C 0x4055 +/* Luat Air72*U series based on UNISOC UIS8910 uses UNISOC's vendor ID */ +#define LUAT_PRODUCT_AIR720U 0x4e00/* Device flags */
@@ -2271,6 +2273,7 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) }, { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
Greg Kroah-Hartman
maintainerPATCH 81/112 platform/x86/amd/pmc: adjust getting DRAM size behavior
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Sundar S K <[email protected]>
commit c6ea14d557343cd3af6c6be2f5a78c98bdb281bb upstream.
amd_pmc_get_dram_size() is used to get the DRAM size information. But in the current code, mailbox command to get the DRAM size info is sent based on the values of dev->major and dev->minor.
But dev->major and dev->minor will have either junk or zero assigned to them until at least once a call to amd_pmc_get_smu_version() is made which ideally populates dev->major and dev->minor.
However, adding a amd_pmc_get_smu_version() call to amd_pmc_get_dram_size() has a downside of elevating the boot times.
After talking to the PMFW team, it's understood that the "get dram size" mbox command would only be supported on specific platforms (like Mendocino) and not all. So, adjust getting DRAM size behavior such that,
- if running on Rembrandt or Mendocino and the underlying PMFW knows how to execute the "get dram size" command it shall give the custom dram size.
- if the underlying FW does not report the dram size, we just proceed further and assign the default dram size.
The simplest way to address this is to remove amd_pmc_get_dram_size() function and directly call the "get dram size" command in the amd_pmc_s2d_init().
--- drivers/platform/x86/amd/pmc/pmc.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-)
drivers/platform/x86/amd/pmc/pmc.c +2 -29
@@ -912,33 +912,6 @@ static const struct pci_device_id pmc_pc { } }; -static int amd_pmc_get_dram_size (struct amd_pmc_dev *dev) -{ -int ret; - -switch (dev->cpu_id) { -case AMD_CPU_ID_YC : -if (!(dev->major >90 || (dev->major ==90 && dev->minor >39 ))) { - ret = -EINVAL ; - goto err_dram_size; - } -break ; -default : - ret = -EINVAL ; - goto err_dram_size; - } - - ret =amd_pmc_send_cmd (dev,S2D_DRAM_SIZE , &dev->dram_size, dev->s2d_msg_id, true); -if (ret || !dev->dram_size) - goto err_dram_size; - -return 0 ; - -err_dram_size: -dev_err (dev->dev,"DRAM size command not supported for this platform\n" ); -return ret; -} -static int amd_pmc_s2d_init (struct amd_pmc_dev *dev) {u32 phys_addr_low, phys_addr_hi;
@@ -957,8 +930,8 @@ static int amd_pmc_s2d_init(struct amd_preturn -EIO ;/* Get DRAM size */ - ret =amd_pmc_get_dram_size (dev); -if (ret) + ret =amd_pmc_send_cmd (dev,S2D_DRAM_SIZE , &dev->dram_size, dev->s2d_msg_id, true); +if (ret || !dev->dram_size) dev->dram_size =S2D_TELEMETRY_DRAMBYTES_MAX ;/* Get STB DRAM address */
Greg Kroah-Hartman
maintainerPATCH 82/112 platform/x86: ideapad-laptop: Set max_brightness before using it
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stuart Hayhurst <[email protected]>
commit 7a3c36eef9a5d13b16aa954da54224c9c6bed339 upstream.
max_brightness is used in ideapad_kbd_bl_brightness_get() before it's set, causing ideapad_kbd_bl_brightness_get() to return -EINVAL sometimes.
--- drivers/platform/x86/ideapad-laptop.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/platform/x86/ideapad-laptop.c +5 -6
@@ -1425,18 +1425,17 @@ static int ideapad_kbd_bl_init(struct ideapad_private *priv)if (WARN_ON (priv->kbd_bl.initialized))return -EEXIST ; - brightness =ideapad_kbd_bl_brightness_get (priv); -if (brightness <0 ) -return brightness; - - priv->kbd_bl.last_brightness = brightness; -if (ideapad_kbd_bl_check_tristate (priv->kbd_bl.type)) { priv->kbd_bl.led.max_brightness =2 ; }else { priv->kbd_bl.led.max_brightness =1 ; } + brightness =ideapad_kbd_bl_brightness_get (priv); +if (brightness <0 ) +return brightness; + + priv->kbd_bl.last_brightness = brightness; priv->kbd_bl.led.name ="platform::" LED_FUNCTION_KBD_BACKLIGHT ; priv->kbd_bl.led.brightness_get = ideapad_kbd_bl_led_cdev_brightness_get; priv->kbd_bl.led.brightness_set_blocking = ideapad_kbd_bl_led_cdev_brightness_set;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 83/112 hv_netvsc: fix race of netvsc and VF register_netdevice
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haiyang Zhang <[email protected]>
commit d30fb712e52964f2cf9a9c14cf67078394044837 upstream.
The rtnl lock also needs to be held before rndis_filter_device_add() which advertises nvsp_2_vsc_capability / sriov bit, and triggers VF NIC offering and registering. If VF NIC finished register_netdev() earlier it may cause name based config failure.
To fix this issue, move the call to rtnl_lock() before rndis_filter_device_add(), so VF will be registered later than netvsc / synthetic NIC, and gets a name numbered (ethX) after netvsc.
--- drivers/net/hyperv/netvsc_drv.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
drivers/net/hyperv/netvsc_drv.c +15 -10
@@ -2531,15 +2531,6 @@ static int netvsc_probe(struct hv_device goto devinfo_failed; } - nvdev =rndis_filter_device_add (dev, device_info); -if (IS_ERR (nvdev)) { - ret =PTR_ERR (nvdev); -netdev_err (net,"unable to add netvsc device (ret %d)\n" , ret); - goto rndis_failed; - } - -eth_hw_addr_set (net, device_info->mac_adr); -/* We must get rtnl lock before scheduling nvdev->subchan_work, * otherwise netvsc_subchan_work() can get rtnl lock first and wait * all subchannels to show up, but that may not happen because
@@ -2547,9 +2538,23 @@ static int netvsc_probe(struct hv_device* -> ... -> device_add() -> ... -> __device_attach() can't get * the device lock, so all the subchannels can't be processed -- * finally netvsc_subchan_work() hangs forever. +* +* The rtnl lock also needs to be held before rndis_filter_device_add() +* which advertises nvsp_2_vsc_capability / sriov bit, and triggers +* VF NIC offering and registering. If VF NIC finished register_netdev() +* earlier it may cause name based config failure. */ rtnl_lock (); + nvdev =rndis_filter_device_add (dev, device_info); +if (IS_ERR (nvdev)) { + ret =PTR_ERR (nvdev); +netdev_err (net,"unable to add netvsc device (ret %d)\n" , ret); + goto rndis_failed; + } + +eth_hw_addr_set (net, device_info->mac_adr); +if (nvdev->num_chn >1 )schedule_work (&nvdev->subchan_work);
@@ -2586,9 +2591,9 @@ static int netvsc_probe(struct hv_devicereturn 0 ; register_failed: -rtnl_unlock ();rndis_filter_device_remove (dev, nvdev); rndis_failed: +rtnl_unlock ();netvsc_devinfo_put (device_info); devinfo_failed:free_percpu (net_device_ctx->vf_stats);
Greg Kroah-Hartman
maintainerPATCH 84/112 hv_netvsc: Fix race of register_netdevice_notifier and VF register
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haiyang Zhang <[email protected]>
commit 85520856466ed6bc3b1ccb013cddac70ceb437db upstream.
If VF NIC is registered earlier, NETDEV_REGISTER event is replayed, but NETDEV_POST_INIT is not.
Move register_netdevice_notifier() earlier, so the call back function is set before probing.
--- drivers/net/hyperv/netvsc_drv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/hyperv/netvsc_drv.c +7 -2
@@ -2793,12 +2793,17 @@ static int __init netvsc_drv_init(void) } netvsc_ring_bytes = ring_size *PAGE_SIZE ; +register_netdevice_notifier (&netvsc_netdev_notifier); + ret =vmbus_driver_register (&netvsc_drv);if (ret) -return ret; + goto err_vmbus_reg; -register_netdevice_notifier (&netvsc_netdev_notifier);return 0 ; + +err_vmbus_reg: +unregister_netdevice_notifier (&netvsc_netdev_notifier); +return ret; }MODULE_LICENSE ("GPL" );
Greg Kroah-Hartman
maintainerPATCH 85/112 hv_netvsc: Mark VF as slave before exposing it to user-mode
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Long Li <[email protected]>
commit c807d6cd089d2f4951baa838081ec5ae3e2360f8 upstream.
When a VF is being exposed form the kernel, it should be marked as "slave" before exposing to the user-mode. The VF is not usable without netvsc running as master. The user-mode should never see a VF without the "slave" flag.
This commit moves the code of setting the slave flag to the time before VF is exposed to user-mode.
--- drivers/net/hyperv/netvsc_drv.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-)
drivers/net/hyperv/netvsc_drv.c +23 -9
@@ -2206,9 +2206,6 @@ static int netvsc_vf_join(struct net_dev goto upper_link_failed; } -/* set slave flag before open to prevent IPv6 addrconf */ - vf_netdev->flags |=IFF_SLAVE ; -schedule_delayed_work (&ndev_ctx->vf_takeover,VF_TAKEOVER_INT );call_netdevice_notifiers (NETDEV_JOIN , vf_netdev);
@@ -2315,16 +2312,18 @@ static struct net_device *get_netvsc_bys } -/* Fallback path to check synthetic vf with -* help of mac addr +/* Fallback path to check synthetic vf with help of mac addr. +* Because this function can be called before vf_netdev is +* initialized (NETDEV_POST_INIT) when its perm_addr has not been copied +* from dev_addr, also try to match to its dev_addr. +* Note: On Hyper-V and Azure, it's not possible to set a MAC address +* on a VF that matches to the MAC of a unrelated NETVSC device. */ list_for_each_entry (ndev_ctx, &netvsc_dev_list, list) { ndev =hv_get_drvdata (ndev_ctx->device_ctx); -if (ether_addr_equal (vf_netdev->perm_addr, ndev->perm_addr)) { -netdev_notice (vf_netdev, -"falling back to mac addr based matching\n" ); +if (ether_addr_equal (vf_netdev->perm_addr, ndev->perm_addr) || +ether_addr_equal (vf_netdev->dev_addr, ndev->perm_addr))return ndev; - } } netdev_notice(vf_netdev,
@@ -2332,6 +2331,19 @@ static struct net_device *get_netvsc_bysreturn NULL ; } +static int netvsc_prepare_bonding (struct net_device *vf_netdev) +{ +struct net_device *ndev; + + ndev =get_netvsc_byslot (vf_netdev); +if (!ndev) +return NOTIFY_DONE ; + +/* set slave flag before open to prevent IPv6 addrconf */ + vf_netdev->flags |=IFF_SLAVE ; +return NOTIFY_DONE ; +} +static int netvsc_register_vf (struct net_device *vf_netdev) {struct net_device_context *net_device_ctx;
@@ -2758,6 +2770,8 @@ static int netvsc_netdev_event(struct noreturn NOTIFY_DONE ;switch (event) { +case NETDEV_POST_INIT : +return netvsc_prepare_bonding (event_dev);case NETDEV_REGISTER :return netvsc_register_vf (event_dev);case NETDEV_UNREGISTER :
Greg Kroah-Hartman
maintainerPATCH 86/112 Revert "usb: phy: add usb phy notify port status API"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 1a229d8690a0f8951fc4aa8b76a7efab0d8de342 upstream.
This reverts commit a08799cf17c22375752abfad3b4a2b34b3acb287.
The recently added Realtek PHY drivers depend on the new port status notification mechanism which was built on the deprecated USB PHY implementation and devicetree binding.
Specifically, using these PHYs would require describing the very same PHY using both the generic "phy" property and the deprecated "usb-phy" property which is clearly wrong.
We should not be building new functionality on top of the legacy USB PHY implementation even if it is currently stuck in some kind of transitional limbo.
Revert the new notification interface which is broken by design.
--- drivers/usb/core/hub.c | 23 ----------------------- include/linux/usb/phy.h | 13 ------------- 2 files changed, 36 deletions(-)
drivers/usb/core/hub.c +0 -23
@@ -622,29 +622,6 @@ static int hub_ext_port_status(struct usb_hub *hub, int port1, int type, ret =0 ; }mutex_unlock (&hub->status_mutex); - -/* -* There is no need to lock status_mutex here, because status_mutex -* protects hub->status, and the phy driver only checks the port -* status without changing the status. -*/ -if (!ret) { -struct usb_device *hdev = hub->hdev; - -/* -* Only roothub will be notified of port state changes, -* since the USB PHY only cares about changes at the next -* level. -*/ -if (is_root_hub (hdev)) { -struct usb_hcd *hcd =bus_to_hcd (hdev->bus); - -if (hcd->usb_phy) -usb_phy_notify_port_status (hcd->usb_phy, - port1 -1 , *status, *change); - } - } -return ret; }
include/linux/usb/phy.h +0 -13
@@ -144,10 +144,6 @@ struct usb_phy {*/ int (*set_wakeup)(struct usb_phy *x,bool enabled); -/* notify phy port status change */ -int (*notify_port_status)(struct usb_phy *x,int port, -u16 portstatus,u16 portchange); -/* notify phy connect status change */ int (*notify_connect)(struct usb_phy *x,enum usb_device_speed speed);
@@ -320,15 +316,6 @@ usb_phy_set_wakeup(struct usb_phy *x, bool enabled)return 0 ; } -static inline int -usb_phy_notify_port_status (struct usb_phy *x,int port,u16 portstatus,u16 portchange) -{ -if (x && x->notify_port_status) -return x->notify_port_status (x, port, portstatus, portchange); -else -return 0 ; -} -static inline int usb_phy_notify_connect (struct usb_phy *x,enum usb_device_speed speed) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 77/112 platform/x86: hp-bioscfg: Fix error handling in hp_add_other_attributes()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Harshit Mogalapalli <[email protected]>
commit f40f939917b2b4cbf18450096c0ce1c58ed59fae upstream.
'attr_name_kobj' is allocated using kzalloc, but on all the error paths it is not freed, hence we have a memory leak.
Fix the error path before kobject_init_and_add() by adding kfree().
kobject_put() must be always called after passing the object to kobject_init_and_add(). Only the error path which is immediately next to kobject_init_and_add() calls kobject_put() and not any other error path after it.
Fix the error handling after kobject_init_and_add() by moving the kobject_put() into the goto label err_other_attr_init that is already used by all the error paths after kobject_init_and_add().
--- drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c +4 -2
@@ -613,14 +613,14 @@ static int hp_add_other_attributes(int attr_type)default :pr_err ("Error: Unknown attr_type: %d\n" , attr_type); ret = -EINVAL ; - goto err_other_attr_init; +kfree (attr_name_kobj); + goto unlock_drv_mutex; } ret =kobject_init_and_add (attr_name_kobj, &attr_name_ktype,NULL ,"%s" , attr_name);if (ret) {pr_err ("Error encountered [%d]\n" , ret); -kobject_put (attr_name_kobj); goto err_other_attr_init; }
@@ -645,6 +645,8 @@ static int hp_add_other_attributes(int attr_type)return 0 ; err_other_attr_init: +kobject_put (attr_name_kobj); +unlock_drv_mutex:mutex_unlock (&bioscfg_drv.mutex);kfree (obj);return ret;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 104/112 USB: serial: option: fix FM101R-GL defines
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Puliang Lu <[email protected]>
commit a1092619dd28ac0fcf23016160a2fdccd98ef935 upstream.
Modify the definition of the two Fibocom FM101R-GL PID macros, which had their PIDs switched.
The correct PIDs are:
- VID:PID 413C:8213, FM101R-GL ESIM are laptop M.2 cards (with MBIM interfaces for Linux)
- VID:PID 413C:8215, FM101R-GL are laptop M.2 cards (with MBIM interface for Linux)
0x8213: mbim, tty0x8215: mbim, tty
--- drivers/usb/serial/option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/serial/option.c +2 -2
@@ -203,8 +203,8 @@ static void option_instat_callback(struc#define DELL_PRODUCT_5829E_ESIM 0x81e4#define DELL_PRODUCT_5829E 0x81e6 -#define DELL_PRODUCT_FM101R 0x8213 -#define DELL_PRODUCT_FM101R_ESIM 0x8215 +#define DELL_PRODUCT_FM101R_ESIM 0x8213 +#define DELL_PRODUCT_FM101R 0x8215#define KYOCERA_VENDOR_ID 0x0c88#define KYOCERA_PRODUCT_KPC650 0x17da
Greg Kroah-Hartman
maintainerPATCH 105/112 USB: serial: option: dont claim interface 4 for ZTE MF290
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lech Perczak <[email protected]>
commit 8771127e25d6c20d458ad27cf32f7fcfc1755e05 upstream.
Interface 4 is used by for QMI interface in stock firmware of MF28D, the router which uses MF290 modem. Free the interface up, to rebind it to qmi_wwan driver.
The proper configuration is:
Interface mapping is:
0: QCDM, 1: (unknown), 2: AT (PCUI), 2: AT (Modem), 4: QMI
T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=19d2 ProdID=0189 Rev= 0.00 S: Manufacturer=ZTE, Incorporated S: Product=ZTE LTE Technologies MSM C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
--- drivers/usb/serial/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/serial/option.c +2 -1
@@ -1548,7 +1548,8 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff), .driver_info = RSVD(4) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff), + .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0191, 0xff, 0xff, 0xff), /* ZTE EuFi890 */ .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0196, 0xff, 0xff, 0xff) },
Greg Kroah-Hartman
maintainerPATCH 106/112 usb: typec: tcpm: Fix sink caps op current check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Badhri Jagan Sridharan <[email protected]>
commit 187fb003c57c964ea61ac9fbfe41abf3ca9973eb upstream.
TCPM checks for sink caps operational current even when PD is disabled. This incorrectly sets tcpm_set_charge() when PD is disabled. Check for sink caps only when PD is enabled.
[ 97.572342] Start toggling [ 97.578949] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] [ 99.571648] CC1: 0 -> 0, CC2: 0 -> 4 [state TOGGLING, polarity 0, connected] [ 99.571658] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS] [ 99.571673] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS] [ 99.741778] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms] [ 99.789283] CC1: 0 -> 0, CC2: 4 -> 5 [state SNK_DEBOUNCED, polarity 0, connected] [ 99.789306] state change SNK_DEBOUNCED -> SNK_DEBOUNCED [rev3 NONE_AMS] [ 99.903584] VBUS on [ 99.903591] state change SNK_DEBOUNCED -> SNK_ATTACHED [rev3 NONE_AMS] [ 99.903600] polarity 1 [ 99.910155] enable vbus discharge ret:0 [ 99.910160] Requesting mux state 1, usb-role 2, orientation 2 [ 99.946791] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS] [ 99.946798] state change SNK_STARTUP -> SNK_DISCOVERY [rev3 NONE_AMS] [ 99.946800] Setting voltage/current limit 5000 mV 500 mA [ 99.946803] vbus=0 charge:=1 [ 100.027139] state change SNK_DISCOVERY -> SNK_READY [rev3 NONE_AMS] [ 100.027145] Setting voltage/current limit 5000 mV 3000 mA [ 100.466830] VBUS on
--- drivers/usb/typec/tcpm/tcpm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/typec/tcpm/tcpm.c +2 -1
@@ -4273,7 +4273,8 @@ static void run_state_machine(struct tcpm_port *port) current_lim =PD_P_SNK_STDBY_MW /5 ;tcpm_set_current_limit (port, current_lim,5000 );/* Not sink vbus if operational current is 0mA */ -tcpm_set_charge (port, !!pdo_max_current (port->snk_pdo[0 ])); +tcpm_set_charge (port, !port->pd_supported || +pdo_max_current (port->snk_pdo[0 ]));if (!port->pd_supported)tcpm_set_state (port,SNK_READY ,0 );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 107/112 usb: typec: tcpm: Skip hard reset when in error recovery
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Badhri Jagan Sridharan <[email protected]>
commit a6fe37f428c19dd164c2111157d4a1029bd853aa upstream.
Hard reset queued prior to error recovery (or) received during error recovery will make TCPM to prematurely exit error recovery sequence. Ignore hard resets received during error recovery (or) port reset sequence.
``` [46505.459688] state change SNK_READY -> ERROR_RECOVERY [rev3 NONE_AMS] [46505.459706] state change ERROR_RECOVERY -> PORT_RESET [rev3 NONE_AMS] [46505.460433] disable vbus discharge ret:0 [46505.461226] Setting usb_comm capable false [46505.467244] Setting voltage/current limit 0 mV 0 mA [46505.467262] polarity 0 [46505.470695] Requesting mux state 0, usb-role 0, orientation 0 [46505.475621] cc:=0 [46505.476012] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms [rev3 NONE_AMS] [46505.476020] Received hard reset [46505.476024] state change PORT_RESET -> HARD_RESET_START [rev3 HARD_RESET] ```
--- drivers/usb/typec/tcpm/tcpm.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/usb/typec/tcpm/tcpm.c +9 -0
@@ -5392,6 +5392,15 @@ static void _tcpm_pd_hard_reset(struct tif (port->bist_request ==BDO_MODE_TESTDATA && port->tcpc->set_bist_data) port->tcpc->set_bist_data (port->tcpc, false); +switch (port->state) { +case ERROR_RECOVERY : +case PORT_RESET : +case PORT_RESET_WAIT_OFF : +return ; +default : +break ; + } +if (port->ams !=NONE_AMS ) port->ams =NONE_AMS ;if (port->hard_reset_count <PD_N_HARD_RESET_COUNT )
Greg Kroah-Hartman
maintainerPATCH 108/112 USB: dwc2: write HCINT with INTMASK applied
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit 0583bc776ca5b5a3f5752869fc31cf7322df2b35 upstream.
dwc2_hc_n_intr() writes back INTMASK as read but evaluates it with intmask applied. In stress testing this causes spurious interrupts like this:
[Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 7 - ChHltd set, but reason is unknown [Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001 [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 0 - ChHltd set, but reason is unknown [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001 [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001 [Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_update_urb_state_abn(): trimming xfer length
Applying INTMASK prevents this. The issue exists in all versions of the driver.
--- drivers/usb/dwc2/hcd_intr.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
drivers/usb/dwc2/hcd_intr.c +7 -8
@@ -2015,15 +2015,17 @@ static void dwc2_hc_n_intr(struct dwc2_h {struct dwc2_qtd *qtd;struct dwc2_host_chan *chan; -u32 hcint, hcintmsk; +u32 hcint, hcintraw, hcintmsk; chan = hsotg->hc_ptr_array[chnum]; - hcint =dwc2_readl (hsotg,HCINT (chnum)); + hcintraw =dwc2_readl (hsotg,HCINT (chnum)); hcintmsk =dwc2_readl (hsotg,HCINTMSK (chnum)); + hcint = hcintraw & hcintmsk; +dwc2_writel (hsotg, hcint,HCINT (chnum)); +if (!chan) {dev_err (hsotg->dev,"## hc_ptr_array for channel is NULL ##\n" ); -dwc2_writel (hsotg, hcint,HCINT (chnum));return ; }
@@ -2032,11 +2034,9 @@ static void dwc2_hc_n_intr(struct dwc2_h chnum);dev_vdbg (hsotg->dev," hcint 0x%08x, hcintmsk 0x%08x, hcint&hcintmsk 0x%08x\n" , - hcint, hcintmsk, hcint & hcintmsk); + hcintraw, hcintmsk, hcint); } -dwc2_writel (hsotg, hcint,HCINT (chnum)); -/* * If we got an interrupt after someone called * dwc2_hcd_endpoint_disable() we don't want to crash below
@@ -2046,8 +2046,7 @@ static void dwc2_hc_n_intr(struct dwc2_hreturn ; } - chan->hcint = hcint; - hcint &= hcintmsk; + chan->hcint = hcintraw;/* * If the channel was halted due to a dequeue, the qtd list might
Greg Kroah-Hartman
maintainerPATCH 109/112 usb: dwc3: Fix default mode initialization
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Stein <[email protected]>
commit 10d510abd096d620b9fda2dd3e0047c5efc4ad2b upstream.
The default mode, configurable by DT, shall be set before usb role switch driver is registered. Otherwise there is a race between default mode and mode set by usb role switch driver.
--- drivers/usb/dwc3/drd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/drd.c +1 -1
@@ -505,6 +505,7 @@ static int dwc3_setup_role_switch(struct dwc->role_switch_default_mode =USB_DR_MODE_PERIPHERAL ; mode =DWC3_GCTL_PRTCAP_DEVICE ; } +dwc3_set_mode (dwc, mode); dwc3_role_switch.fwnode =dev_fwnode (dwc->dev); dwc3_role_switch.set = dwc3_usb_role_switch_set;
@@ -526,7 +527,6 @@ static int dwc3_setup_role_switch(struct } } -dwc3_set_mode (dwc, mode);return 0 ; }#else
Greg Kroah-Hartman
maintainerPATCH 110/112 usb: dwc3: set the dma max_seg_size
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <[email protected]>
commit 8bbae288a85abed6a1cf7d185d8b9dc2f5dcb12c upstream.
Allow devices to have dma operations beyond 4K, and avoid warnings such as:
DMA-API: dwc3 a600000.usb: mapping sg segment longer than device claims to support [len=86016] [max=65536]
--- drivers/usb/dwc3/core.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/dwc3/core.c +2 -0
@@ -2006,6 +2006,8 @@ static int dwc3_probe(struct platform_depm_runtime_put (dev); +dma_set_max_seg_size (dev,UINT_MAX ); +return 0 ; err_exit_debugfs:
Greg Kroah-Hartman
maintainerPATCH 111/112 USB: dwc3: qcom: fix software node leak on probe errors
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 9feefbf57d92e8ee293dad67585d351c7d0b6e37 upstream.
Make sure to remove the software node also on (ACPI) probe errors to avoid leaking the underlying resources.
Note that the software node is only used for ACPI probe so the driver unbind tear down is updated to match probe.
--- drivers/usb/dwc3/dwc3-qcom.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/usb/dwc3/dwc3-qcom.c +8 -5
@@ -949,10 +949,12 @@ static int dwc3_qcom_probe(struct platfo interconnect_exit:dwc3_qcom_interconnect_exit (qcom); depopulate: -if (np) +if (np) {of_platform_depopulate (&pdev->dev); -else + }else { +device_remove_software_node (&qcom->dwc3->dev);platform_device_del (qcom->dwc3); + }platform_device_put (qcom->dwc3); free_urs:if (qcom->urs_usb)
@@ -975,11 +977,12 @@ static void dwc3_qcom_remove(struct platstruct device *dev = &pdev->dev;int i; -device_remove_software_node (&qcom->dwc3->dev); -if (np) +if (np) {of_platform_depopulate (&pdev->dev); -else + }else { +device_remove_software_node (&qcom->dwc3->dev);platform_device_del (qcom->dwc3); + }platform_device_put (qcom->dwc3);if (qcom->urs_usb)
Greg Kroah-Hartman
maintainerPATCH 112/112 USB: dwc3: qcom: fix wakeup after probe deferral
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 41f5a0973259db9e4e3c9963d36505f80107d1a0 upstream.
The Qualcomm glue driver is overriding the interrupt trigger types defined by firmware when requesting the wakeup interrupts during probe.
This can lead to a failure to map the DP/DM wakeup interrupts after a probe deferral as the firmware defined trigger types do not match the type used for the initial mapping:
irq: type mismatch, failed to map hwirq-14 for interrupt-controller@b220000!
irq: type mismatch, failed to map hwirq-15 for interrupt-controller@b220000!
Fix this by not overriding the firmware provided trigger types when requesting the wakeup interrupts.
--- drivers/usb/dwc3/dwc3-qcom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/dwc3/dwc3-qcom.c +4 -4
@@ -549,7 +549,7 @@ static int dwc3_qcom_setup_irq(struct plirq_set_status_flags (irq,IRQ_NOAUTOEN ); ret =devm_request_threaded_irq (qcom->dev, irq,NULL , qcom_dwc3_resume_irq, -IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +IRQF_ONESHOT ,"qcom_dwc3 HS" , qcom);if (ret) {dev_err (qcom->dev,"hs_phy_irq failed: %d\n" , ret);
@@ -564,7 +564,7 @@ static int dwc3_qcom_setup_irq(struct plirq_set_status_flags (irq,IRQ_NOAUTOEN ); ret =devm_request_threaded_irq (qcom->dev, irq,NULL , qcom_dwc3_resume_irq, -IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +IRQF_ONESHOT ,"qcom_dwc3 DP_HS" , qcom);if (ret) {dev_err (qcom->dev,"dp_hs_phy_irq failed: %d\n" , ret);
@@ -579,7 +579,7 @@ static int dwc3_qcom_setup_irq(struct plirq_set_status_flags (irq,IRQ_NOAUTOEN ); ret =devm_request_threaded_irq (qcom->dev, irq,NULL , qcom_dwc3_resume_irq, -IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +IRQF_ONESHOT ,"qcom_dwc3 DM_HS" , qcom);if (ret) {dev_err (qcom->dev,"dm_hs_phy_irq failed: %d\n" , ret);
@@ -594,7 +594,7 @@ static int dwc3_qcom_setup_irq(struct plirq_set_status_flags (irq,IRQ_NOAUTOEN ); ret =devm_request_threaded_irq (qcom->dev, irq,NULL , qcom_dwc3_resume_irq, -IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +IRQF_ONESHOT ,"qcom_dwc3 SS" , qcom);if (ret) {dev_err (qcom->dev,"ss_phy_irq failed: %d\n" , ret);
Greg Kroah-Hartman
maintainerPATCH 103/112 USB: serial: option: add Fibocom L7xx modules
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Victor Fragoso <[email protected]>
commit e389fe8b68137344562fb6e4d53d8a89ef6212dd upstream.
Add support for Fibocom L716-EU module series.
L716-EU is a Fibocom module based on ZTE's V3E/V3T chipset.
Device creates multiple interfaces when connected to PC as follows:
- Network Interface: ECM or RNDIS (set by FW or AT Command)
- ttyUSB0: AT port
- ttyUSB1: Modem port
- ttyUSB2: AT2 port
- ttyUSB3: Trace port for log information
- ADB: ADB port for debugging. ("Driver=usbfs" when ADB server enabled)
Here are the outputs of lsusb and usb-devices:
$ ls /dev/ttyUSB* /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
usb-devices:
L716-EU (ECM mode):
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 51 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2cb7 ProdID=0001 Rev= 1.00 S: Manufacturer=Fibocom,Incorporated S: Product=Fibocom Mobile Boardband S: SerialNumber=1234567890ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
L716-EU (RNDIS mode):
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 49 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2cb7 ProdID=0001 Rev= 1.00 S: Manufacturer=Fibocom,Incorporated S: Product=Fibocom Mobile Boardband S: SerialNumber=1234567890ABCDEF
C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=rndis_host
E: Ad=87(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/option.c +1 -0
@@ -2251,6 +2251,7 @@ static const struct usb_device_id option .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */ { USB_DEVICE_INTERFACE_CLASS(0x1782, 0x4d11, 0xff) }, /* Fibocom L610 (ECM/RNDIS mode) */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0001, 0xff, 0xff, 0xff) }, /* Fibocom L716-EU (ECM/RNDIS mode) */ { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */ .driver_info = RSVD(4) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Hi Greg
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
6.6.4-rc1 tested.
Build successfully completed.
Boot successfully completed.
No dmesg regressions.
Video output normal.
Sound output normal.
Lenovo ThinkPad X1 Carbon Gen10(Intel i7-1260P(x86_64) arch linux)
Thanks
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Hi Greg,
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
Built and boot tested on x86_64 and aarch64
Thanks,
Harshit
Quoted 10 lines
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Successfully compiled and installed the kernel on my computer (Acer Aspire E15, Intel Core i3 Haswell). No noticeable regressions.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.6:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
116 tests: 116 pass, 0 failLinux version: 6.6.4-rc1-gd7aca62a9eef
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Hi there,
6.6.4-rc1
...cross-built (on amd64 w/gcc-13.2.0) and booted successfully on ia64 (rx2620).
Cheers,
Frank
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro's test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 6.6.4-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.6.y
* git commit: 6ed60a9257c16a5f571b2354c4c0178caa70fc71
* git describe: v6.6.3-113-g6ed60a9257c1
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.3-113-g6ed60a9257c1
## Test Regressions (compared to v6.6.3)
## Metric Regressions (compared to v6.6.3)
## Test Fixes (compared to v6.6.3)
## Metric Fixes (compared to v6.6.3)
## Test result summary
total: 154229, pass: 132702, fail: 2283, skip: 19120, xfail: 124
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 145 total, 145 passed, 0 failed
* arm64: 52 total, 50 passed, 2 failed
* i386: 41 total, 40 passed, 1 failed
* mips: 26 total, 26 passed, 0 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 36 total, 36 passed, 0 failed
* riscv: 25 total, 25 passed, 0 failed
* s390: 13 total, 13 passed, 0 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 8 total, 8 passed, 0 failed
* x86_64: 46 total, 46 passed, 0 failed
## Test suites summary
* boot
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-user_events
* kselftest-vDSO
* kselftest-vm
* kselftest-watchdog
* kselftest-x86
* kselftest-zram
* kunit
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* perf
* rcutorture
* v4l2-compliance
--
Linaro LKFT
https://lkft.linaro.org
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
Hi Greg,
6.6.4-rc1 tested.
Run tested on:
- Intel Alder Lake x86_64 (nuc12 i7-1260P)
In addition - build tested for:
- Allwinner A64
- Allwinner H3
- Allwinner H5
- Allwinner H6
- NXP iMX6
- NXP iMX8
- Qualcomm Dragonboard
- Rockchip RK3288
- Rockchip RK3328
- Rockchip RK3399pro
- Samsung Exynos
--
Rudi
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
Cheers,
Conor.
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Tested rc1 against the Fedora build system (aarch64, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
Build results:
total: 157 pass: 157 fail: 0 Qemu test results: total: 530 pass: 530 fail: 0
Guenter
Hello,
Quoted 5 lines · On 2023-11-30T16:20:47+00:00 Greg Kroah-Hartman <[email protected]>…
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.
This rc kernel passes DAMON functionality test[1] on my test machine. Attaching the test results summary below. Please note that I retrieved the kernel from linux-stable-rc tree[2].
[1] https://github.com/awslabs/damon-tests/tree/next/corr
[2] 6ed60a9257c1 ("Linux 6.6.4-rc1")
Thanks,
SJ
[...]
---
ok 1 selftests: damon: debugfs_attrs.sh
ok 2 selftests: damon: debugfs_schemes.sh
ok 3 selftests: damon: debugfs_target_ids.sh
ok 4 selftests: damon: debugfs_empty_targets.sh
ok 5 selftests: damon: debugfs_huge_count_read_write.sh
ok 6 selftests: damon: debugfs_duplicate_context_creation.sh
ok 7 selftests: damon: debugfs_rm_non_contexts.sh
ok 8 selftests: damon: sysfs.sh
ok 9 selftests: damon: sysfs_update_removed_scheme_dir.sh
ok 10 selftests: damon: reclaim.sh
ok 11 selftests: damon: lru_sort.sh
ok 1 selftests: damon-tests: kunit.sh
ok 2 selftests: damon-tests: huge_count_read_write.sh
ok 3 selftests: damon-tests: buffer_overflow.sh
ok 4 selftests: damon-tests: rm_contexts.sh
ok 5 selftests: damon-tests: record_null_deref.sh
ok 6 selftests: damon-tests: dbgfs_target_ids_read_before_terminate_race.sh ok 7 selftests: damon-tests: dbgfs_target_ids_pid_leak.sh
ok 8 selftests: damon-tests: damo_tests.sh
ok 9 selftests: damon-tests: masim-record.sh
ok 10 selftests: damon-tests: build_i386.sh
ok 11 selftests: damon-tests: build_arm64.sh
ok 12 selftests: damon-tests: build_i386_idle_flag.sh
ok 13 selftests: damon-tests: build_i386_highpte.sh
ok 14 selftests: damon-tests: build_nomemcg.sh
[33m
[92mPASS [39m
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.4 release. There are 112 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 02 Dec 2023 16:21:18 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
No regressions on my system
[ 0.000000] Linux version 6.6.4-rc1+ (rbmarliere@debian) (Debian clang version 16.0.6 (19), GNU ld (GNU Binutils for Debian) 2.41) #4 SMP PREEMPT_DYNAMIC Sat Dec 2 13:03:02 -03 2023
Thanks!