Linux 6.18.30
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.18.30 kernel.
All users of the 6.18 kernel series must upgrade.
The updated 6.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.18.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/obsolete/sysfs-selinux-user | 12 Documentation/ABI/removed/sysfs-selinux-user | 12 Makefile | 4 arch/arm64/include/asm/kvm_host.h | 2 arch/arm64/kernel/ptrace.c | 4 arch/arm64/kernel/signal.c | 54 ++- arch/arm64/kvm/arm.c | 4 arch/arm64/kvm/config.c | 17 arch/arm64/kvm/hyp/nvhe/pkvm.c | 38 +- arch/arm64/kvm/hyp/nvhe/setup.c | 6 arch/arm64/kvm/vgic/vgic-mmio-v2.c | 2 arch/arm64/kvm/vgic/vgic-mmio-v3.c | 2 arch/loongarch/include/asm/linkage.h | 2 arch/loongarch/kvm/exit.c | 1 arch/loongarch/kvm/interrupt.c | 14 arch/loongarch/kvm/mmu.c | 2 arch/loongarch/kvm/switch.S | 2 arch/loongarch/kvm/timer.c | 10 arch/loongarch/kvm/vm.c | 2 arch/loongarch/pci/acpi.c | 5 arch/loongarch/pci/pci.c | 3 arch/powerpc/kexec/Makefile | 2 arch/powerpc/platforms/pseries/papr-hvpipe.c | 53 +- arch/powerpc/sysdev/xive/common.c | 16 arch/riscv/kvm/vcpu_vector.c | 5 arch/s390/kernel/debug.c | 8 arch/x86/events/core.c | 13 arch/x86/events/intel/core.c | 32 + arch/x86/include/asm/efi.h | 3 arch/x86/include/asm/msr-index.h | 3 arch/x86/kernel/cpu/amd.c | 3 arch/x86/kvm/hyperv.c | 2 arch/x86/kvm/lapic.c | 8 arch/x86/kvm/mmu/mmu.c | 35 - arch/x86/kvm/svm/nested.c | 12 arch/x86/kvm/svm/svm.c | 4 arch/x86/kvm/svm/svm.h | 1 arch/x86/mm/fault.c | 2 arch/x86/platform/efi/quirks.c | 13 block/blk.h | 2 block/ioctl.c | 24 - drivers/acpi/cppc_acpi.c | 6 drivers/acpi/power.c | 2 drivers/acpi/scan.c | 2 drivers/acpi/video_detect.c | 16 drivers/android/binder/range_alloc/array.rs | 1 drivers/bluetooth/btmtk.c | 15 drivers/bluetooth/virtio_bt.c | 39 +- drivers/char/ipmi/ipmi_si_intf.c | 70 +++ drivers/char/ipmi/ipmi_ssif.c | 23 + drivers/clk/clk-rk808.c | 2 drivers/clk/imx/clk-imx8-acm.c | 3 drivers/clk/microchip/clk-mpfs-ccc.c | 6 drivers/cpuidle/cpuidle-powernv.c | 5 drivers/cpuidle/cpuidle-pseries.c | 5 drivers/crypto/caam/caamalg_qi2.c | 4 drivers/crypto/caam/caamhash.c | 4 drivers/crypto/intel/qat/qat_common/adf_accel_engine.c | 7 drivers/crypto/intel/qat/qat_common/icp_qat_fw_loader_handle.h | 1 drivers/crypto/intel/qat/qat_common/qat_hal.c | 27 - drivers/extcon/extcon-ptn5150.c | 14 drivers/firmware/samsung/exynos-acpm-pmic.c | 10 drivers/firmware/samsung/exynos-acpm-pmic.h | 10 drivers/firmware/samsung/exynos-acpm.c | 16 drivers/firmware/samsung/exynos-acpm.h | 2 drivers/gpio/gpiolib-of.c | 9 drivers/hv/Kconfig | 2 drivers/hwmon/corsair-psu.c | 4 drivers/hwmon/ltc2992.c | 43 +- drivers/hwmon/powerz.c | 5 drivers/infiniband/hw/hns/hns_roce_qp.c | 7 drivers/infiniband/hw/ionic/ionic_ibdev.c | 2 drivers/infiniband/hw/mana/cq.c | 5 drivers/infiniband/hw/mana/qp.c | 16 drivers/infiniband/hw/mlx4/srq.c | 4 drivers/infiniband/hw/mlx5/main.c | 1 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 drivers/infiniband/sw/rxe/rxe_recv.c | 11 drivers/infiniband/sw/rxe/rxe_resp.c | 14 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 7 drivers/iommu/intel/nested.c | 6 drivers/iommu/iommufd/eventq.c | 5 drivers/iommu/iommufd/io_pagetable.c | 10 drivers/md/dm-ioctl.c | 6 drivers/md/dm-verity-fec.c | 8 drivers/md/persistent-data/dm-btree-remove.c | 8 drivers/md/raid10.c | 2 drivers/mfd/sec-acpm.c | 10 drivers/mmc/core/card.h | 11 drivers/mmc/core/mmc.c | 12 drivers/mmc/core/queue.c | 9 drivers/mmc/core/quirks.h | 12 drivers/mtd/spi-nor/debugfs.c | 4 drivers/net/ethernet/ibm/ibmveth.c | 22 + drivers/net/ethernet/ibm/ibmveth.h | 1 drivers/net/ethernet/intel/ice/ice_sf_eth.c | 2 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_rx.c | 36 +- drivers/net/ethernet/mellanox/mlx4/srq.c | 13 drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 2 drivers/net/ethernet/stmicro/stmmac/common.h | 2 drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 2 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 47 +- drivers/net/ethernet/wangxun/libwx/wx_hw.c | 7 drivers/net/ethernet/wangxun/libwx/wx_vf_common.c | 4 drivers/net/wireless/ath/ath5k/base.c | 3 drivers/net/wireless/broadcom/b43/xmit.c | 3 drivers/net/wireless/broadcom/b43legacy/xmit.c | 3 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 drivers/net/wireless/mediatek/mt76/mt7921/main.c | 7 drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 6 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 4 drivers/net/wireless/rsi/rsi_common.h | 5 drivers/net/wwan/t7xx/t7xx_modem_ops.c | 20 - drivers/net/wwan/t7xx/t7xx_port_ctrl_msg.c | 18 - drivers/net/wwan/t7xx/t7xx_port_proxy.h | 2 drivers/nvme/host/apple.c | 6 drivers/nvme/target/core.c | 2 drivers/nvme/target/tcp.c | 26 + drivers/parisc/lasi.c | 12 drivers/pci/pci.c | 7 drivers/pci/pcie/aer.c | 2 drivers/pci/pcie/aspm.c | 17 drivers/pci/setup-res.c | 2 drivers/platform/chrome/cros_typec_altmode.c | 1 drivers/pmdomain/core.c | 10 drivers/pmdomain/mediatek/mtk-pm-domains.c | 10 drivers/power/supply/max17042_battery.c | 2 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 14 drivers/spi/spi-microchip-core-qspi.c | 103 ++++- drivers/spi/spi-rockchip.c | 4 drivers/spi/spi-s3c64xx.c | 5 drivers/spi/spi-sun4i.c | 10 drivers/spi/spi-sun6i.c | 8 drivers/spi/spi-synquacer.c | 8 drivers/spi/spi-ti-qspi.c | 14 drivers/spi/spi-topcliff-pch.c | 11 drivers/spi/spi-zynqmp-gqspi.c | 4 drivers/staging/vme_user/vme_fake.c | 2 drivers/target/target_core_configfs.c | 2 drivers/thermal/sprd_thermal.c | 4 drivers/thermal/thermal_core.c | 6 drivers/usb/class/usblp.c | 3 drivers/usb/common/ulpi.c | 5 drivers/usb/gadget/udc/omap_udc.c | 4 drivers/usb/serial/option.c | 4 drivers/usb/typec/tcpm/tcpm.c | 25 - drivers/video/fbdev/core/fb_defio.c | 178 +++++++--- drivers/video/fbdev/udlfb.c | 31 + fs/btrfs/inode.c | 2 fs/btrfs/space-info.c | 2 fs/ceph/addr.c | 4 fs/erofs/decompressor.c | 86 ++-- fs/f2fs/data.c | 28 + fs/f2fs/extent_cache.c | 17 fs/f2fs/f2fs.h | 2 fs/f2fs/inline.c | 22 + fs/f2fs/inode.c | 2 fs/f2fs/node.c | 93 ++--- fs/f2fs/sysfs.c | 10 fs/hfsplus/bfind.c | 51 ++ fs/hfsplus/catalog.c | 4 fs/hfsplus/dir.c | 2 fs/hfsplus/hfsplus_fs.h | 9 fs/hfsplus/super.c | 6 fs/isofs/export.c | 2 fs/isofs/rock.c | 9 fs/notify/fsnotify.c | 2 fs/notify/mark.c | 18 - fs/smb/client/cached_dir.c | 8 fs/smb/client/cifsacl.c | 37 +- fs/smb/client/smb2inode.c | 12 fs/smb/client/smb2misc.c | 3 fs/smb/client/smb2ops.c | 11 fs/smb/client/smbdirect.c | 21 - fs/smb/server/connection.c | 46 ++ fs/smb/server/connection.h | 1 fs/smb/server/smbacl.c | 66 ++- fs/tracefs/event_inode.c | 14 fs/tracefs/inode.c | 6 fs/tracefs/internal.h | 3 fs/udf/misc.c | 8 include/linux/dma-mapping.h | 13 include/linux/fb.h | 4 include/linux/firmware/samsung/exynos-acpm-protocol.h | 29 - include/linux/fsnotify_backend.h | 1 include/linux/mmc/card.h | 2 include/linux/printk.h | 13 include/uapi/linux/io_uring.h | 3 include/video/udlfb.h | 1 io_uring/io_uring.c | 12 io_uring/kbuf.c | 12 io_uring/kbuf.h | 7 kernel/bpf/arena.c | 19 - kernel/exit.c | 1 kernel/sched/ext_idle.c | 12 kernel/trace/trace_probe.c | 6 kernel/trace/trace_probe.h | 4 kernel/tracepoint.c | 2 lib/crypto/mpi/mpicoder.c | 2 lib/scatterlist.c | 8 mm/damon/core.c | 5 mm/damon/stat.c | 30 + mm/damon/sysfs-schemes.c | 12 mm/hugetlb_cma.c | 1 mm/swapfile.c | 21 - net/bluetooth/hci_event.c | 27 + net/bluetooth/l2cap_sock.c | 9 net/ceph/auth.c | 2 net/ceph/mon_client.c | 2 net/core/flow_dissector.c | 13 net/core/netpoll.c | 23 - net/core/rtnetlink.c | 1 net/ipv4/ah4.c | 14 net/ipv6/ah6.c | 14 net/ipv6/ip6_gre.c | 5 net/ipv6/xfrm6_protocol.c | 4 net/key/af_key.c | 52 +- net/mac80211/mlme.c | 9 net/mac80211/rx.c | 2 net/mac80211/util.c | 4 net/mptcp/fastopen.c | 4 net/mptcp/pm.c | 62 ++- net/mptcp/pm_kernel.c | 13 net/mptcp/protocol.c | 6 net/mptcp/sockopt.c | 16 net/mptcp/subflow.c | 4 net/openvswitch/vport-netdev.c | 6 net/psp/psp_main.c | 42 +- net/rds/message.c | 20 - net/sched/sch_red.c | 2 net/unix/af_unix.c | 3 net/vmw_vsock/hyperv_transport.c | 33 + net/xfrm/xfrm_state.c | 12 net/xfrm/xfrm_user.c | 1 rust/kernel/drm/gem/mod.rs | 13 rust/pin-init/src/__internal.rs | 28 + rust/pin-init/src/macros.rs | 91 +++-- security/selinux/hooks.c | 38 -- security/selinux/include/objsec.h | 4 security/selinux/include/security.h | 2 security/selinux/selinuxfs.c | 169 +-------- security/selinux/ss/services.c | 125 ------- sound/core/misc.c | 8 sound/core/oss/pcm_oss.c | 29 + sound/core/seq/seq_clientmgr.c | 2 sound/core/seq/seq_clientmgr.h | 5 sound/core/seq/seq_ump_client.c | 2 sound/firewire/tascam/tascam-hwdep.c | 1 sound/hda/codecs/realtek/alc269.c | 19 + sound/hda/codecs/side-codecs/cs35l56_hda.c | 19 - sound/soc/amd/yc/acp6x-mach.c | 14 sound/soc/codecs/es8389.c | 2 sound/soc/fsl/fsl_easrc.c | 2 sound/soc/intel/boards/bytcr_wm5102.c | 1 sound/soc/qcom/qdsp6/q6apm-dai.c | 1 sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 2 sound/soc/qcom/qdsp6/q6apm.c | 3 sound/soc/sof/compress.c | 3 sound/usb/midi2.c | 9 sound/usb/misc/ua101.c | 7 sound/usb/stream.c | 4 tools/arch/x86/include/asm/msr-index.h | 3 tools/testing/selftests/net/mptcp/mptcp_lib.sh | 16 tools/testing/selftests/net/mptcp/pm_netlink.sh | 20 - 266 files changed, 2457 insertions(+), 1145 deletions(-)
Aaro Koskinen (1):
USB: omap_udc: DMA: Don't enable burst 4 mode
Alexei Starovoitov (1):
bpf: Fix use-after-free in arena_vm_close on fork
André Draszik (1):
power: supply: max17042: avoid overflow when determining health
Ard Biesheuvel (1):
x86/efi: Restore IRQ state in EFI page fault handler
Avri Altman (2):
mmc: core: Adjust MDT beyond 2025
mmc: core: Add quirk for incorrect manufacturing date
Bartosz Golaszewski (1):
gpio: of: clear OF_POPULATED on hog nodes in remove path
Benjamin Berg (1):
wifi: mac80211: use safe list iteration in radar detect work
Bibo Mao (2):
LoongArch: KVM: Fix HW timer interrupt lost when inject interrupt by software
LoongArch: KVM: Move unconditional delay into timer clear scenery
Bjoern Doebel (1):
smb: client: use kzalloc to zero-initialize security descriptor buffer
Breno Leitao (2):
netpoll: pass buffer size to egress_dev() to avoid MAC truncation arm64/fpsimd: ptrace: zero target's fpsimd_state, not the tracer's
Catherine (1):
wifi: mac80211: drop stray 'static' from fast-RX rx_result
Cen Zhang (1):
f2fs: add READ_ONCE() for i_blocks in f2fs_update_inode()
Chaitanya Kulkarni (2):
nvmet-tcp: fix race between ICReq handling and queue teardown
nvmet: avoid recursive nvmet-wq flush in nvmet_ctrl_free
Christian A. Ehrhardt (2):
lib/scatterlist: fix length calculations in extract_kvec_to_sg lib/scatterlist: fix temp buffer in extract_user_to_sg()
Conor Dooley (3):
spi: microchip-core-qspi: don't attempt to transmit during emulated read-only dual/quad operations
spi: microchip-core-qspi: control built-in cs manually
clk: microchip: mpfs-ccc: fix out of bounds access during output registration
Corey Minyard (3):
ipmi: Add limits to event and receive message requests
ipmi: Check event message buffer response for bad data ipmi:si: Return state to normal if message allocation fails
Cássio Gabriel (7):
ALSA: usb-audio: midi2: Restart output URBs on resume
ALSA: usb-audio: Fix UAC3 cluster descriptor size check
ALSA: hda: cs35l56: Propagate ASP TX source control errors
ALSA: firewire-tascam: Do not drop unread control events
ALSA: core: Serialize deferred fasync state checks
ALSA: seq: Fix UMP group 16 filtering
ASoC: Intel: bytcr_wm5102: Fix MCLK leak on platform_clock_control error
DaeMyung Kang (1):
ksmbd: rewrite stop_sessions() with restartable iteration
Dapeng Mi (2):
perf/x86/intel: Improve validation and configuration of ACR masks perf/x86/intel: Always reprogram ACR events to prevent stale masks
David Carlier (6):
tracepoint: balance regfunc() on func_add() failure in tracepoint_add_func()
tracefs: Fix default permissions not being applied on initial mount
eventfs: Hold eventfs_mutex and SRCU when remount walks events
psp: strip variable-length PSP header in psp_dev_rcv()
sched_ext: idle: Recheck prev_cpu after narrowing allowed mask
octeon_ep_vf: add NULL check for napi_build_skb()
David Windsor (1):
selinux: don't reserve xattr slot when we won't fill it
David Woodhouse (1):
KVM: arm64: vgic: Fix IIDR revision field extracted from wrong value
Deepanshu Kartikey (1):
hfsplus: fix uninit-value by validating catalog record size
Dexuan Cui (2):
hv_sock: Report EOF instead of -EIO for FIN
hv_sock: Return -EIO for malformed/short packets
Eliot Courtney (1):
rust: drm: gem: clean up GEM state in init failure case
Eric Biggers (2):
dm-verity-fec: correctly reject too-small FEC devices
dm-verity-fec: correctly reject too-small hash devices
Fabio Porcedda (1):
USB: serial: option: add Telit Cinterion LE910Cx compositions
Fedor Pchelkin (1):
nvme-apple: drop invalid put of admin queue reference count
Felix Gu (1):
usb: ulpi: fix memory leak on ulpi_register() error paths
Filipe Manana (1):
btrfs: fix missing last_unlink_trans update when removing a directory
Fuad Tabba (4):
KVM: arm64: Fix kvm_vcpu_initialized() macro parameter
KVM: arm64: Fix FEAT_SPE_FnE to use PMSIDR_EL1.FnE, not PMSVer
KVM: arm64: Fix FEAT_Debugv8p9 to check DebugVer, not PMUVer
KVM: arm64: Fix pin leak and publication ordering in __pkvm_init_vcpu()
Gang Yan (3):
mptcp: sync the msk->sndbuf at accept() time
mptcp: sockopt: set timestamp flags on subflow socket, not msk
mptcp: fix scheduling with atomic in timestamp sockopt
Gao Xiang (1):
erofs: tidy up z_erofs_lz4_handle_overlap()
Gary Guo (1):
rust: pin-init: fix incorrect accessor reference lifetime
Greg Kroah-Hartman (4):
scsi: target: configfs: Bound snprintf() return in tg_pt_gp_members_show()
usb: usblp: fix heap leak in IEEE 1284 device ID via short response
usb: usblp: fix uninitialized heap leak via LPGETSTATUS ioctl Linux 6.18.30
Guangshuo Li (4):
ACPI: scan: Use acpi_dev_put() in object add error paths
ice: fix double free in ice_sf_eth_activate() error path
btrfs: fix double free in create_space_info() error path
f2fs: fix uninitialized kobject put in f2fs_init_sysfs()
Hamza Mahfooz (1):
hv_sock: fix ARM64 support
Hongling Zeng (1):
parisc: Fix IRQ leak in LASI driver
Huacai Chen (2):
LoongArch: Fix SYM_SIGFUNC_START definition for 32BIT
LoongArch: Use per-root-bridge PCIH flag to skip mem resource fixup
Ilya Maximets (1):
openvswitch: vport: fix self-deadlock on release of tunnel ports
Ivan Hu (1):
x86/efi: Fix graceful fault handling after FPU softirq changes
Jamal Hadi Salim (1):
net/sched: sch_red: Replace direct dequeue call with peek and qdisc_dequeue_peeked
Jan Schär (1):
ACPI: video: Add backlight=native quirk for Dell OptiPlex 7770 AIO
Jann Horn (1):
exit: prevent preemption of oopsing TASK_DEAD task
Jason Gunthorpe (10):
RDMA/hns: Fix unlocked call to hns_roce_qp_remove() RDMA/ionic: Fix typo in format string
RDMA/mana: Fix error unwind in mana_ib_create_qp_rss() RDMA/mana: Fix mana_destroy_wq_obj() cleanup in mana_ib_create_qp_rss() RDMA/mana: Remove user triggerable WARN_ON() in mana_ib_create_qp_rss() RDMA/mana: Validate rx_hash_key_len
RDMA/mlx4: Fix mis-use of RCU in mlx4_srq_event() RDMA/mlx4: Fix resource leak on error in mlx4_ib_create_srq() RDMA/ocrdma: Don't NULL deref uctx on errors in ocrdma_copy_pd_uresp() RDMA/vmw_pvrdma: Fix double free on pvrdma_alloc_ucontext() error path
Jens Axboe (2):
block: only read from sqe on initial invocation of blkdev_uring_cmd() io_uring/tw: serialize ctx->retry_llist with ->uring_lock
Jeongjun Park (1):
wifi: rsi: fix kthread lifetime race between self-exit and external-stop
Jiawen Wu (2):
net: libwx: fix VF illegal register access
net: libwx: use request_irq for VF misc interrupt
Jiexun Wang (1):
af_unix: Reject SIOCATMARK on non-stream sockets
Jinjie Ruan (1):
ACPI: CPPC: Fix related_cpus inconsistency during CPU hotplug
Jiri Slaby (SUSE) (1):
wifi: ath5k: do not access array OOB
Johan Hovold (12):
spi: rockchip: fix controller deregistration
spi: syncuacer: fix controller deregistration
spi: sun4i: fix controller deregistration
spi: ti-qspi: fix controller deregistration
spi: sun6i: fix controller deregistration
spi: zynqmp-gqspi: fix controller deregistration
spi: s3c64xx: fix NULL-deref on driver unbind
staging: vme_user: fix root device leak on init failure
clk: rk808: fix OF node reference imbalance
spi: microchip-core-qspi: fix controller deregistration
spi: topcliff-pch: fix controller deregistration
spi: topcliff-pch: fix use-after-free on unbind
Johannes Berg (1):
wifi: mac80211: remove station if connection prep fails
Joseph Salisbury (1):
ASoC: fsl_easrc: fix comment typo
Junrui Luo (3):
md/raid10: fix divide-by-zero in setup_geo() with zero far_copies RDMA/mlx5: Fix error path fall-through in mlx5_ib_dev_res_srq_init()
erofs: fix unsigned underflow in z_erofs_lz4_handle_overlap()
Kai Zen (2):
net: rtnetlink: zero ifla_vf_broadcast to avoid stack infoleak in rtnl_fill_vfinfo RDMA/ionic: bound node_desc sysfs read with %.64s
Kairui Song (1):
mm, swap: speed up hibernation allocation and writeout
Kevin Brodsky (1):
arm64: signal: Preserve POR_EL0 if poe_context is missing
Krzysztof Kozlowski (1):
firmware: exynos-acpm: Drop fake 'const' on handle pointer
Leon Yen (1):
wifi: mt76: mt7921: fix a potential clc buffer length underflow
Li Jian (1):
ASoC: ES8389: convert to devm_clk_get_optional() to get clock
Luiz Augusto von Dentz (1):
Bluetooth: hci_event: Fix OOB read and infinite loop in hci_le_create_big_complete_evt
Lukas Wunner (4):
lib/crypto: mpi: Fix integer underflow in mpi_read_raw_from_sgl()
PCI: Update saved_config_space upon resource assignment PCI/AER: Stop ruling out unbound devices as error source PCI/ASPM: Fix pci_clear_and_set_config_dword() usage
Luke Wang (1):
mmc: core: Optimize time for secure erase/trim for some Kingston eMMCs
Maoyi Xie (1):
ip6_gre: Use cached t->net in ip6erspan_changelink().
Marc Zyngier (1):
KVM: arm64: Wake-up from WFI when iqrchip is in userspace
Marek Szyprowski (1):
wifi: brcmfmac: Fix potential use-after-free issue when stopping watchdog task
Mark Brown (1):
ASoC: SOF: Don't allow pointer operations on unconfigured streams
Martin Michaelis (1):
io_uring/kbuf: support min length left for incremental buffers
Matthieu Baerts (NGI0) (13):
mptcp: pm: ADD_ADDR rtx: skip inactive subflows
selftests: mptcp: check output: catch cmd errors
selftests: mptcp: pm: restrict 'unknown' check to pm_nl_ctl
mptcp: fastclose msk when linger time is 0
mptcp: sockopt: increase seq in mptcp_setsockopt_all_sf
mptcp: pm: prio: skip closed subflows
mptcp: pm: kernel: correctly retransmit ADD_ADDR ID 0
mptcp: pm: ADD_ADDR rtx: allow ID 0
mptcp: pm: ADD_ADDR rtx: fix potential data-race
mptcp: pm: ADD_ADDR rtx: always decrease sk refcount
mptcp: pm: ADD_ADDR rtx: free sk if last
mptcp: pm: ADD_ADDR rtx: resched blocked ADD_ADDR quicker
mptcp: pm: ADD_ADDR rtx: return early if no retrans
Michael Bommarito (9):
xfrm: ah: account for ESN high bits in async callbacks
Bluetooth: virtio_bt: clamp rx length before skb_put
Bluetooth: virtio_bt: validate rx pkt_type header length
udf: reject descriptors with oversized CRC length
isofs: validate Rock Ridge CE continuation extent against volume size
isofs: validate block number from NFS file handle in isofs_export_iget
smb: client: validate dacloffset before building DACL pointers RDMA/rxe: Reject non-8-byte ATOMIC_WRITE payloads RDMA/rxe: Reject unknown opcodes before ICRC processing
Michael S. Tsirkin (1):
dma-mapping: add __dma_from_device_group_begin()/end()
Michal Kosiorek (1):
xfrm: defensively unhash xfrm_state lists in __xfrm_state_delete
Miguel Ojeda (2):
rust: allow clippy::collapsible_match globally
rust: allow clippy::collapsible_if globally
Miklos Szeredi (1):
fanotify: fix false positive on permission events
Mikulas Patocka (3):
dm-thin: fix metadata refcount underflow
dm: don't report warning when doing deferred remove
dm: fix a buffer overflow in ioctl processing
Ming Yen Hsieh (1):
wifi: mt76: mt7925: fix incorrect length field in txpower command
Mingming Cao (1):
ibmveth: Disable GSO for packets with small MSS
Myeonghun Pak (1):
hwmon: (corsair-psu) Close HID device on probe errors
Naman Jain (1):
block: add pgmap check to biovec_phys_mergeable
Nan Li (1):
net/rds: handle zerocopy send cleanup before the message is queued
Nicolin Chen (1):
iommu/arm-smmu-v3: Add a missing dma_wmb() for hitless STE update
Nilay Shroff (1):
powerpc/xive: fix kmemleak caused by incorrect chip_data lookup
Osama Abdelkader (1):
riscv: kvm: fix vector context allocation leak
Ovidiu Panait (1):
net: stmmac: Disable EEE RX clock stop when VLAN is enabled
Paolo Abeni (1):
mptcp: fix rx timestamp corruption on fastopen
Paolo Bonzini (3):
KVM: SVM: check validity of VMCB controls when returning from SMM
KVM: x86: check for nEPT/nNPT in slow flush hypercalls
KVM: x86: Do IRR scan in __kvm_apic_update_irr even if PIR is empty
Pavitra Jha (1):
net: wwan: t7xx: validate port_count against message length in t7xx_port_enum_msg_handler
Pengpeng Hou (1):
s390/debug: Reject zero-length input before trimming a newline
Prathyushi Nangia (1):
x86/CPU/AMD: Prevent improper isolation of shared resources in Zen2's op cache
Qiang Ma (1):
LoongArch: KVM: Cap KVM_CAP_NR_VCPUS by KVM_CAP_MAX_VCPUS
Qingfang Deng (1):
flow_dissector: do not dissect PPPoE PFC frames
Quan Zhou (3):
wifi: mt76: mt7925: fix incorrect TLV length in CLC command
wifi: mt76: mt7925: fix AMPDU state handling in mt7925_tx_check_aggr
wifi: mt76: mt7921: fix ROC abort flow interruption in mt7921_roc_work
Quentin Perret (1):
KVM: arm64: Fix initialisation order in __pkvm_init_finalise()
Rafael J. Wysocki (1):
thermal: core: Free thermal zone ID later during removal
Rajat Gupta (1):
fbdev: udlfb: add vm_ops to dlfb_ops_mmap to prevent use-after-free
Ranjan Kumar (1):
scsi: mpt3sas: Limit NVMe request size to 2 MiB
Raphael Zimmer (1):
libceph: Fix slab-out-of-bounds access in auth message processing
Ritesh Harjani (IBM) (3):
pseries/papr-hvpipe: Prevent kernel stack memory leak to userspace pseries/papr-hvpipe: Fix & simplify error handling in papr_hvpipe_init() pseries/papr-hvpipe: Fix the usage of copy_to_user()
Ruijie Li (1):
xfrm: provide message size for XFRM_MSG_MAPPING
Russell King (Oracle) (1):
net: stmmac: rename STMMAC_GET_ENTRY() -> STMMAC_NEXT_ENTRY()
Sam Edwards (2):
ceph: fix num_ops off-by-one when crypto allocation fails
net: stmmac: Prevent NULL deref when RX memory exhausted
Sang-Heon Jeon (1):
mm/hugetlb_cma: round up per_node before logging it
Sanman Pradhan (2):
hwmon: (ltc2992) Clamp threshold writes to hardware range
hwmon: (ltc2992) Fix u32 overflow in power read path
Sean Christopherson (1):
KVM: x86: Fix shadow paging use-after-free due to unexpected GFN
SeongJae Park (3):
mm/damon/stat: detect and use fresh enabled value mm/damon/sysfs-schemes: protect memcg_path kfree() with damon_sysfs_lock mm/damon/core: disallow non-power of two min_region_sz on damon_start()
SeungJu Cheon (1):
sound: ua101: fix division by zero at probe
Shardul Bankar (2):
mptcp: use MPJoinSynAckHMacFailure for SynAck HMAC failure
mptcp: use MPTCP_RST_EMPTCP for ACK HMAC validation failure
Shivam Kalra (1):
ACPI: video: force native backlight on HP OMEN 16 (8A44)
Shota Zaizen (1):
ksmbd: validate inherited ACE SID length
Shrikanth Hegde (1):
cpuidle: powerpc: avoid double clear when breaking snooze
Shuai Xue (1):
PCI/AER: Clear only error bits in PCIe Device Status
Shyam Prasad N (2):
cifs: abort open_cached_dir if we don't request leases
cifs: change_conf needs to be called for session setup
Sina Hassani (1):
iommufd: Fix a race with concurrent allocation and unmap
Siwei Zhang (3):
Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_new_connection_cb()
Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_state_change_cb()
Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_get_sndtimeo_cb()
Sourabh Jain (1):
powerpc/kdump: fix KASAN sanitization flag for core_$(BITS).o
Srinivas Kandagatla (3):
ASoC: qcom: q6apm-dai: reset queue ptr on trigger stop
ASoC: qcom: q6apm-lpass-dai: Fix multiple graph opens
ASoC: qcom: q6apm: remove child devices when apm is removed
Stefan Eichenberger (1):
clk: imx: imx8-acm: fix flags for acm clocks
Stephen Smalley (5):
selinux: fix avdcache auditing
selinux: shrink critical section in sel_write_load()
selinux: prune /sys/fs/selinux/checkreqprot
selinux: prune /sys/fs/selinux/disable
selinux: prune /sys/fs/selinux/user
Steven Rostedt (1):
tracing/probes: Limit size of event probe to 3K
Suman Kumar Chakraborty (2):
crypto: qat - fix indentation of macros in qat_hal.c
crypto: qat - fix firmware loading failure for GEN6 devices
Takashi Iwai (2):
ALSA: usb-audio: Avoid potential endless loop in convert_chmap_v3()
ALSA: pcm: oss: Fix data race at accessing runtime.oss.trigger
Tao Cui (2):
LoongArch: KVM: Fix missing EMULATE_FAIL in kvm_emu_mmio_read()
LoongArch: KVM: Use kvm_set_pte() in kvm_flush_pte()
Thomas Weißschuh (1):
hwmon: (powerz) Avoid cacheline sharing for DMA buffer
Thomas Zimmermann (2):
hv: Select CONFIG_SYSFB only for CONFIG_HYPERV_VMBUS
fbdev: defio: Disconnect deferred I/O from the lifetime of struct fb_info
Thorsten Blum (4):
thermal/drivers/sprd: Fix temperature clamping in sprd_thm_temp_to_rawdata thermal/drivers/sprd: Fix raw temperature clamping in sprd_thm_rawdata_to_temp
printk: add print_hex_dump_devel()
crypto: caam - guard HMAC key hex dumps in hash_digest_key
Tommaso Soncin (1):
ASoC: amd: yc: Add HP OMEN Gaming Laptop 16-ap0xxx product line in quirk table
Tristan Madani (3):
wifi: b43legacy: enforce bounds check on firmware key index in RX path
wifi: b43: enforce bounds check on firmware key index in b43_rx()
Bluetooth: btmtk: validate WMT event SKB length before struct access
Tudor Ambarus (1):
mtd: spi-nor: debugfs: fix out-of-bounds read in spi_nor_params_show()
Tzung-Bi Shih (1):
platform/chrome: cros_ec_typec: Init mutex in Thunderbolt registration
Ulf Hansson (1):
pmdomain: core: Fix detach procedure for virtual devices in genpd
Vasily Gorbik (1):
s390/debug: Reject zero-length input in debug_input_flush_fn()
Wentao Guan (1):
LoongArch: Fix potential ADE in loongson_gpu_fixup_dma_hang()
Wentao Liang (1):
pmdomain: mediatek: fix use-after-free in scpsys_get_bus_protection_legacy()
Xianglai Li (1):
LoongArch: KVM: Fix "unreliable stack" for kvm_exc_entry
Xu Yang (2):
usb: typec: tcpm: fix debug accessory mode detection for sink ports
extcon: ptn5150: handle pending IRQ events during system resume
Yi Kuo (1):
smb: client/smbdirect: fix MR registration for coalesced SG lists
Yilin Zhu (1):
ipv6: xfrm6: release dst on error in xfrm6_rcv_encap()
Yongpeng Yang (8):
f2fs: fix fiemap boundary handling when read extent cache is incomplete
f2fs: fix fsck inconsistency caused by incorrect nat_entry flag usage
f2fs: fix incorrect file address mapping when inline inode is unwritten
f2fs: fix incorrect multidevice info in trace_f2fs_map_blocks()
f2fs: fix node_cnt race between extent node destroy and writeback
f2fs: refactor f2fs_move_node_folio function
f2fs: fix inline data not being written to disk in writeback path
f2fs: fix fsck inconsistency caused by FGGC of node block
Yuriy Padlyak (1):
ALSA: hda/realtek: Fix speaker silence after S3 resume on Xiaomi Mi Laptop Pro 15
Zhengchuan Liang (1):
net: af_key: zero aligned sockaddr tail in PF_KEY exports
Zhenzhong Duan (2):
iommufd: Fix return value of iommufd_fault_fops_write() iommu/vt-d: Block PASID attachment to nested domain with dirty tracking
Zilin Guan (1):
hfsplus: fix held lock freed on hfsplus_fill_super()
Zisen Ye (2):
smb/client: fix out-of-bounds read in smb2_compound_op() smb/client: fix out-of-bounds read in symlink_data()
Zongyao Chen (1):
selinux: use sk blob accessor in socket permission helpers
Greg Kroah-Hartman
maintainerDocumentation/ABI/obsolete/sysfs-selinux-user deleted +0 -12
@@ -1,12 +0,0 @@ -What: /sys/fs/selinux/user -Date: April 2005 (predates git) -KernelVersion: 2.6.12-rc2 (predates git) -Contact: [email protected] -Description: - - The selinuxfs "user" node allows userspace to request a list - of security contexts that can be reached for a given SELinux - user from a given starting context. This was used by libselinux - when various login-style programs requested contexts for - users, but libselinux stopped using it in 2020. - Kernel support will be removed no sooner than Dec 2025.
Documentation/ABI/removed/sysfs-selinux-user new file +12 -0
@@ -0,0 +1,12 @@ +What: /sys/fs/selinux/user +Date: April 2005 (predates git) +KernelVersion: 2.6.12-rc2 (predates git) +Contact: [email protected] +Description: + + The selinuxfs "user" node allows userspace to request a list + of security contexts that can be reached for a given SELinux + user from a given starting context. This was used by libselinux + when various login-style programs requested contexts for + users, but libselinux stopped using it in 2020. + Kernel support will be removed no sooner than Dec 2025.
Makefile +3 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 18 -SUBLEVEL = 29 +SUBLEVEL = 30 EXTRAVERSION = NAME = Baby Opossum Posse
@@ -483,6 +483,8 @@ export rust_common_flags := --edition=2021 \ -Wclippy::as_ptr_cast_mut \ -Wclippy::as_underscore \ -Wclippy::cast_lossless \ + -Aclippy::collapsible_if \ + -Aclippy::collapsible_match \ -Wclippy::ignored_unit_patterns \ -Wclippy::mut_mut \ -Wclippy::needless_bitwise_bool \
arch/arm64/include/asm/kvm_host.h +1 -1
@@ -1476,7 +1476,7 @@ static inline bool __vcpu_has_feature(const struct kvm_arch *ka, int feature)#define kvm_vcpu_has_feature (k, f) __vcpu_has_feature(&(k)->arch, (f))#define vcpu_has_feature (v, f) __vcpu_has_feature(&(v)->kvm->arch, (f)) -#define kvm_vcpu_initialized (v) vcpu_get_flag(vcpu, VCPU_INITIALIZED) +#define kvm_vcpu_initialized (v) vcpu_get_flag(v, VCPU_INITIALIZED)int kvm_trng_call (struct kvm_vcpu *vcpu);#ifdef CONFIG_KVM
arch/arm64/kernel/ptrace.c +2 -2
@@ -957,8 +957,8 @@ static int sve_set_common(struct task_struct *target, }/* Always zero V regs, FPSR, and FPCR */ -memset (¤t->thread.uw.fpsimd_state,0 , -sizeof (current->thread.uw.fpsimd_state)); +memset (&target->thread.uw.fpsimd_state,0 , +sizeof (target->thread.uw.fpsimd_state));/* Registers: FPSIMD-only case */
arch/arm64/kernel/signal.c +43 -11
109 lines not on this page · raw message
arch/arm64/kvm/arm.c +4 -0
@@ -755,6 +755,10 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *v) {bool irq_lines = *vcpu_hcr (v) & (HCR_VI |HCR_VF |HCR_VSE ); + irq_lines |= (!irqchip_in_kernel (v->kvm) && + (kvm_timer_should_notify_user (v) || +kvm_pmu_should_notify_user (v))); +return ((irq_lines ||kvm_vgic_vcpu_pending_irq (v)) && !kvm_arm_vcpu_stopped (v) && !v->arch.pause); }
arch/arm64/kvm/config.c +13 -4
@@ -127,7 +127,6 @@ struct reg_feat_map_desc { }#define FEAT_SPE ID_AA64DFR0_EL1, PMSVer, IMP -#define FEAT_SPE_FnE ID_AA64DFR0_EL1, PMSVer, V1P2#define FEAT_BRBE ID_AA64DFR0_EL1, BRBE, IMP#define FEAT_TRC_SR ID_AA64DFR0_EL1, TraceVer, IMP#define FEAT_PMUv3 ID_AA64DFR0_EL1, PMUVer, IMP
@@ -188,7 +187,7 @@ struct reg_feat_map_desc {#define FEAT_SRMASK ID_AA64MMFR4_EL1, SRMASK, IMP#define FEAT_PoPS ID_AA64MMFR4_EL1, PoPS, IMP#define FEAT_PFAR ID_AA64PFR1_EL1, PFAR, IMP -#define FEAT_Debugv8p9 ID_AA64DFR0_EL1, PMUVer, V3P9 +#define FEAT_Debugv8p9 ID_AA64DFR0_EL1, DebugVer, V8P9#define FEAT_PMUv3_SS ID_AA64DFR0_EL1, PMSS, IMP#define FEAT_SEBEP ID_AA64DFR0_EL1, SEBEP, IMP#define FEAT_EBEP ID_AA64DFR1_EL1, EBEP, IMP
@@ -294,6 +293,16 @@ static bool feat_spe_fds(struct kvm *kvm) (read_sysreg_s(SYS_PMSIDR_EL1) & PMSIDR_EL1_FDS)); } +static bool feat_spe_fne (struct kvm *kvm) +{ +/* +* Revisit this if KVM ever supports SPE -- this really should +* look at the guest's view of PMSIDR_EL1. +*/ +return (kvm_has_feat (kvm, FEAT_SPEv1p2) && + (read_sysreg_s (SYS_PMSIDR_EL1 ) & PMSIDR_EL1_FnE)); +} +static bool feat_trbe_mpam (struct kvm *kvm) {/*
@@ -547,7 +556,7 @@ static const struct reg_bits_to_feat_map hdfgrtr_feat_map[] = { HDFGRTR_EL2_PMBPTR_EL1 | HDFGRTR_EL2_PMBLIMITR_EL1, FEAT_SPE), -NEEDS_FEAT (HDFGRTR_EL2_nPMSNEVFR_EL1, FEAT_SPE_FnE), +NEEDS_FEAT (HDFGRTR_EL2_nPMSNEVFR_EL1, feat_spe_fne), NEEDS_FEAT(HDFGRTR_EL2_nBRBDATA | HDFGRTR_EL2_nBRBCTL | HDFGRTR_EL2_nBRBIDR,
@@ -615,7 +624,7 @@ static const struct reg_bits_to_feat_map hdfgwtr_feat_map[] = { HDFGWTR_EL2_PMBPTR_EL1 | HDFGWTR_EL2_PMBLIMITR_EL1, FEAT_SPE), -NEEDS_FEAT (HDFGWTR_EL2_nPMSNEVFR_EL1, FEAT_SPE_FnE), +NEEDS_FEAT (HDFGWTR_EL2_nPMSNEVFR_EL1, feat_spe_fne),NEEDS_FEAT (HDFGWTR_EL2_nBRBDATA | HDFGWTR_EL2_nBRBCTL, FEAT_BRBE),
arch/arm64/kvm/hyp/nvhe/pkvm.c +25 -13
@@ -259,7 +259,8 @@ struct pkvm_hyp_vcpu *pkvm_load_hyp_vcpu(pkvm_handle_t handle,if (!hyp_vm || hyp_vm->kvm.created_vcpus <= vcpu_idx) goto unlock; - hyp_vcpu = hyp_vm->vcpus[vcpu_idx]; +/* Pairs with smp_store_release() in register_hyp_vcpu(). */ + hyp_vcpu =smp_load_acquire (&hyp_vm->vcpus[vcpu_idx]);if (!hyp_vcpu) goto unlock;
@@ -801,12 +802,30 @@ int __pkvm_init_vm(struct kvm *host_kvm, unsigned long vm_hva,* the page-aligned size of 'struct pkvm_hyp_vcpu'. * Return 0 on success, negative error code on failure. */ +static int register_hyp_vcpu (struct pkvm_hyp_vm *hyp_vm, +struct pkvm_hyp_vcpu *hyp_vcpu) +{ +unsigned int idx = hyp_vcpu->vcpu.vcpu_idx; + +if (idx >= hyp_vm->kvm.created_vcpus) +return -EINVAL ; + +if (hyp_vm->vcpus[idx]) +return -EINVAL ; + +/* +* Ensure the hyp_vcpu is initialised before publishing it to +* the vCPU-load path via 'hyp_vm->vcpus[]'. +*/ +smp_store_release (&hyp_vm->vcpus[idx], hyp_vcpu); +return 0 ; +} +int __pkvm_init_vcpu (pkvm_handle_t handle,struct kvm_vcpu *host_vcpu,unsigned long vcpu_hva) {struct pkvm_hyp_vcpu *hyp_vcpu;struct pkvm_hyp_vm *hyp_vm; -unsigned int idx;int ret; hyp_vcpu =map_donated_memory (vcpu_hva,sizeof (*hyp_vcpu));
@@ -825,18 +844,11 @@ int __pkvm_init_vcpu(pkvm_handle_t handle, struct kvm_vcpu *host_vcpu,if (ret) goto unlock; - idx = hyp_vcpu->vcpu.vcpu_idx; -if (idx >= hyp_vm->kvm.created_vcpus) { - ret = -EINVAL ; - goto unlock; - } - -if (hyp_vm->vcpus[idx]) { - ret = -EINVAL ; - goto unlock; + ret =register_hyp_vcpu (hyp_vm, hyp_vcpu); +if (ret) { +unpin_host_vcpu (host_vcpu); +unpin_host_sve_state (hyp_vcpu); } - - hyp_vm->vcpus[idx] = hyp_vcpu; unlock:hyp_spin_unlock (&vm_table_lock);
arch/arm64/kvm/hyp/nvhe/setup.c +3 -3
@@ -312,15 +312,15 @@ void __noreturn __pkvm_init_finalise(void) }; pkvm_pgtable.mm_ops = &pkvm_pgtable_mm_ops; - ret =fix_host_ownership (); + ret =fix_hyp_pgtable_refcnt ();if (ret) goto out; - ret =fix_hyp_pgtable_refcnt (); + ret =hyp_create_fixmap ();if (ret) goto out; - ret =hyp_create_fixmap (); + ret =fix_host_ownership ();if (ret) goto out;
arch/arm64/kvm/vgic/vgic-mmio-v2.c +1 -1
@@ -91,7 +91,7 @@ static int vgic_mmio_uaccess_write_v2_misc(struct kvm_vcpu *vcpu,* migration from old kernels to new kernels with legacy * userspace. */ - reg =FIELD_GET (GICD_IIDR_REVISION_MASK , reg); + reg =FIELD_GET (GICD_IIDR_REVISION_MASK , val);switch (reg) {case KVM_VGIC_IMP_REV_2 :case KVM_VGIC_IMP_REV_3 :
arch/arm64/kvm/vgic/vgic-mmio-v3.c +1 -1
@@ -194,7 +194,7 @@ static int vgic_mmio_uaccess_write_v3_misc(struct kvm_vcpu *vcpu,if ((reg ^ val) & ~GICD_IIDR_REVISION_MASK )return -EINVAL ; - reg =FIELD_GET (GICD_IIDR_REVISION_MASK , reg); + reg =FIELD_GET (GICD_IIDR_REVISION_MASK , val);switch (reg) {case KVM_VGIC_IMP_REV_2 :case KVM_VGIC_IMP_REV_3 :
arch/loongarch/include/asm/linkage.h +1 -1
@@ -69,7 +69,7 @@9 ,10 ,11 ,12 ,13 ,14 ,15 ,16 , \17 ,18 ,19 ,20 ,21 ,22 ,23 ,24 , \25 ,26 ,27 ,28 ,29 ,30 ,31 ; \ - .cfi_offset \num, SC_REGS + \num * SZREG; \ + .cfi_offset \num, SC_REGS + \num * 8; \ .endr; \ \ nop; \
arch/loongarch/kvm/exit.c +1 -0
@@ -390,6 +390,7 @@ int kvm_emu_mmio_read(struct kvm_vcpu *vcpu, larch_inst inst) run->mmio.len =8 ;break ;default : + ret =EMULATE_FAIL ;break ; }break ;
arch/loongarch/kvm/interrupt.c +14 -0
@@ -26,6 +26,7 @@ static unsigned int priority_to_irq[EXCCODE_INT_NUM] = {static int kvm_irq_deliver (struct kvm_vcpu *vcpu,unsigned int priority) {unsigned int irq =0 ; +unsigned long old, new;clear_bit (priority, &vcpu->arch.irq_pending);if (priority <EXCCODE_INT_NUM )
@@ -36,7 +37,13 @@ static int kvm_irq_deliver(struct kvm_vcpu *vcpu, unsigned int priority)case INT_IPI :case INT_SWI0 :case INT_SWI1 : + old =kvm_read_hw_gcsr (LOONGARCH_CSR_TVAL );set_gcsr_estat (irq); + new =kvm_read_hw_gcsr (LOONGARCH_CSR_TVAL ); + +/* Inject TI if TVAL inverted */ +if (new > old) +set_gcsr_estat (CPU_TIMER );break ; case INT_HWI0 ... INT_HWI7:
@@ -53,6 +60,7 @@ static int kvm_irq_deliver(struct kvm_vcpu *vcpu, unsigned int priority)static int kvm_irq_clear (struct kvm_vcpu *vcpu,unsigned int priority) {unsigned int irq =0 ; +unsigned long old, new;clear_bit (priority, &vcpu->arch.irq_clear);if (priority <EXCCODE_INT_NUM )
@@ -63,7 +71,13 @@ static int kvm_irq_clear(struct kvm_vcpu *vcpu, unsigned int priority)case INT_IPI :case INT_SWI0 :case INT_SWI1 : + old =kvm_read_hw_gcsr (LOONGARCH_CSR_TVAL );clear_gcsr_estat (irq); + new =kvm_read_hw_gcsr (LOONGARCH_CSR_TVAL ); + +/* Inject TI if TVAL inverted */ +if (new > old) +set_gcsr_estat (CPU_TIMER );break ; case INT_HWI0 ... INT_HWI7:
arch/loongarch/kvm/mmu.c +1 -1
@@ -95,7 +95,7 @@ static int kvm_flush_pte(kvm_pte_t *pte, phys_addr_t addr, kvm_ptw_ctx *ctx)else kvm->stat.pages--; - *pte = ctx->invalid_entry; +kvm_set_pte (pte, ctx->invalid_entry);return 1 ; }
arch/loongarch/kvm/switch.S +1 -1
@@ -104,7 +104,7 @@ .text .cfi_sections .debug_frame SYM_CODE_START(kvm_exc_entry) - UNWIND_HINT_UNDEFINED + UNWIND_HINT_END_OF_STACK csrwr a2, KVM_TEMP_KS csrrd a2, KVM_VCPU_KS addi.d a2, a2, KVM_VCPU_ARCH
arch/loongarch/kvm/timer.c +8 -2
@@ -96,15 +96,21 @@ void kvm_restore_timer(struct kvm_vcpu *vcpu)* and set CSR TVAL with -1 */ write_gcsr_timertick (0 ); -__delay (2 );/* Wait cycles until timer interrupt injected */ /* * Writing CSR_TINTCLR_TI to LOONGARCH_CSR_TINTCLR will clear * timer interrupt, and CSR TVAL keeps unchanged with -1, it * avoids spurious timer interrupt */ -if (!(estat &CPU_TIMER )) +if (!(estat &CPU_TIMER )) { +__delay (2 );/* Wait cycles until timer interrupt injected */ + +/* Write TVAL with max value if no TI shot */ + estat =kvm_read_hw_gcsr (LOONGARCH_CSR_ESTAT ); +if (!(estat &CPU_TIMER )) +write_gcsr_timertick (CSR_TCFG_VAL );gcsr_write (CSR_TINTCLR_TI ,LOONGARCH_CSR_TINTCLR ); + }return ; }
arch/loongarch/kvm/vm.c +1 -1
@@ -94,7 +94,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) r =1 ;break ;case KVM_CAP_NR_VCPUS : - r =num_online_cpus (); + r = min_t(unsigned int, num_online_cpus(), KVM_MAX_VCPUS);break ;case KVM_CAP_MAX_VCPUS : r =KVM_MAX_VCPUS ;
arch/loongarch/pci/acpi.c +5 -0
@@ -61,11 +61,16 @@ static void acpi_release_root_info(struct acpi_pci_root_info *ci)static int acpi_prepare_root_resources (struct acpi_pci_root_info *ci) {int status; +unsigned long long pci_h =0 ;struct resource_entry *entry, *tmp;struct acpi_device *device = ci->bridge; status =acpi_pci_probe_root_resources (ci);if (status >0 ) { +acpi_evaluate_integer (device->handle,"PCIH" ,NULL , &pci_h); +if (pci_h) +return status; +resource_list_for_each_entry_safe (entry, tmp, &ci->resources) {if (entry->res->flags &IORESOURCE_MEM ) { entry->offset = ci->root->mcfg_addr &GENMASK_ULL (63 ,40 );
arch/loongarch/pci/pci.c +3 -0
@@ -132,6 +132,9 @@ static void loongson_gpu_fixup_dma_hang(struct pci_dev *pdev, bool on) crtc_reg = regbase; crtc_offset =0x400 ;break ; +default : +iounmap (regbase); +return ; }for (i =0 ; i <CRTC_NUM_MAX ; i++, crtc_reg += crtc_offset) {
arch/powerpc/kexec/Makefile +1 -1
@@ -16,4 +16,4 @@ GCOV_PROFILE_core_$(BITS).o := n KCOV_INSTRUMENT_core_$(BITS).o := n UBSAN_SANITIZE_core_$(BITS).o := n KASAN_SANITIZE_core.o := n -KASAN_SANITIZE_core_$(BITS) := n +KASAN_SANITIZE_core_$(BITS).o := n
arch/powerpc/platforms/pseries/papr-hvpipe.c +32 -21
99 lines not on this page · raw message
arch/powerpc/sysdev/xive/common.c +11 -5
@@ -1038,13 +1038,19 @@ static struct xive_irq_data *xive_irq_alloc_data(unsigned int virq, irq_hw_numbereturn xd; } -static void xive_irq_free_data (unsigned int virq) +static void xive_irq_free_data (struct irq_domain *domain,unsigned int virq) { -struct xive_irq_data *xd =irq_get_chip_data (virq); +struct xive_irq_data *xd; +struct irq_data *data =irq_domain_get_irq_data (domain, virq); + +if (!data) +return ; + xd =irq_data_get_irq_chip_data (data);if (!xd)return ; -irq_set_chip_data (virq,NULL ); + +irq_domain_reset_irq_data (data);xive_cleanup_irq_data (xd);kfree (xd); }
@@ -1304,7 +1310,7 @@ static int xive_irq_domain_map(struct irq_domain *h, unsigned int virq,static void xive_irq_domain_unmap (struct irq_domain *d,unsigned int virq) { -xive_irq_free_data (virq); +xive_irq_free_data (d, virq); } static int xive_irq_domain_xlate(struct irq_domain *h, struct device_node *ct,
@@ -1442,7 +1448,7 @@ static void xive_irq_domain_free(struct irq_domain *domain,pr_debug ("%s %d #%d\n" , __func__, virq, nr_irqs);for (i =0 ; i < nr_irqs; i++) - xive_irq_free_data(virq + i); + xive_irq_free_data(domain, virq + i); }#endif
arch/riscv/kvm/vcpu_vector.c +4 -1
@@ -80,8 +80,11 @@ int kvm_riscv_vcpu_alloc_vector_context(struct kvm_vcpu *vcpu)return -ENOMEM ; vcpu->arch.host_context.vector.datap =kzalloc (riscv_v_vsize,GFP_KERNEL ); -if (!vcpu->arch.host_context.vector.datap) +if (!vcpu->arch.host_context.vector.datap) { +kfree (vcpu->arch.guest_context.vector.datap); + vcpu->arch.guest_context.vector.datap =NULL ;return -ENOMEM ; + }return 0 ; }
arch/s390/kernel/debug.c +8 -0
@@ -1416,6 +1416,9 @@ static inline char *debug_get_user_string(const char __user *user_buf, {char *buffer; +if (!user_len) +return ERR_PTR (-EINVAL ); + buffer =memdup_user_nul (user_buf, user_len);if (IS_ERR (buffer))return buffer;
@@ -1586,6 +1589,11 @@ static int debug_input_flush_fn(debug_info_t *id, struct debug_view *view,char input_buf[1 ];int rc = user_len; +if (!user_len) { + rc = -EINVAL ; + goto out; + } +if (user_len >0x10000 ) user_len =0x10000 ;if (*offset !=0 ) {
arch/x86/events/core.c +8 -5
@@ -1281,13 +1281,16 @@ int x86_perf_rdpmc_index(struct perf_event *event)return event->hw.event_base_rdpmc; } -static inline int match_prev_assignment (struct hw_perf_event *hwc, +static inline int match_prev_assignment (struct perf_event *event,struct cpu_hw_events *cpuc,int i) { +struct hw_perf_event *hwc = &event->hw; +return hwc->idx == cpuc->assign[i] && - hwc->last_cpu ==smp_processor_id () && - hwc->last_tag == cpuc->tags[i]; + hwc->last_cpu ==smp_processor_id () && + hwc->last_tag == cpuc->tags[i] && + !is_acr_event_group (event); }static void x86_pmu_start (struct perf_event *event,int flags);
@@ -1333,7 +1336,7 @@ static void x86_pmu_enable(struct pmu *pmu)* - no other event has used the counter since */ if (hwc->idx ==-1 || -match_prev_assignment (hwc, cpuc, i)) +match_prev_assignment (event, cpuc, i))continue ;/*
@@ -1354,7 +1357,7 @@ static void x86_pmu_enable(struct pmu *pmu) event = cpuc->event_list[i]; hwc = &event->hw; -if (!match_prev_assignment (hwc, cpuc, i)) +if (!match_prev_assignment (event, cpuc, i))x86_assign_hw_event (event, cpuc, i);else if (i < n_running)continue ;
arch/x86/events/intel/core.c +25 -7
@@ -2980,23 +2980,41 @@ static void intel_pmu_enable_event(struct perf_event *event)static void intel_pmu_acr_late_setup (struct cpu_hw_events *cpuc) {struct perf_event *event, *leader; -int i, j, idx; +int i, j, k, bit, idx; +/* +* FIXME: ACR mask parsing relies on cpuc->event_list[] (active events only). +* Disabling an ACR event causes bit-shifting errors in the acr_mask of +* remaining group members. As ACR sampling requires all events to be active, +* this limitation is acceptable for now. Revisit if independent event toggling +* is required. +*/ for (i =0 ; i < cpuc->n_events; i++) { leader = cpuc->event_list[i];if (!is_acr_event_group (leader))continue ; -/* The ACR events must be contiguous. */ +/* Find the last event of the ACR group. */ for (j = i; j < cpuc->n_events; j++) { event = cpuc->event_list[j];if (event->group_leader != leader->group_leader)break ; -for_each_set_bit (idx, (unsigned long *)&event->attr.config2,X86_PMC_IDX_MAX ) { -if (i + idx >= cpuc->n_events || - !is_acr_event_group (cpuc->event_list[i + idx])) -return ; -__set_bit (cpuc->assign[i + idx], (unsigned long *)&event->hw.config1); + } + +/* +* Translate the user-space ACR mask (attr.config2) into the physical +* counter bitmask (hw.config1) for each ACR event in the group. +* NOTE: ACR event contiguity is guaranteed by intel_pmu_hw_config(). +*/ +for (k = i; k < j; k++) { + event = cpuc->event_list[k]; + event->hw.config1 =0 ; +for_each_set_bit (bit, (unsigned long *)&event->attr.config2,X86_PMC_IDX_MAX ) { + idx = i + bit; +/* Event index of ACR group must locate in [i, j). */ +if (idx >= j || !is_acr_event_group (cpuc->event_list[idx])) +continue ; +__set_bit (cpuc->assign[idx], (unsigned long *)&event->hw.config1); } } i = j -1 ;
arch/x86/include/asm/efi.h +2 -1
@@ -137,7 +137,8 @@ extern void __init efi_dump_pagetable(void);extern void __init efi_apply_memmap_quirks (void );extern int __init efi_reuse_config (u64 tables,int nr_tables);extern void efi_delete_dummy_variable (void ); -extern void efi_crash_gracefully_on_page_fault (unsigned long phys_addr); +extern void efi_crash_gracefully_on_page_fault (unsigned long phys_addr, +const struct pt_regs *regs);extern void efi_unmap_boot_services (void );void arch_efi_call_virt_setup (void );
arch/x86/include/asm/msr-index.h +2 -1
@@ -767,9 +767,10 @@#define MSR_AMD64_LBR_SELECT 0xc000010e/* Zen4 */ -#define MSR_ZEN4_BP_CFG 0xc001102e +#define MSR_ZEN4_BP_CFG 0xc001102e#define MSR_ZEN4_BP_CFG_BP_SPEC_REDUCE_BIT 4#define MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT 5 +#define MSR_ZEN2_BP_CFG_BUG_FIX_BIT 33/* Fam 19h MSRs */ #define MSR_F19H_UMC_PERF_CTL 0xc0010800
arch/x86/kernel/cpu/amd.c +3 -0
@@ -994,6 +994,9 @@ static void init_amd_zen2(struct cpuinfo_x86 *c)/* Correct misconfigured CPUID on some clients. */ clear_cpu_cap (c,X86_FEATURE_INVLPGB ); + +if (!cpu_has (c,X86_FEATURE_HYPERVISOR )) +msr_set_bit (MSR_ZEN4_BP_CFG ,MSR_ZEN2_BP_CFG_BUG_FIX_BIT ); }static void init_amd_zen3 (struct cpuinfo_x86 *c)
arch/x86/kvm/hyperv.c +1 -1
@@ -2039,7 +2039,7 @@ static u64 kvm_hv_flush_tlb(struct kvm_vcpu *vcpu, struct kvm_hv_hcall *hc)* flush). Translate the address here so the memory can be uniformly * read with kvm_read_guest(). */ -if (!hc->fast &&is_guest_mode (vcpu)) { +if (!hc->fast &&mmu_is_nested (vcpu)) { hc->ingpa =translate_nested_gpa (vcpu, hc->ingpa,0 ,NULL );if (unlikely (hc->ingpa ==INVALID_GPA ))return HV_STATUS_INVALID_HYPERCALL_INPUT ;
arch/x86/kvm/lapic.c +5 -3
@@ -669,12 +669,14 @@ bool __kvm_apic_update_irr(unsigned long *pir, void *regs, int *max_irr)u32 irr_val, prev_irr_val;int max_updated_irr; +if (!pi_harvest_pir (pir, pir_vals)) { + *max_irr =apic_find_highest_vector (regs +APIC_IRR ); +return false; + } + max_updated_irr =-1 ; *max_irr =-1 ; -if (!pi_harvest_pir (pir, pir_vals)) -return false; -for (i = vec =0 ; i <=7 ; i++, vec +=32 ) {u32 *p_irr = (u32 *)(regs +APIC_IRR + i *0x10 );
arch/x86/kvm/mmu/mmu.c +14 -21
@@ -182,6 +182,8 @@ static struct kmem_cache *pte_list_desc_cache;struct kmem_cache *mmu_page_header_cache;static void mmu_spte_set (u64 *sptep,u64 spte); +static int mmu_page_zap_pte (struct kvm *kvm,struct kvm_mmu_page *sp, +u64 *spte,struct list_head *invalid_list);struct kvm_mmu_role_regs {const unsigned long cr0;
@@ -1287,19 +1289,6 @@ static void drop_spte(struct kvm *kvm, u64 *sptep)rmap_remove (kvm, sptep); } -static void drop_large_spte (struct kvm *kvm,u64 *sptep,bool flush) -{ -struct kvm_mmu_page *sp; - - sp =sptep_to_sp (sptep); -WARN_ON_ONCE (sp->role.level ==PG_LEVEL_4K ); - -drop_spte (kvm, sptep); - -if (flush) -kvm_flush_remote_tlbs_sptep (kvm, sptep); -} -/* * Write-protect on the specified @sptep, @pt_protect indicates whether * spte write-protection is caused by protecting shadow page table.
@@ -2466,7 +2455,8 @@ static struct kvm_mmu_page *kvm_mmu_get_child_sp(struct kvm_vcpu *vcpu, {union kvm_mmu_page_role role; -if (is_shadow_present_pte (*sptep) && !is_large_pte (*sptep)) +if (is_shadow_present_pte (*sptep) && !is_large_pte (*sptep) && +spte_to_child_sp (*sptep) &&spte_to_child_sp (*sptep)->gfn == gfn)return ERR_PTR (-EEXIST ); role =kvm_mmu_child_role (sptep, direct, access);
@@ -2544,13 +2534,16 @@ static void __link_shadow_page(struct kvm *kvm,BUILD_BUG_ON (VMX_EPT_WRITABLE_MASK !=PT_WRITABLE_MASK ); -/* -* If an SPTE is present already, it must be a leaf and therefore -* a large one. Drop it, and flush the TLB if needed, before -* installing sp. -*/ -if (is_shadow_present_pte (*sptep)) -drop_large_spte (kvm, sptep, flush); +if (is_shadow_present_pte (*sptep)) { +struct kvm_mmu_page *parent_sp; +LIST_HEAD (invalid_list); + + parent_sp =sptep_to_sp (sptep); +WARN_ON_ONCE (parent_sp->role.level ==PG_LEVEL_4K ); + +mmu_page_zap_pte (kvm, parent_sp, sptep, &invalid_list); +kvm_mmu_remote_flush_or_zap (kvm, &invalid_list, true); + } spte =make_nonleaf_spte (sp->spt,sp_ad_disabled (sp));
arch/x86/kvm/svm/nested.c +10 -2
@@ -484,6 +484,15 @@ void nested_copy_vmcb_save_to_cache(struct vcpu_svm *svm,__nested_copy_vmcb_save_to_cache (&svm->nested.save, save); } +int nested_svm_check_cached_vmcb12 (struct kvm_vcpu *vcpu) +{ +if (!nested_vmcb_check_save (vcpu) || + !nested_vmcb_check_controls (vcpu)) +return -EINVAL ; + +return 0 ; +} +/* * Synchronize fields that are written by the processor, so that * they can be copied back into the vmcb12.
@@ -990,8 +999,7 @@ int nested_svm_vmrun(struct kvm_vcpu *vcpu)nested_copy_vmcb_control_to_cache (svm, &vmcb12->control);nested_copy_vmcb_save_to_cache (svm, &vmcb12->save); -if (!nested_vmcb_check_save (vcpu) || - !nested_vmcb_check_controls (vcpu)) { +if (nested_svm_check_cached_vmcb12 (vcpu) <0 ) { vmcb12->control.exit_code =SVM_EXIT_ERR ; vmcb12->control.exit_code_hi =-1u ; vmcb12->control.exit_info_1 =0 ;
arch/x86/kvm/svm/svm.c +4 -0
@@ -4885,6 +4885,10 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram) vmcb12 = map.hva;nested_copy_vmcb_control_to_cache (svm, &vmcb12->control);nested_copy_vmcb_save_to_cache (svm, &vmcb12->save); + +if (nested_svm_check_cached_vmcb12 (vcpu) <0 ) + goto unmap_save; + ret =enter_svm_guest_mode (vcpu, smram64->svm_guest_vmcb_gpa, vmcb12, false);if (ret)
arch/x86/kvm/svm/svm.h +1 -0
@@ -782,6 +782,7 @@ static inline int nested_svm_simple_vmexit(struct vcpu_svm *svm, u32 exit_code)int nested_svm_exit_handled (struct vcpu_svm *svm);int nested_svm_check_permissions (struct kvm_vcpu *vcpu); +int nested_svm_check_cached_vmcb12 (struct kvm_vcpu *vcpu);int nested_svm_check_exception (struct vcpu_svm *svm,unsigned nr,bool has_error_code,u32 error_code);int nested_svm_exit_special (struct vcpu_svm *svm);
arch/x86/mm/fault.c +1 -1
@@ -686,7 +686,7 @@ page_fault_oops(struct pt_regs *regs, unsigned long error_code,* avoid hanging the system. */ if (IS_ENABLED (CONFIG_EFI )) -efi_crash_gracefully_on_page_fault (address); +efi_crash_gracefully_on_page_fault (address, regs);/* Only not-present faults should be handled by KFENCE. */ if (!(error_code & X86_PF_PROT) &&
arch/x86/platform/efi/quirks.c +11 -2
@@ -761,7 +761,8 @@ int efi_capsule_setup_info(struct capsule_info *cap_info, void *kbuff,* @return: Returns, if the page fault is not handled. This function * will never return if the page fault is handled successfully. */ -void efi_crash_gracefully_on_page_fault (unsigned long phys_addr) +void efi_crash_gracefully_on_page_fault (unsigned long phys_addr, +const struct pt_regs *regs) {if (!IS_ENABLED (CONFIG_X86_64 ))return ;
@@ -770,7 +771,7 @@ void efi_crash_gracefully_on_page_fault(unsigned long phys_addr)* If we get an interrupt/NMI while processing an EFI runtime service * then this is a regular OOPS, not an EFI failure. */ -if (in_interrupt ()) +if (!in_task ())return ;/*
@@ -810,6 +811,14 @@ void efi_crash_gracefully_on_page_fault(unsigned long phys_addr)return ; } +/* +* The API does not permit entering a kernel mode FPU section with +* interrupts enabled and leaving it with interrupts disabled. So +* re-enable interrupts now if they were enabled when the page fault +* occurred. +*/ +local_irq_restore (regs->flags); +/* * Before calling EFI Runtime Service, the kernel has switched the * calling process to efi_mm. Hence, switch back to task_mm.
block/blk.h +2 -0
@@ -132,6 +132,8 @@ static inline bool biovec_phys_mergeable(struct request_queue *q,if (addr1 + vec1->bv_len != addr2)return false; +if (!zone_device_pages_have_same_pgmap (vec1->bv_page, vec2->bv_page)) +return false;if (xen_domain () && !xen_biovec_phys_mergeable (vec1, vec2->bv_page))return false;if ((addr1 | mask) != ((addr2 + vec2->bv_len -1 ) | mask))
block/ioctl.c +15 -9
@@ -765,6 +765,8 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)#endif struct blk_iou_cmd { +u64 start; +u64 len;int res;bool nowait; };
@@ -852,23 +854,27 @@ int blkdev_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags) {struct block_device *bdev =I_BDEV (cmd->file->f_mapping->host); struct blk_iou_cmd *bic = io_uring_cmd_to_pdu(cmd, struct blk_iou_cmd); -const struct io_uring_sqe *sqe = cmd->sqe;u32 cmd_op = cmd->cmd_op; -uint64_t start, len; -if (unlikely (sqe->ioprio || sqe->__pad1 || sqe->len || - sqe->rw_flags || sqe->file_index)) -return -EINVAL ; +/* Read what we need from the SQE on the first issue */ +if (!(issue_flags &IORING_URING_CMD_REISSUE )) { +const struct io_uring_sqe *sqe = cmd->sqe; + +if (unlikely (sqe->ioprio || sqe->__pad1 || sqe->len || + sqe->rw_flags || sqe->file_index)) +return -EINVAL ; + + bic->start =READ_ONCE (sqe->addr); + bic->len =READ_ONCE (sqe->addr3); + } bic->res =0 ; bic->nowait = issue_flags &IO_URING_F_NONBLOCK ; - start =READ_ONCE (sqe->addr); - len =READ_ONCE (sqe->addr3); -switch (cmd_op) {case BLOCK_URING_CMD_DISCARD : -return blkdev_cmd_discard (cmd, bdev, start, len, bic->nowait); +return blkdev_cmd_discard (cmd, bdev, bic->start, bic->len, + bic->nowait); }return -EINVAL ; }
drivers/acpi/cppc_acpi.c +3 -3
@@ -362,7 +362,7 @@ static int send_pcc_cmd(int pcc_ss_id, u16 cmd) end:if (cmd ==CMD_WRITE ) {if (unlikely (ret)) { -for_each_online_cpu (i) { +for_each_possible_cpu (i) {struct cpc_desc *desc =per_cpu (cpc_desc_ptr, i);if (!desc)
@@ -524,13 +524,13 @@ int acpi_get_psd_map(unsigned int cpu, struct cppc_cpudata *cpu_data)else if (pdomain->coord_type ==DOMAIN_COORD_TYPE_SW_ANY ) cpu_data->shared_type =CPUFREQ_SHARED_TYPE_ANY ; -for_each_online_cpu (i) { +for_each_possible_cpu (i) {if (i == cpu)continue ; match_cpc_ptr =per_cpu (cpc_desc_ptr, i);if (!match_cpc_ptr) - goto err_fault; +continue ; match_pdomain = &(match_cpc_ptr->domain_info);if (match_pdomain->domain != pdomain->domain)
drivers/acpi/power.c +1 -1
@@ -991,7 +991,7 @@ struct acpi_device *acpi_add_power_resource(acpi_handle handle)return device; err: -acpi_release_power_resource (&device->dev); +acpi_dev_put (device);return NULL ; }
drivers/acpi/scan.c +1 -1
@@ -1910,7 +1910,7 @@ static int acpi_add_single_object(struct acpi_device **child, result =acpi_device_add (device);if (result) { -acpi_device_release (&device->dev); +acpi_dev_put (device);return result; }
drivers/acpi/video_detect.c +16 -0
@@ -878,6 +878,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 7760 AIO"), }, }, + { + .callback = video_detect_force_native, + /* Dell OptiPlex 7770 AIO */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 7770 AIO"), + }, + },/* * Models which have nvidia-ec-wmi support, but should not use it.
@@ -899,6 +907,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15 3535"), }, }, + { + .callback = video_detect_force_native, + /* HP OMEN Gaming Laptop 16-n0xxx */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_MATCH(DMI_PRODUCT_NAME, "OMEN by HP Gaming Laptop 16-n0xxx"), + }, + },/* * x86 android tablets which directly control the backlight through
drivers/android/binder/range_alloc/array.rs +0 -1
@@ -204,7 +204,6 @@ pub(crate) fn reservation_abort(&mut self, offset: usize) -> Result<FreedRange>// caller will mark them as unused, which means that they can be freed if the system comes // under memory pressure. let mut freed_range =FreedRange ::interior_pages (offset, size); -#[expect(clippy::collapsible_if)] // reads better like this if offset %PAGE_SIZE !=0 {if i ==0 || self.ranges[i -1 ].endpoint () <= (offset &PAGE_MASK ) { freed_range.start_page_idx -=1 ;
drivers/bluetooth/btmtk.c +13 -2
@@ -654,8 +654,13 @@ static int btmtk_usb_hci_wmt_sync(struct hci_dev *hdev,if (data->evt_skb ==NULL ) goto err_free_wc; -/* Parse and handle the return WMT event */ - wmt_evt = (struct btmtk_hci_wmt_evt *)data->evt_skb->data; + wmt_evt =skb_pull_data (data->evt_skb,sizeof (*wmt_evt)); +if (!wmt_evt) { +bt_dev_err (hdev,"WMT event too short (%u bytes)" , + data->evt_skb->len); + err = -EINVAL ; + goto err_free_skb; + }if (wmt_evt->whdr.op != hdr->op) {bt_dev_err (hdev,"Wrong op received %d expected %d" , wmt_evt->whdr.op, hdr->op);
@@ -671,6 +676,12 @@ static int btmtk_usb_hci_wmt_sync(struct hci_dev *hdev, status =BTMTK_WMT_PATCH_DONE ;break ;case BTMTK_WMT_FUNC_CTRL : +if (!skb_pull_data (data->evt_skb, +sizeof (wmt_evt_funcc->status))) { + err = -EINVAL ; + goto err_free_skb; + } + wmt_evt_funcc = (struct btmtk_hci_wmt_evt_funcc *)wmt_evt;if (be16_to_cpu (wmt_evt_funcc->status) ==0x404 ) status =BTMTK_WMT_ON_DONE ;
drivers/bluetooth/virtio_bt.c +32 -7
@@ -12,6 +12,7 @@#include <net/bluetooth/hci_core.h> #define VERSION "0.1" +#define VIRTBT_RX_BUF_SIZE 1000enum {VIRTBT_VQ_TX ,
@@ -33,11 +34,11 @@ static int virtbt_add_inbuf(struct virtio_bluetooth *vbt)struct sk_buff *skb;int err; - skb =alloc_skb (1000 ,GFP_KERNEL ); + skb =alloc_skb (VIRTBT_RX_BUF_SIZE ,GFP_KERNEL );if (!skb)return -ENOMEM ; -sg_init_one (sg, skb->data,1000 ); +sg_init_one (sg, skb->data,VIRTBT_RX_BUF_SIZE ); err =virtqueue_add_inbuf (vq, sg,1 , skb,GFP_KERNEL );if (err <0 ) {
@@ -197,6 +198,7 @@ static int virtbt_shutdown_generic(struct hci_dev *hdev)static void virtbt_rx_handle (struct virtio_bluetooth *vbt,struct sk_buff *skb) { +size_t min_hdr;__u8 pkt_type; pkt_type = *((__u8 *) skb->data);
@@ -204,16 +206,32 @@ static void virtbt_rx_handle(struct virtio_bluetooth *vbt, struct sk_buff *skb)switch (pkt_type) {case HCI_EVENT_PKT : + min_hdr =sizeof (struct hci_event_hdr ); +break ;case HCI_ACLDATA_PKT : + min_hdr =sizeof (struct hci_acl_hdr ); +break ;case HCI_SCODATA_PKT : + min_hdr =sizeof (struct hci_sco_hdr ); +break ;case HCI_ISODATA_PKT : -hci_skb_pkt_type (skb) = pkt_type; -hci_recv_frame (vbt->hdev, skb); + min_hdr =sizeof (struct hci_iso_hdr );break ;default :kfree_skb (skb); -break ; +return ; + } + +if (skb->len < min_hdr) { +bt_dev_err_ratelimited (vbt->hdev, +"rx pkt_type 0x%02x payload %u < hdr %zu\n" , + pkt_type, skb->len, min_hdr); +kfree_skb (skb); +return ; } + +hci_skb_pkt_type (skb) = pkt_type; +hci_recv_frame (vbt->hdev, skb); }static void virtbt_rx_work (struct work_struct *work)
@@ -227,8 +245,15 @@ static void virtbt_rx_work(struct work_struct *work)if (!skb)return ; -skb_put (skb, len); -virtbt_rx_handle (vbt, skb); +if (!len || len >VIRTBT_RX_BUF_SIZE ) { +bt_dev_err_ratelimited (vbt->hdev, +"rx reply len %u outside [1, %u]\n" , + len,VIRTBT_RX_BUF_SIZE ); +kfree_skb (skb); + }else { +skb_put (skb, len); +virtbt_rx_handle (vbt, skb); + }if (virtbt_add_inbuf (vbt) <0 )return ;
drivers/char/ipmi/ipmi_si_intf.c +56 -14
137 lines not on this page · raw message
drivers/char/ipmi/ipmi_ssif.c +21 -2
@@ -225,6 +225,9 @@ struct ssif_info {bool has_event_buffer;bool supports_alert; +/* When requesting events and messages, don't do it forever. */ +unsigned int num_requests_in_a_row; +/* * Used to tell what we should do with alerts. If we are * waiting on a response, read the data immediately.
@@ -413,7 +416,10 @@ static void start_event_fetch(struct ssif_info *ssif_info, unsigned long *flags) } ssif_info->curr_msg = msg; - ssif_info->ssif_state =SSIF_GETTING_EVENTS ; +if (ssif_info->ssif_state !=SSIF_GETTING_EVENTS ) { + ssif_info->num_requests_in_a_row =0 ; + ssif_info->ssif_state =SSIF_GETTING_EVENTS ; + }ipmi_ssif_unlock_cond (ssif_info, flags); msg->data[0 ] = (IPMI_NETFN_APP_REQUEST <<2 );
@@ -436,7 +442,10 @@ static void start_recv_msg_fetch(struct ssif_info *ssif_info, } ssif_info->curr_msg = msg; - ssif_info->ssif_state =SSIF_GETTING_MESSAGES ; +if (ssif_info->ssif_state !=SSIF_GETTING_MESSAGES ) { + ssif_info->num_requests_in_a_row =0 ; + ssif_info->ssif_state =SSIF_GETTING_MESSAGES ; + }ipmi_ssif_unlock_cond (ssif_info, flags); msg->data[0 ] = (IPMI_NETFN_APP_REQUEST <<2 );
@@ -843,6 +852,11 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, ssif_info->msg_flags &= ~EVENT_MSG_BUFFER_FULL ;handle_flags (ssif_info, flags); }else { + ssif_info->num_requests_in_a_row++; +if (ssif_info->num_requests_in_a_row >10 ) +/* Stop if we do this too many times. */ + ssif_info->msg_flags &= ~EVENT_MSG_BUFFER_FULL ; +handle_flags (ssif_info, flags);ssif_inc_stat (ssif_info, events);deliver_recv_msg (ssif_info, msg);
@@ -876,6 +890,11 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, ssif_info->msg_flags &= ~RECEIVE_MSG_AVAIL ;handle_flags (ssif_info, flags); }else { + ssif_info->num_requests_in_a_row++; +if (ssif_info->num_requests_in_a_row >10 ) +/* Stop if we do this too many times. */ + ssif_info->msg_flags &= ~RECEIVE_MSG_AVAIL ; +ssif_inc_stat (ssif_info, incoming_messages);handle_flags (ssif_info, flags);deliver_recv_msg (ssif_info, msg);
drivers/clk/clk-rk808.c +1 -1
@@ -153,7 +153,7 @@ static int rk808_clkout_probe(struct platform_device *pdev)struct rk808_clkout *rk808_clkout;int ret; - dev->of_node = pdev->dev.parent->of_node; +device_set_of_node_from_dev (dev, dev->parent); rk808_clkout =devm_kzalloc (dev,sizeof (*rk808_clkout),GFP_KERNEL );
drivers/clk/imx/clk-imx8-acm.c +2 -1
@@ -371,7 +371,8 @@ static int imx8_acm_clk_probe(struct platform_device *pdev)for (i =0 ; i < priv->soc_data->num_sels; i++) { hws[sels[i].clkid] =devm_clk_hw_register_mux_parent_data_table (dev, sels[i].name, sels[i].parents, - sels[i].num_parents,0 , + sels[i].num_parents, +CLK_SET_RATE_NO_REPARENT , base + sels[i].reg, sels[i].shift, sels[i].width,0 ,NULL ,NULL );
drivers/clk/microchip/clk-mpfs-ccc.c +5 -1
@@ -178,7 +178,7 @@ static int mpfs_ccc_register_outputs(struct device *dev, struct mpfs_ccc_out_hw_return dev_err_probe (dev, ret,"failed to register clock id: %d\n" , out_hw->id); - data->hw_data.hws[out_hw->id] = &out_hw->divider.hw; + data->hw_data.hws[out_hw->id -2 ] = &out_hw->divider.hw; }return 0 ;
@@ -234,6 +234,10 @@ static int mpfs_ccc_probe(struct platform_device *pdev)unsigned int num_clks;int ret; +/* +* If DLLs get added here, mpfs_ccc_register_outputs() currently packs +* sparse clock IDs in the hws array +*/ num_clks =ARRAY_SIZE (mpfs_ccc_pll_clks) +ARRAY_SIZE (mpfs_ccc_pll0out_clks) +ARRAY_SIZE (mpfs_ccc_pll1out_clks);
drivers/cpuidle/cpuidle-powernv.c +4 -1
@@ -95,7 +95,10 @@ static int snooze_loop(struct cpuidle_device *dev,HMT_medium ();ppc64_runlatch_on (); -clear_thread_flag (TIF_POLLING_NRFLAG ); + +/* Avoid double clear when breaking */ +if (!dev->poll_time_limit) +clear_thread_flag (TIF_POLLING_NRFLAG );local_irq_disable ();
drivers/cpuidle/cpuidle-pseries.c +4 -1
@@ -64,7 +64,10 @@ int snooze_loop(struct cpuidle_device *dev, struct cpuidle_driver *drv, }HMT_medium (); -clear_thread_flag (TIF_POLLING_NRFLAG ); + +/* Avoid double clear when breaking */ +if (!dev->poll_time_limit) +clear_thread_flag (TIF_POLLING_NRFLAG );raw_local_irq_disable ();
drivers/crypto/caam/caamalg_qi2.c +2 -2
@@ -3269,7 +3269,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,dpaa2_fl_set_addr (out_fle, key_dma);dpaa2_fl_set_len (out_fle, digestsize); - print_hex_dump_debug("key_in@" __stringify(__LINE__)": ", + print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, *keylen,1 ); print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
@@ -3289,7 +3289,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,/* in progress */ wait_for_completion (&result.completion); ret = result.err; - print_hex_dump_debug("digested key@" __stringify(__LINE__)": ", + print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, digestsize,1 ); }
drivers/crypto/caam/caamhash.c +2 -2
@@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,append_seq_store (desc, digestsize,LDST_CLASS_2_CCB |LDST_SRCDST_BYTE_CONTEXT ); - print_hex_dump_debug("key_in@"__stringify(__LINE__)": ", + print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, *keylen,1 ); print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
@@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,wait_for_completion (&result.completion); ret = result.err; - print_hex_dump_debug("digested key@"__stringify(__LINE__)": ", + print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, digestsize,1 ); }
drivers/crypto/intel/qat/qat_common/adf_accel_engine.c +7 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) /* Copyright(c) 2014 - 2020 Intel Corporation */ +#include <linux/delay.h> #include <linux/firmware.h> #include <linux/pci.h> #include "adf_cfg.h"
@@ -162,8 +163,14 @@ int adf_ae_stop(struct adf_accel_dev *accel_dev)static int adf_ae_reset (struct adf_accel_dev *accel_dev,int ae) {struct adf_fw_loader_data *loader_data = accel_dev->fw_loader; +unsigned long reset_delay;qat_hal_reset (loader_data->fw_loader); + + reset_delay = loader_data->fw_loader->chip_info->reset_delay_us; +if (reset_delay) +fsleep (reset_delay); +if (qat_hal_clr_reset (loader_data->fw_loader))return -EFAULT ;
drivers/crypto/intel/qat/qat_common/icp_qat_fw_loader_handle.h +1 -0
@@ -27,6 +27,7 @@ struct icp_qat_fw_loader_chip_info {int mmp_sram_size;bool nn;bool lm2lm3; +u16 reset_delay_us;u32 lm_size;u32 icp_rst_csr;u32 icp_rst_mask;
drivers/crypto/intel/qat/qat_common/qat_hal.c +15 -12
@@ -9,17 +9,18 @@#include "icp_qat_hal.h" #include "icp_qat_uclo.h" -#define BAD_REGADDR 0xffff -#define MAX_RETRY_TIMES 10000 -#define INIT_CTX_ARB_VALUE 0x0 -#define INIT_CTX_ENABLE_VALUE 0x0 -#define INIT_PC_VALUE 0x0 -#define INIT_WAKEUP_EVENTS_VALUE 0x1 -#define INIT_SIG_EVENTS_VALUE 0x1 -#define INIT_CCENABLE_VALUE 0x2000 -#define RST_CSR_QAT_LSB 20 -#define RST_CSR_AE_LSB 0 -#define MC_TIMESTAMP_ENABLE (0x1 << 7) +#define BAD_REGADDR 0xffff +#define MAX_RETRY_TIMES 10000 +#define INIT_CTX_ARB_VALUE 0x0 +#define INIT_CTX_ENABLE_VALUE 0x0 +#define INIT_PC_VALUE 0x0 +#define INIT_WAKEUP_EVENTS_VALUE 0x1 +#define INIT_SIG_EVENTS_VALUE 0x1 +#define INIT_CCENABLE_VALUE 0x2000 +#define RST_CSR_QAT_LSB 20 +#define RST_CSR_AE_LSB 0 +#define MC_TIMESTAMP_ENABLE (0x1 << 7) +#define MIN_RESET_DELAY_US 3#define IGNORE_W1C_MASK ((~(1 << CE_BREAKPOINT_BITPOS)) & \ (~(1 << CE_CNTL_STORE_PARITY_ERROR_BITPOS)) & \
@@ -713,8 +714,10 @@ static int qat_hal_chip_init(struct icp_qat_fw_loader_handle *handle, handle->chip_info->wakeup_event_val =0x80000000 ; handle->chip_info->fw_auth = true; handle->chip_info->css_3k = true; -if (handle->pci_dev->device ==PCI_DEVICE_ID_INTEL_QAT_6XXX ) +if (handle->pci_dev->device ==PCI_DEVICE_ID_INTEL_QAT_6XXX ) { handle->chip_info->dual_sign = true; + handle->chip_info->reset_delay_us =MIN_RESET_DELAY_US ; + } handle->chip_info->tgroup_share_ustore = true; handle->chip_info->fcu_ctl_csr =FCU_CONTROL_4XXX ; handle->chip_info->fcu_sts_csr =FCU_STATUS_4XXX ;
drivers/extcon/extcon-ptn5150.c +14 -0
@@ -331,6 +331,19 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c)return 0 ; } +static int ptn5150_resume (struct device *dev) +{ +struct i2c_client *i2c =to_i2c_client (dev); +struct ptn5150_info *info =i2c_get_clientdata (i2c); + +/* Need to check possible pending interrupt events */ +schedule_work (&info->irq_work); + +return 0 ; +} + +static DEFINE_SIMPLE_DEV_PM_OPS(ptn5150_pm_ops, NULL, ptn5150_resume); +static const struct of_device_id ptn5150_dt_match[] = { { .compatible ="nxp,ptn5150" }, { },
@@ -346,6 +359,7 @@ MODULE_DEVICE_TABLE(i2c, ptn5150_i2c_id);static struct i2c_driver ptn5150_i2c_driver = { .driver = { .name ="ptn5150" , + .pm =pm_sleep_ptr (&ptn5150_pm_ops), .of_match_table = ptn5150_dt_match, }, .probe = ptn5150_i2c_probe,
drivers/firmware/samsung/exynos-acpm-pmic.c +5 -5
@@ -77,7 +77,7 @@ static void acpm_pmic_init_read_cmd(u32 cmd[4], u8 type, u8 reg, u8 chan) cmd[3 ] =ktime_to_ms (ktime_get ()); } -int acpm_pmic_read_reg (const struct acpm_handle *handle, +int acpm_pmic_read_reg (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 *buf) {
@@ -107,7 +107,7 @@ static void acpm_pmic_init_bulk_read_cmd(u32 cmd[4], u8 type, u8 reg, u8 chan,FIELD_PREP (ACPM_PMIC_VALUE , count); } -int acpm_pmic_bulk_read (const struct acpm_handle *handle, +int acpm_pmic_bulk_read (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 count,u8 *buf) {
@@ -150,7 +150,7 @@ static void acpm_pmic_init_write_cmd(u32 cmd[4], u8 type, u8 reg, u8 chan, cmd[3 ] =ktime_to_ms (ktime_get ()); } -int acpm_pmic_write_reg (const struct acpm_handle *handle, +int acpm_pmic_write_reg (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 value) {
@@ -187,7 +187,7 @@ static void acpm_pmic_init_bulk_write_cmd(u32 cmd[4], u8 type, u8 reg, u8 chan, } } -int acpm_pmic_bulk_write (const struct acpm_handle *handle, +int acpm_pmic_bulk_write (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 count,const u8 *buf) {
@@ -220,7 +220,7 @@ static void acpm_pmic_init_update_cmd(u32 cmd[4], u8 type, u8 reg, u8 chan, cmd[3 ] =ktime_to_ms (ktime_get ()); } -int acpm_pmic_update_reg (const struct acpm_handle *handle, +int acpm_pmic_update_reg (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 value,u8 mask) {
drivers/firmware/samsung/exynos-acpm-pmic.h +5 -5
@@ -11,19 +11,19 @@struct acpm_handle ; -int acpm_pmic_read_reg (const struct acpm_handle *handle, +int acpm_pmic_read_reg (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 *buf); -int acpm_pmic_bulk_read (const struct acpm_handle *handle, +int acpm_pmic_bulk_read (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 count,u8 *buf); -int acpm_pmic_write_reg (const struct acpm_handle *handle, +int acpm_pmic_write_reg (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 value); -int acpm_pmic_bulk_write (const struct acpm_handle *handle, +int acpm_pmic_bulk_write (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 count,const u8 *buf); -int acpm_pmic_update_reg (const struct acpm_handle *handle, +int acpm_pmic_update_reg (struct acpm_handle *handle,unsigned int acpm_chan_id,u8 type,u8 reg,u8 chan,u8 value,u8 mask);#endif /* __EXYNOS_ACPM_PMIC_H__ */
drivers/firmware/samsung/exynos-acpm.c +9 -7
@@ -409,7 +409,7 @@ static int acpm_wait_for_message_response(struct acpm_chan *achan,* * Return: 0 on success, -errno otherwise. */ -int acpm_do_xfer (const struct acpm_handle *handle,const struct acpm_xfer *xfer) +int acpm_do_xfer (struct acpm_handle *handle,const struct acpm_xfer *xfer) {struct acpm_info *acpm =handle_to_acpm_info (handle);struct exynos_mbox_msg msg;
@@ -649,7 +649,7 @@ static int acpm_probe(struct platform_device *pdev)* acpm_handle_put() - release the handle acquired by acpm_get_by_phandle. * @handle: Handle acquired by acpm_get_by_phandle. */ -static void acpm_handle_put (const struct acpm_handle *handle) +static void acpm_handle_put (struct acpm_handle *handle) {struct acpm_info *acpm =handle_to_acpm_info (handle);struct device *dev = acpm->dev;
@@ -675,9 +675,11 @@ static void devm_acpm_release(struct device *dev, void *res)* @np: ACPM device tree node. * * Return: pointer to handle on success, ERR_PTR(-errno) otherwise. +* +* Note: handle CANNOT be pointer to const */ -static const struct acpm_handle *acpm_get_by_node (struct device *dev, -struct device_node *np) +static struct acpm_handle *acpm_get_by_node (struct device *dev, +struct device_node *np) {struct platform_device *pdev;struct device_link *link;
@@ -718,10 +720,10 @@ static const struct acpm_handle *acpm_get_by_node(struct device *dev,* * Return: pointer to handle on success, ERR_PTR(-errno) otherwise. */ -const struct acpm_handle *devm_acpm_get_by_node (struct device *dev, -struct device_node *np) +struct acpm_handle *devm_acpm_get_by_node (struct device *dev, +struct device_node *np) { -const struct acpm_handle **ptr, *handle; +struct acpm_handle **ptr, *handle; ptr =devres_alloc (devm_acpm_release,sizeof (*ptr),GFP_KERNEL );if (!ptr)
drivers/firmware/samsung/exynos-acpm.h +1 -1
@@ -17,7 +17,7 @@ struct acpm_xfer {struct acpm_handle ; -int acpm_do_xfer (const struct acpm_handle *handle, +int acpm_do_xfer (struct acpm_handle *handle,const struct acpm_xfer *xfer);#endif /* __EXYNOS_ACPM_H__ */
drivers/gpio/gpiolib-of.c +8 -1
@@ -1285,7 +1285,14 @@ int of_gpiochip_add(struct gpio_chip *chip)void of_gpiochip_remove (struct gpio_chip *chip) { -of_node_put (dev_of_node (&chip->gpiodev->dev)); +struct device_node *np =dev_of_node (&chip->gpiodev->dev); + +for_each_child_of_node_scoped (np, child) { +if (of_property_present (child,"gpio-hog" )) +of_node_clear_flag (child,OF_POPULATED ); + } + +of_node_put (np); }bool of_gpiochip_instance_match (struct gpio_chip *gc,unsigned int index)
drivers/hv/Kconfig +1 -1
@@ -9,7 +9,6 @@ config HYPERV select PARAVIRT select X86_HV_CALLBACK_VECTOR if X86 select OF_EARLY_FLATTREE if OF - select SYSFB if EFI && !HYPERV_VTL_MODE select IRQ_MSI_LIB if X86 help Select this option to run Linux as a Hyper-V client operating
@@ -61,6 +60,7 @@ config HYPERV_VMBUS tristate "Microsoft Hyper-V VMBus driver" depends on HYPERV default HYPERV + select SYSFB if EFI && !HYPERV_VTL_MODE help Select this option to enable Hyper-V Vmbus driver.
drivers/hwmon/corsair-psu.c +2 -2
@@ -805,13 +805,13 @@ static int corsairpsu_probe(struct hid_device *hdev, const struct hid_device_id ret =corsairpsu_init (priv);if (ret <0 ) {dev_err (&hdev->dev,"unable to initialize device (%d)\n" , ret); - goto fail_and_stop; + goto fail_and_close; } ret =corsairpsu_fwinfo (priv);if (ret <0 ) {dev_err (&hdev->dev,"unable to query firmware (%d)\n" , ret); - goto fail_and_stop; + goto fail_and_close; }corsairpsu_get_criticals (priv);
drivers/hwmon/ltc2992.c +33 -10
69 lines not on this page · raw message
drivers/hwmon/powerz.c +4 -1
@@ -6,6 +6,7 @@#include <linux/completion.h> #include <linux/device.h> +#include <linux/dma-mapping.h> #include <linux/hwmon.h> #include <linux/module.h> #include <linux/mutex.h>
@@ -33,7 +34,9 @@ struct powerz_sensor_data { } __packed;struct powerz_priv { -char transfer_buffer[64 ];/* first member to satisfy DMA alignment */ + __dma_from_device_group_begin(); +char transfer_buffer[64 ]; + __dma_from_device_group_end();struct mutex mutex;struct completion completion;struct urb *urb;
drivers/infiniband/hw/hns/hns_roce_qp.c +7 -0
@@ -1150,6 +1150,7 @@ static int hns_roce_create_qp_common(struct hns_roce_dev *hr_dev,struct hns_roce_ib_create_qp_resp resp = {};struct ib_device *ibdev = &hr_dev->ib_dev;struct hns_roce_ib_create_qp ucmd = {}; +unsigned long flags;int ret;mutex_init (&hr_qp->mutex);
@@ -1236,7 +1237,13 @@ static int hns_roce_create_qp_common(struct hns_roce_dev *hr_dev,return 0 ; err_flow_ctrl: +spin_lock_irqsave (&hr_dev->qp_list_lock, flags); +hns_roce_lock_cqs (init_attr->send_cq ?to_hr_cq (init_attr->send_cq) :NULL , + init_attr->recv_cq ?to_hr_cq (init_attr->recv_cq) :NULL );hns_roce_qp_remove (hr_dev, hr_qp); +hns_roce_unlock_cqs (init_attr->send_cq ?to_hr_cq (init_attr->send_cq) :NULL , + init_attr->recv_cq ?to_hr_cq (init_attr->recv_cq) :NULL ); +spin_unlock_irqrestore (&hr_dev->qp_list_lock, flags); err_store:free_qpc (hr_dev, hr_qp); err_qpc:
drivers/infiniband/hw/ionic/ionic_ibdev.c +1 -1
@@ -185,7 +185,7 @@ static ssize_t hca_type_show(struct device *device,struct ionic_ibdev *dev = rdma_device_to_drv_device(device, struct ionic_ibdev, ibdev); -return sysfs_emit (buf,"%s\n" , dev->ibdev.node_desc); +return sysfs_emit (buf,"%.64s\n" , dev->ibdev.node_desc); }static DEVICE_ATTR_RO (hca_type);
drivers/infiniband/hw/mana/cq.c +3 -2
@@ -144,8 +144,9 @@ int mana_ib_install_cq_cb(struct mana_ib_dev *mdev, struct mana_ib_cq *cq)if (cq->queue.id >= gc->max_num_cqs)return -EINVAL ; -/* Create CQ table entry */ -WARN_ON (gc->cq_table[cq->queue.id]); +/* Create CQ table entry, sharing a CQ between WQs is not supported */ +if (gc->cq_table[cq->queue.id]) +return -EINVAL ;if (cq->queue.kmem) gdma_cq = cq->queue.kmem;else
drivers/infiniband/hw/mana/qp.c +10 -6
@@ -21,6 +21,9 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev, gc =mdev_to_gc (dev); +if (rx_hash_key_len >sizeof (req->hashkey)) +return -EINVAL ; + req_buf_size =struct_size (req, indir_tab,MANA_INDIRECT_TABLE_DEF_SIZE ); req =kzalloc (req_buf_size,GFP_KERNEL );if (!req)
@@ -194,11 +197,8 @@ static int mana_ib_create_qp_rss(struct ib_qp *ibqp, struct ib_pd *pd, ret =mana_create_wq_obj (mpc, mpc->port_handle,GDMA_RQ , &wq_spec, &cq_spec, &wq->rx_object); -if (ret) { -/* Do cleanup starting with index i-1 */ - i--; +if (ret) goto fail; - }/* The GDMA regions are now owned by the WQ object */ wq->queue.gdma_region =GDMA_INVALID_DMA_REGION ;
@@ -218,8 +218,10 @@ static int mana_ib_create_qp_rss(struct ib_qp *ibqp, struct ib_pd *pd,/* Create CQ table entry */ ret =mana_ib_install_cq_cb (mdev, cq); -if (ret) +if (ret) { +mana_destroy_wq_obj (mpc,GDMA_RQ , wq->rx_object); goto fail; + } } resp.num_entries = i;
@@ -236,13 +238,15 @@ static int mana_ib_create_qp_rss(struct ib_qp *ibqp, struct ib_pd *pd,ibdev_dbg (&mdev->ib_dev,"Failed to copy to udata create rss-qp, %d\n" , ret); - goto fail; + goto err_disable_vport_rx; }kfree (mana_ind_table);return 0 ; +err_disable_vport_rx: +mana_disable_vport_rx (mpc); fail:while (i-- >0 ) { ibwq = ind_tbl->ind_tbl[i];
drivers/infiniband/hw/mlx4/srq.c +3 -1
@@ -193,13 +193,15 @@ int mlx4_ib_create_srq(struct ib_srq *ib_srq,if (udata)if (ib_copy_to_udata (udata, &srq->msrq.srqn,sizeof (__u32))) { err = -EFAULT ; - goto err_wrid; + goto err_srq; } init_attr->attr.max_wr = srq->msrq.max -1 ;return 0 ; +err_srq: +mlx4_srq_free (dev->dev, &srq->msrq); err_wrid:if (udata)mlx4_ib_db_unmap_user (ucontext, &srq->db);
drivers/infiniband/hw/mlx5/main.c +1 -0
@@ -3181,6 +3181,7 @@ int mlx5_ib_dev_res_srq_init(struct mlx5_ib_dev *dev)"Couldn't create SRQ 1 for res init, err=%pe\n" , s1);ib_destroy_srq (s0); + goto unlock; } devr->s0 = s0;
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +2 -2
@@ -620,9 +620,9 @@ static int ocrdma_copy_pd_uresp(struct ocrdma_dev *dev, struct ocrdma_pd *pd, ucopy_err:if (pd->dpp_enabled) -ocrdma_del_mmap (pd->uctx, dpp_page_addr,PAGE_SIZE ); +ocrdma_del_mmap (uctx, dpp_page_addr,PAGE_SIZE ); dpp_map_err: -ocrdma_del_mmap (pd->uctx, db_page_addr, db_page_size); +ocrdma_del_mmap (uctx, db_page_addr, db_page_size);return status; }
drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c +1 -1
@@ -322,7 +322,7 @@ int pvrdma_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata) uresp.qp_tab_size = vdev->dsr->caps.max_qp; ret =ib_copy_to_udata (udata, &uresp,sizeof (uresp));if (ret) { -pvrdma_uar_free (vdev, &context->uar); +/* pvrdma_dealloc_ucontext() also frees the UAR */ pvrdma_dealloc_ucontext (&context->ibucontext);return -EFAULT ; }
drivers/infiniband/sw/rxe/rxe_recv.c +11 -0
@@ -330,6 +330,17 @@ void rxe_rcv(struct sk_buff *skb) pkt->qp =NULL ; pkt->mask |= rxe_opcode[pkt->opcode].mask; +/* +* Unknown opcodes have a zero-initialized rxe_opcode[] entry, so +* both mask and length are 0. Reject them before any length math: +* rxe_icrc_hdr() would otherwise compute length - RXE_BTH_BYTES +* and pass the underflowed value to rxe_crc32(), producing an +* out-of-bounds read. +*/ +if (unlikely (!rxe_opcode[pkt->opcode].mask || + !rxe_opcode[pkt->opcode].length)) + goto drop; +if (unlikely (pkt->paylen <header_size (pkt) +bth_pad (pkt) +RXE_ICRC_SIZE )) goto drop;
drivers/infiniband/sw/rxe/rxe_resp.c +13 -1
@@ -526,7 +526,19 @@ static enum resp_states check_rkey(struct rxe_qp *qp, } skip_check_range: -if (pkt->mask & (RXE_WRITE_MASK |RXE_ATOMIC_WRITE_MASK )) { +if (pkt->mask &RXE_ATOMIC_WRITE_MASK ) { +/* IBA oA19-28: ATOMIC_WRITE payload is exactly 8 bytes. +* Reject any other length before the responder reads +* sizeof(u64) bytes from payload_addr(pkt); a shorter +* payload would read past the logical end of the packet +* into skb->head tailroom. +*/ +if (resid !=sizeof (u64) || pktlen !=sizeof (u64) || +bth_pad (pkt)) { + state =RESPST_ERR_LENGTH ; + goto err; + } + }else if (pkt->mask &RXE_WRITE_MASK ) {if (resid > mtu) {if (pktlen != mtu ||bth_pad (pkt)) { state =RESPST_ERR_LENGTH ;
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +7 -0
@@ -1236,6 +1236,13 @@ void arm_smmu_write_entry(struct arm_smmu_entry_writer *writer, __le64 *entry,__le64 unused_update[NUM_ENTRY_QWORDS ];u8 used_qword_diff; +/* +* Many of the entry structures have pointers to other structures that +* need to have their updates be visible before any writes of the entry +* happen. +*/ +dma_wmb (); + used_qword_diff =arm_smmu_entry_qword_diff (writer, entry, target, unused_update);if (hweight8 (used_qword_diff) ==1 ) {
drivers/iommu/intel/nested.c +5 -1
@@ -154,6 +154,7 @@ static int intel_nested_set_dev_pasid(struct iommu_domain *domain, {struct device_domain_info *info =dev_iommu_priv_get (dev);struct dmar_domain *dmar_domain =to_dmar_domain (domain); +struct iommu_domain *s2_domain = &dmar_domain->s2_domain->domain;struct intel_iommu *iommu = info->iommu;struct dev_pasid_info *dev_pasid;int ret;
@@ -161,10 +162,13 @@ static int intel_nested_set_dev_pasid(struct iommu_domain *domain,if (!pasid_supported (iommu) ||dev_is_real_dma_subdevice (dev))return -EOPNOTSUPP ; +if (s2_domain->dirty_ops) +return -EINVAL ; +if (context_copied (iommu, info->bus, info->devfn))return -EBUSY ; - ret =paging_domain_compatible (&dmar_domain->s2_domain->domain, dev); + ret =paging_domain_compatible (s2_domain, dev);if (ret)return ret;
drivers/iommu/iommufd/eventq.c +3 -2
@@ -187,9 +187,10 @@ static ssize_t iommufd_fault_fops_write(struct file *filep, const char __user *bmutex_lock (&fault->mutex);while (count > done) { - rc =copy_from_user (&response, buf + done, response_size); -if (rc) +if (copy_from_user (&response, buf + done, response_size)) { + rc = -EFAULT ;break ; + }static_assert ((int )IOMMUFD_PAGE_RESP_SUCCESS == (int )IOMMU_PAGE_RESP_SUCCESS );
drivers/iommu/iommufd/io_pagetable.c +10 -0
@@ -777,6 +777,16 @@ static int iopt_unmap_iova_range(struct io_pagetable *iopt, unsigned long start, unmapped_bytes += area_last - area_first +1 ;down_write (&iopt->iova_rwsem); + +/* +* After releasing the iova_rwsem concurrent allocation could +* place new areas at IOVAs we have already unmapped. Keep +* moving the start of the search forward to ignore the area +* already unmapped. +*/ +if (area_last >= last) +break ; + start = area_last +1 ; } out_unlock_iova:
drivers/md/dm-ioctl.c +5 -1
@@ -384,7 +384,7 @@ static void dm_hash_remove_all(bool keep_open_devices, bool mark_deferred, boolup_write (&_hash_lock); -if (dev_skipped) +if (dev_skipped && !only_deferred)DMWARN ("remove_all left %d open device(s)" , dev_skipped); }
@@ -1341,6 +1341,10 @@ static void retrieve_status(struct dm_table *table, used = param->data_start + (outptr - outbuf); outptr =align_ptr (outptr); +if (!outptr || outptr > outbuf + len) { + param->flags |=DM_BUFFER_FULL_FLAG ; +break ; + } spec->next = outptr - outbuf; }
drivers/md/dm-verity-fec.c +4 -4
@@ -657,7 +657,7 @@ int verity_fec_ctr(struct dm_verity *v) {struct dm_verity_fec *f = v->fec;struct dm_target *ti = v->ti; -u64 hash_blocks, fec_blocks; +u64 hash_blocks;int ret;if (!verity_fec_is_enabled (v)) {
@@ -720,7 +720,8 @@ int verity_fec_ctr(struct dm_verity *v)* it to be large enough. */ f->hash_blocks = f->blocks - v->data_blocks; -if (dm_bufio_get_device_size (v->bufio) < f->hash_blocks) { +if (dm_bufio_get_device_size (v->bufio) < + v->hash_start + f->hash_blocks) { ti->error ="Hash device is too small for " DM_VERITY_OPT_FEC_BLOCKS ;return -E2BIG ;
@@ -738,8 +739,7 @@ int verity_fec_ctr(struct dm_verity *v)dm_bufio_set_sector_offset (f->bufio, f->start << (v->data_dev_block_bits -SECTOR_SHIFT )); - fec_blocks =div64_u64 (f->rounds * f->roots, v->fec->roots <<SECTOR_SHIFT ); -if (dm_bufio_get_device_size (f->bufio) < fec_blocks) { +if (dm_bufio_get_device_size (f->bufio) < f->rounds * f->roots) { ti->error ="FEC device is too small" ;return -E2BIG ; }
drivers/md/persistent-data/dm-btree-remove.c +8 -0
@@ -490,12 +490,20 @@ static int rebalance_children(struct shadow_spine *s,if (le32_to_cpu (n->header.nr_entries) ==1 ) {struct dm_block *child; +int is_shared;dm_block_t b =value64 (n,0 ); + r =dm_tm_block_is_shared (info->tm, b, &is_shared); +if (r) +return r; + r =dm_tm_read_lock (info->tm, b, &btree_node_validator, &child);if (r)return r; +if (is_shared) +inc_children (info->tm,dm_block_data (child), vt); +memcpy (n,dm_block_data (child),dm_bm_block_size (dm_tm_get_bm (info->tm)));
drivers/md/raid10.c +2 -0
@@ -3856,6 +3856,8 @@ static int setup_geo(struct geom *geo, struct mddev *mddev, enum geo_type new) nc = layout &255 ; fc = (layout >>8 ) &255 ; fo = layout & (1 <<16 ); +if (!nc || !fc) +return -1 ; geo->raid_disks = disks; geo->near_copies = nc; geo->far_copies = fc;
drivers/mfd/sec-acpm.c +5 -5
@@ -217,7 +217,7 @@ static const struct regmap_config s2mpg10_regmap_config_meter = { };struct sec_pmic_acpm_shared_bus_context { -const struct acpm_handle *acpm; +struct acpm_handle *acpm;unsigned int acpm_chan_id;u8 speedy_channel; };
@@ -240,7 +240,7 @@ static int sec_pmic_acpm_bus_write(void *context, const void *data, size_t count) {struct sec_pmic_acpm_bus_context *ctx = context; -const struct acpm_handle *acpm = ctx->shared->acpm; +struct acpm_handle *acpm = ctx->shared->acpm;const struct acpm_pmic_ops *pmic_ops = &acpm->ops.pmic_ops;size_t val_count = count -BITS_TO_BYTES (ACPM_ADDR_BITS );const u8 *d = data;
@@ -260,7 +260,7 @@ static int sec_pmic_acpm_bus_read(void *context, const void *reg_buf, size_t reg void *val_buf, size_t val_size) {struct sec_pmic_acpm_bus_context *ctx = context; -const struct acpm_handle *acpm = ctx->shared->acpm; +struct acpm_handle *acpm = ctx->shared->acpm;const struct acpm_pmic_ops *pmic_ops = &acpm->ops.pmic_ops;const u8 *r = reg_buf;u8 reg;
@@ -279,7 +279,7 @@ static int sec_pmic_acpm_bus_reg_update_bits(void *context, unsigned int reg, un unsigned int val) {struct sec_pmic_acpm_bus_context *ctx = context; -const struct acpm_handle *acpm = ctx->shared->acpm; +struct acpm_handle *acpm = ctx->shared->acpm;const struct acpm_pmic_ops *pmic_ops = &acpm->ops.pmic_ops; return pmic_ops->update_reg(acpm, ctx->shared->acpm_chan_id, ctx->type, reg & 0xff,
@@ -335,7 +335,7 @@ static int sec_pmic_acpm_probe(struct platform_device *pdev)struct regmap *regmap_common, *regmap_pmic, *regmap;const struct sec_pmic_acpm_platform_data *pdata;struct sec_pmic_acpm_shared_bus_context *shared_ctx; -const struct acpm_handle *acpm; +struct acpm_handle *acpm;struct device *dev = &pdev->dev;int ret, irq;
drivers/mmc/core/card.h +11 -0
@@ -89,6 +89,7 @@ struct mmc_fixup {#define CID_MANFID_MICRON 0x13#define CID_MANFID_SAMSUNG 0x15#define CID_MANFID_APACER 0x27 +#define CID_MANFID_SANDISK_MMC 0x45#define CID_MANFID_SWISSBIT 0x5D#define CID_MANFID_KINGSTON 0x70#define CID_MANFID_HYNIX 0x90
@@ -305,4 +306,14 @@ static inline int mmc_card_no_uhs_ddr50_tuning(const struct mmc_card *c) return c->quirks & MMC_QUIRK_NO_UHS_DDR50_TUNING; } +static inline int mmc_card_broken_mdt (const struct mmc_card *c) +{ +return c->quirks &MMC_QUIRK_BROKEN_MDT ; +} + +static inline int mmc_card_fixed_secure_erase_trim_time (const struct mmc_card *c) +{ +return c->quirks &MMC_QUIRK_FIXED_SECURE_ERASE_TRIM_TIME ; +} +#endif
drivers/mmc/core/mmc.c +12 -0
@@ -671,7 +671,19 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd) card->ext_csd.enhanced_rpmb_supported = (card->ext_csd.rel_param &EXT_CSD_WR_REL_PARAM_EN_RPMB_REL_WR ); + +if (card->ext_csd.rev >=9 ) { +/* Adjust production date as per JEDEC JESD84-B51B September 2025 */ +if (card->cid.year <2023 ) + card->cid.year +=16 ; + }else { +/* Handle vendors with broken MDT reporting */ +if (mmc_card_broken_mdt (card) && card->cid.year >=2010 && + card->cid.year <=2012 ) + card->cid.year +=16 ; + } } + out:return err; }
drivers/mmc/core/queue.c +7 -2
@@ -184,8 +184,13 @@ static void mmc_queue_setup_discard(struct mmc_card *card,return ; lim->max_hw_discard_sectors = max_discard; -if (mmc_card_can_secure_erase_trim (card)) - lim->max_secure_erase_sectors = max_discard; +if (mmc_card_can_secure_erase_trim (card)) { +if (mmc_card_fixed_secure_erase_trim_time (card)) + lim->max_secure_erase_sectors =UINT_MAX >> card->erase_shift; +else + lim->max_secure_erase_sectors = max_discard; + } +if (mmc_card_can_trim (card) && card->erased_byte ==0 ) lim->max_write_zeroes_sectors = max_discard;
drivers/mmc/core/quirks.h +12 -0
@@ -153,6 +153,15 @@ static const struct mmc_fixup __maybe_unused mmc_blk_fixups[] = {MMC_FIXUP ("M62704" ,CID_MANFID_KINGSTON ,0x0100 , add_quirk_mmc,MMC_QUIRK_TRIM_BROKEN ), +/* +* On Some Kingston eMMCs, secure erase/trim time is independent +* of erase size, fixed at approximately 2 seconds. +*/ +MMC_FIXUP ("IY2964" ,CID_MANFID_KINGSTON ,0x0100 , add_quirk_mmc, +MMC_QUIRK_FIXED_SECURE_ERASE_TRIM_TIME ), +MMC_FIXUP ("IB2932" ,CID_MANFID_KINGSTON ,0x0100 , add_quirk_mmc, +MMC_QUIRK_FIXED_SECURE_ERASE_TRIM_TIME ), + END_FIXUP };
@@ -170,6 +179,9 @@ static const struct mmc_fixup __maybe_unused mmc_ext_csd_fixups[] = {MMC_FIXUP_EXT_CSD_REV (CID_NAME_ANY ,CID_MANFID_NUMONYX ,0x014e , add_quirk,MMC_QUIRK_BROKEN_HPI ,6 ), +MMC_FIXUP (CID_NAME_ANY ,CID_MANFID_SANDISK_MMC ,CID_OEMID_ANY , add_quirk_mmc, +MMC_QUIRK_BROKEN_MDT ), + END_FIXUP };
drivers/mtd/spi-nor/debugfs.c +3 -1
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 +#include <linux/array_size.h> #include <linux/debugfs.h> #include <linux/mtd/spi-nor.h> #include <linux/spi/spi.h>
@@ -92,7 +93,8 @@ static int spi_nor_params_show(struct seq_file *s, void *data)seq_printf (s,"address nbytes\t%u\n" , nor->addr_nbytes);seq_puts (s,"flags\t\t" ); -spi_nor_print_flags (s, nor->flags, snor_f_names,sizeof (snor_f_names)); +spi_nor_print_flags (s, nor->flags, snor_f_names, +ARRAY_SIZE (snor_f_names));seq_puts (s,"\n" );seq_puts (s,"\nopcodes\n" );
drivers/net/ethernet/ibm/ibmveth.c +22 -0
@@ -1756,6 +1756,27 @@ static int ibmveth_set_mac_addr(struct net_device *dev, void *p)return 0 ; } +static netdev_features_t ibmveth_features_check (struct sk_buff *skb, +struct net_device *dev, +netdev_features_t features) +{ +/* Some physical adapters do not support segmentation offload with +* MSS < 224. Disable GSO for such packets to avoid adapter freeze. +* Note: Single-segment packets (gso_segs == 1) don't need this check +* as they bypass the LSO path and are transmitted without segmentation. +*/ +if (skb_is_gso (skb)) { +if (skb_shinfo (skb)->gso_size <IBMVETH_MIN_LSO_MSS ) { +netdev_warn_once (dev, +"MSS %u too small for LSO, disabling GSO\n" , +skb_shinfo (skb)->gso_size); + features &= ~NETIF_F_GSO_MASK ; + } + } + +return vlan_features_check (skb, features); +} +static const struct net_device_ops ibmveth_netdev_ops = { .ndo_open = ibmveth_open, .ndo_stop = ibmveth_close,
@@ -1767,6 +1788,7 @@ static const struct net_device_ops ibmveth_netdev_ops = { .ndo_set_features = ibmveth_set_features, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = ibmveth_set_mac_addr, + .ndo_features_check = ibmveth_features_check,#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = ibmveth_poll_controller,#endif
drivers/net/ethernet/ibm/ibmveth.h +1 -0
@@ -37,6 +37,7 @@#define IBMVETH_ILLAN_IPV4_TCP_CSUM 0x0000000000000002UL#define IBMVETH_ILLAN_ACTIVE_TRUNK 0x0000000000000001UL +#define IBMVETH_MIN_LSO_MSS 224/* Minimum MSS for LSO */ /* hcall macros */ #define h_register_logical_lan (ua, buflst, rxq, fltlst, mac) \ plpar_hcall_norets(H_REGISTER_LOGICAL_LAN, ua, buflst, rxq, fltlst, mac)
drivers/net/ethernet/intel/ice/ice_sf_eth.c +2 -0
@@ -305,6 +305,8 @@ ice_sf_eth_activate(struct ice_dynamic_port *dyn_port, aux_dev_uninit:auxiliary_device_uninit (&sf_dev->adev); +return err; + sf_dev_free:kfree (sf_dev); xa_erase:
drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_rx.c +34 -2
@@ -409,10 +409,17 @@ static int __octep_vf_oq_process_rx(struct octep_vf_device *oct, data_offset =OCTEP_VF_OQ_RESP_HW_SIZE ; rx_ol_flags =0 ; } - rx_bytes += buff_info->len; -if (buff_info->len <= oq->max_single_buffer_size) { skb =napi_build_skb ((void *)resp_hw,PAGE_SIZE ); +if (!skb) { + oq->stats->alloc_failures++; + desc_used++; + read_idx++; +if (read_idx == oq->max_count) + read_idx =0 ; +continue ; + } + rx_bytes += buff_info->len;skb_reserve (skb, data_offset);skb_put (skb, buff_info->len); read_idx++;
@@ -424,6 +431,31 @@ static int __octep_vf_oq_process_rx(struct octep_vf_device *oct,u16 data_len; skb =napi_build_skb ((void *)resp_hw,PAGE_SIZE ); +if (!skb) { + oq->stats->alloc_failures++; + desc_used++; + read_idx++; +if (read_idx == oq->max_count) + read_idx =0 ; + data_len = buff_info->len - oq->max_single_buffer_size; +while (data_len) { +dma_unmap_page (oq->dev, oq->desc_ring[read_idx].buffer_ptr, +PAGE_SIZE ,DMA_FROM_DEVICE ); + buff_info = (struct octep_vf_rx_buffer *) + &oq->buff_info[read_idx]; + buff_info->page =NULL ; +if (data_len < oq->buffer_size) + data_len =0 ; +else + data_len -= oq->buffer_size; + desc_used++; + read_idx++; +if (read_idx == oq->max_count) + read_idx =0 ; + } +continue ; + } + rx_bytes += buff_info->len;skb_reserve (skb, data_offset);/* Head fragment includes response header(s); * subsequent fragments contains only data.
drivers/net/ethernet/mellanox/mlx4/srq.c +7 -6
@@ -44,13 +44,14 @@ void mlx4_srq_event(struct mlx4_dev *dev, u32 srqn, int event_type) {struct mlx4_srq_table *srq_table = &mlx4_priv (dev)->srq_table;struct mlx4_srq *srq; +unsigned long flags; -rcu_read_lock (); +spin_lock_irqsave (&srq_table->lock, flags); srq =radix_tree_lookup (&srq_table->tree, srqn & (dev->caps.num_srqs -1 )); -rcu_read_unlock (); -if (srq) -refcount_inc (&srq->refcount); -else { +if (!srq || !refcount_inc_not_zero (&srq->refcount)) + srq =NULL ; +spin_unlock_irqrestore (&srq_table->lock, flags); +if (!srq) {mlx4_warn (dev,"Async event for bogus SRQ %08x\n" , srqn);return ; }
@@ -203,8 +204,8 @@ int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, u32 cqn, u16 xrcd,if (err) goto err_radix; -refcount_set (&srq->refcount,1 );init_completion (&srq->free); +refcount_set_release (&srq->refcount,1 );return 0 ;
drivers/net/ethernet/stmicro/stmmac/chain_mode.c +1 -1
@@ -47,7 +47,7 @@ static int jumbo_frm(struct stmmac_tx_queue *tx_q, struct sk_buff *skb,while (len !=0 ) { tx_q->tx_skbuff[entry] =NULL ; - entry =STMMAC_GET_ENTRY (entry, priv->dma_conf.dma_tx_size); + entry =STMMAC_NEXT_ENTRY (entry, priv->dma_conf.dma_tx_size); desc = tx_q->dma_tx + entry;if (len > bmax) {
drivers/net/ethernet/stmicro/stmmac/common.h +1 -1
@@ -60,7 +60,7 @@ static inline bool dwmac_is_xmac(enum dwmac_core_type core_type)#define DMA_MIN_RX_SIZE 64#define DMA_MAX_RX_SIZE 1024#define DMA_DEFAULT_RX_SIZE 512 -#define STMMAC_GET_ENTRY (x, size) ((x + 1) & (size - 1)) +#define STMMAC_NEXT_ENTRY (x, size) ((x + 1) & (size - 1))#undef FRAME_FILTER_DEBUG/* #define FRAME_FILTER_DEBUG */
drivers/net/ethernet/stmicro/stmmac/ring_mode.c +1 -1
@@ -51,7 +51,7 @@ static int jumbo_frm(struct stmmac_tx_queue *tx_q, struct sk_buff *skb,stmmac_prepare_tx_desc (priv, desc,1 , bmax, csum,STMMAC_RING_MODE ,0 , false, skb->len); tx_q->tx_skbuff[entry] =NULL ; - entry =STMMAC_GET_ENTRY (entry, priv->dma_conf.dma_tx_size); + entry =STMMAC_NEXT_ENTRY (entry, priv->dma_conf.dma_tx_size);if (priv->extend_desc) desc = (struct dma_desc *)(tx_q->dma_etx + entry);
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +28 -19
137 lines not on this page · raw message
drivers/net/ethernet/wangxun/libwx/wx_hw.c +5 -2
@@ -2427,8 +2427,11 @@ int wx_sw_init(struct wx *wx) wx->oem_svid = pdev->subsystem_vendor; wx->oem_ssid = pdev->subsystem_device; wx->bus.device =PCI_SLOT (pdev->devfn); - wx->bus.func =FIELD_GET (WX_CFG_PORT_ST_LANID , -rd32 (wx,WX_CFG_PORT_ST )); +if (pdev->is_virtfn) + wx->bus.func =PCI_FUNC (pdev->devfn); +else + wx->bus.func =FIELD_GET (WX_CFG_PORT_ST_LANID , +rd32 (wx,WX_CFG_PORT_ST ));if (wx->oem_svid ==PCI_VENDOR_ID_WANGXUN || pdev->is_virtfn) {
drivers/net/ethernet/wangxun/libwx/wx_vf_common.c +2 -2
@@ -98,8 +98,8 @@ int wx_request_msix_irqs_vf(struct wx *wx) } } - err =request_threaded_irq (wx->msix_entry->vector, wx_msix_misc_vf, -NULL ,IRQF_ONESHOT , netdev->name, wx); + err =request_irq (wx->msix_entry->vector, wx_msix_misc_vf, +0 , netdev->name, wx);if (err) {wx_err (wx,"request_irq for msix_other failed: %d\n" , err); goto free_queue_irqs;
drivers/net/wireless/ath/ath5k/base.c +2 -1
@@ -1738,7 +1738,8 @@ ath5k_tx_frame_completed(struct ath5k_hw *ah, struct sk_buff *skb, } info->status.rates[ts->ts_final_idx].count = ts->ts_final_retry; - info->status.rates[ts->ts_final_idx +1 ].idx =-1 ; +if (ts->ts_final_idx +1 <IEEE80211_TX_MAX_RATES ) + info->status.rates[ts->ts_final_idx +1 ].idx =-1 ;if (unlikely (ts->ts_status)) { ah->stats.ack_fail++;
drivers/net/wireless/broadcom/b43/xmit.c +2 -1
@@ -702,7 +702,8 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)* key index, but the ucode passed it slightly different. */ keyidx =b43_kidx_to_raw (dev, keyidx); -B43_WARN_ON (keyidx >=ARRAY_SIZE (dev->key)); +if (B43_WARN_ON (keyidx >=ARRAY_SIZE (dev->key))) + goto drop;if (dev->key[keyidx].algorithm !=B43_SEC_ALGO_NONE ) { wlhdr_len =ieee80211_hdrlen (fctl);
drivers/net/wireless/broadcom/b43legacy/xmit.c +2 -1
@@ -476,7 +476,8 @@ void b43legacy_rx(struct b43legacy_wldev *dev,* key index, but the ucode passed it slightly different. */ keyidx =b43legacy_kidx_to_raw (dev, keyidx); -B43legacy_WARN_ON (keyidx >= dev->max_nr_keys); +if (B43legacy_WARN_ON (keyidx >= dev->max_nr_keys)) + goto drop;if (dev->key[keyidx].algorithm != B43legacy_SEC_ALGO_NONE) {/* Remove PROTECTED flag to mark it as decrypted. */
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +4 -2
@@ -2476,8 +2476,9 @@ static void brcmf_sdio_bus_stop(struct device *dev)brcmf_dbg (TRACE ,"Enter\n" );if (bus->watchdog_tsk) { +get_task_struct (bus->watchdog_tsk);send_sig (SIGTERM , bus->watchdog_tsk,1 ); -kthread_stop (bus->watchdog_tsk); +kthread_stop_put (bus->watchdog_tsk); bus->watchdog_tsk =NULL ; }
@@ -4567,8 +4568,9 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus)if (bus) {/* Stop watchdog task */ if (bus->watchdog_tsk) { +get_task_struct (bus->watchdog_tsk);send_sig (SIGTERM , bus->watchdog_tsk,1 ); -kthread_stop (bus->watchdog_tsk); +kthread_stop_put (bus->watchdog_tsk); bus->watchdog_tsk =NULL ; }
drivers/net/wireless/mediatek/mt76/mt7921/main.c +4 -3
@@ -387,10 +387,11 @@ void mt7921_roc_work(struct work_struct *work) phy = (struct mt792x_phy *)container_of(work, struct mt792x_phy, roc_work); -if (!test_and_clear_bit (MT76_STATE_ROC , &phy->mt76->state)) -return ; -mt792x_mutex_acquire (phy->dev); +if (!test_and_clear_bit (MT76_STATE_ROC , &phy->mt76->state)) { +mt792x_mutex_release (phy->dev); +return ; + }ieee80211_iterate_active_interfaces (phy->mt76->hw,IEEE80211_IFACE_ITER_RESUME_ALL , mt7921_roc_iter, phy);
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +3 -0
@@ -1353,6 +1353,9 @@ int __mt7921_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2,u16 len =le16_to_cpu (rule->len);u16 offset = len +sizeof (*rule); +if (buf_len < offset) +break ; + pos += offset; buf_len -= offset; if (rule->alpha2[0] != alpha2[0] ||
drivers/net/wireless/mediatek/mt76/mt7925/mac.c +4 -2
@@ -881,8 +881,10 @@ static void mt7925_tx_check_aggr(struct ieee80211_sta *sta, struct sk_buff *skb,else mlink = &msta->deflink; -if (!test_and_set_bit (tid, &mlink->wcid.ampdu_state)) -ieee80211_start_tx_ba_session (sta, tid,0 ); +if (!test_and_set_bit (tid, &mlink->wcid.ampdu_state)) { +if (ieee80211_start_tx_ba_session (sta, tid,0 )) +clear_bit (tid, &mlink->wcid.ampdu_state); + } } static bool
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +2 -2
@@ -3324,7 +3324,6 @@ __mt7925_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2,u8 rsvd[64 ]; }__packed req = { .tag =cpu_to_le16 (0x3 ), - .len =cpu_to_le16 (sizeof (req) -4 ), .idx = idx, .env = env_cap,
@@ -3353,6 +3352,7 @@ __mt7925_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2,memcpy (req.type, rule->type,2 ); req.size =cpu_to_le16 (seg->len); + req.len =cpu_to_le16 (sizeof (req) + seg->len -4 ); dev->phy.clc_chan_conf = clc->ver ==1 ?0xff : rule->flag; skb = __mt76_mcu_msg_alloc(&dev->mt76, &req, le16_to_cpu(req.size) + sizeof(req),
@@ -3673,7 +3673,7 @@ mt7925_mcu_rate_txpower_band(struct mt76_phy *phy,memcpy (tx_power_tlv->alpha2, dev->alpha2,sizeof (dev->alpha2)); tx_power_tlv->n_chan = num_ch; tx_power_tlv->tag =cpu_to_le16 (0x1 ); - tx_power_tlv->len =cpu_to_le16 (sizeof (*tx_power_tlv)); + tx_power_tlv->len =cpu_to_le16 (msg_len);switch (band) {case NL80211_BAND_2GHZ :
drivers/net/wireless/rsi/rsi_common.h +2 -3
@@ -70,12 +70,11 @@ static inline int rsi_create_kthread(struct rsi_common *common,return 0 ; } -static inline int rsi_kill_thread (struct rsi_thread *handle) +static inline void rsi_kill_thread (struct rsi_thread *handle) {atomic_inc (&handle->thread_done);rsi_set_event (&handle->event); - -return kthread_stop (handle->task); +wait_for_completion (&handle->completion); }void rsi_mac80211_detach (struct rsi_hw *hw);
drivers/net/wwan/t7xx/t7xx_modem_ops.c +17 -3
@@ -457,8 +457,20 @@ static int t7xx_parse_host_rt_data(struct t7xx_fsm_ctl *ctl, struct t7xx_sys_inf offset =sizeof (struct feature_query );for (i =0 ; i <FEATURE_COUNT && offset < data_length; i++) { +size_t remaining = data_length - offset; +size_t feat_data_len, feat_total; + +if (remaining <sizeof (*rt_feature)) +break ; + rt_feature = data + offset; - offset +=sizeof (*rt_feature) +le32_to_cpu (rt_feature->data_len); + feat_data_len =le32_to_cpu (rt_feature->data_len); + +if (feat_data_len > remaining -sizeof (*rt_feature)) +break ; + + feat_total =sizeof (*rt_feature) + feat_data_len; + offset += feat_total; ft_spt_cfg =FIELD_GET (FEATURE_MSK , core->feature_set[i]);if (ft_spt_cfg !=MTK_FEATURE_MUST_BE_SUPPORTED )
@@ -468,8 +480,10 @@ static int t7xx_parse_host_rt_data(struct t7xx_fsm_ctl *ctl, struct t7xx_sys_infif (ft_spt_st !=MTK_FEATURE_MUST_BE_SUPPORTED )return -EINVAL ; -if (i ==RT_ID_MD_PORT_ENUM || i ==RT_ID_AP_PORT_ENUM ) -t7xx_port_enum_msg_handler (ctl->md, rt_feature->data); +if (i ==RT_ID_MD_PORT_ENUM || i ==RT_ID_AP_PORT_ENUM ) { +t7xx_port_enum_msg_handler (ctl->md, rt_feature->data, + feat_data_len); + } }return 0 ;
drivers/net/wwan/t7xx/t7xx_port_ctrl_msg.c +16 -2
@@ -117,6 +117,7 @@ static int fsm_ee_message_handler(struct t7xx_port *port, struct t7xx_fsm_ctl *c* t7xx_port_enum_msg_handler() - Parse the port enumeration message to create/remove nodes. * @md: Modem context. * @msg: Message. +* @msg_len: Length of @msg in bytes. * * Used to control create/remove device node. *
@@ -124,12 +125,18 @@ static int fsm_ee_message_handler(struct t7xx_port *port, struct t7xx_fsm_ctl *c* * 0 - Success. * * -EFAULT - Message check failure. */ -int t7xx_port_enum_msg_handler (struct t7xx_modem *md,void *msg) +int t7xx_port_enum_msg_handler (struct t7xx_modem *md,void *msg,size_t msg_len) {struct device *dev = &md->t7xx_dev->pdev->dev;unsigned int version, port_count, i;struct port_msg *port_msg = msg; +if (msg_len <sizeof (*port_msg)) { +dev_err (dev,"Port enum msg too short for header: need %zu, have %zu\n" , +sizeof (*port_msg), msg_len); +return -EINVAL ; + } + version =FIELD_GET (PORT_MSG_VERSION ,le32_to_cpu (port_msg->info)); if (version != PORT_ENUM_VER || le32_to_cpu(port_msg->head_pattern) != PORT_ENUM_HEAD_PATTERN ||
@@ -141,6 +148,13 @@ int t7xx_port_enum_msg_handler(struct t7xx_modem *md, void *msg) } port_count =FIELD_GET (PORT_MSG_PRT_CNT ,le32_to_cpu (port_msg->info)); + +if (msg_len <struct_size (port_msg, data, port_count)) { +dev_err (dev,"Port enum msg too short: need %zu, have %zu\n" , +struct_size (port_msg, data, port_count), msg_len); +return -EINVAL ; + } +for (i =0 ; i < port_count; i++) {u32 port_info =le32_to_cpu (port_msg->data[i]);unsigned int ch_id;
@@ -191,7 +205,7 @@ static int control_msg_handler(struct t7xx_port *port, struct sk_buff *skb)case CTL_ID_PORT_ENUM :skb_pull (skb,sizeof (*ctrl_msg_h)); - ret =t7xx_port_enum_msg_handler (ctl->md, (struct port_msg *)skb->data); + ret =t7xx_port_enum_msg_handler (ctl->md, (struct port_msg *)skb->data, skb->len);if (!ret) ret =port_ctl_send_msg_to_md (port,CTL_ID_PORT_ENUM ,0 );else
drivers/net/wwan/t7xx/t7xx_port_proxy.h +1 -1
@@ -103,7 +103,7 @@ void t7xx_port_proxy_reset(struct port_proxy *port_prox);void t7xx_port_proxy_uninit (struct port_proxy *port_prox);int t7xx_port_proxy_init (struct t7xx_modem *md);void t7xx_port_proxy_md_status_notify (struct port_proxy *port_prox,unsigned int state); -int t7xx_port_enum_msg_handler (struct t7xx_modem *md,void *msg); +int t7xx_port_enum_msg_handler (struct t7xx_modem *md,void *msg,size_t msg_len);int t7xx_port_proxy_chl_enable_disable (struct port_proxy *port_prox,unsigned int ch_id,bool en_flag);void t7xx_port_proxy_set_cfg (struct t7xx_modem *md,enum port_cfg_id cfg_id);
drivers/nvme/host/apple.c +1 -5
@@ -1267,11 +1267,7 @@ static int apple_nvme_get_address(struct nvme_ctrl *ctrl, char *buf, int size)static void apple_nvme_free_ctrl (struct nvme_ctrl *ctrl) { -struct apple_nvme *anv =ctrl_to_apple_nvme (ctrl); - -if (anv->ctrl.admin_q) -blk_put_queue (anv->ctrl.admin_q); -put_device (anv->dev); +put_device (ctrl->dev); }static const struct nvme_ctrl_ops nvme_ctrl_ops = {
drivers/nvme/target/core.c +1 -1
@@ -1746,7 +1746,7 @@ static void nvmet_ctrl_free(struct kref *ref)nvmet_stop_keep_alive_timer (ctrl); -flush_work (&ctrl->async_event_work); +cancel_work_sync (&ctrl->async_event_work);cancel_work_sync (&ctrl->fatal_err_work);nvmet_destroy_auth (ctrl);
drivers/nvme/target/tcp.c +26 -0
@@ -398,6 +398,19 @@ static void nvmet_tcp_build_pdu_iovec(struct nvmet_tcp_cmd *cmd)static void nvmet_tcp_fatal_error (struct nvmet_tcp_queue *queue) { +/* +* Keep rcv_state at RECV_ERR even for the internal -ESHUTDOWN path. +* nvmet_tcp_handle_icreq() can return -ESHUTDOWN after the ICReq has +* already been consumed and queue teardown has started. +* +* If nvmet_tcp_data_ready() or nvmet_tcp_write_space() queues +* nvmet_tcp_io_work() again before nvmet_tcp_release_queue_work() +* cancels it, the queue must not keep that old receive state. +* Otherwise the next nvmet_tcp_io_work() run can reach +* nvmet_tcp_done_recv_pdu() and try to handle the same ICReq again. +* +* That is why queue->rcv_state needs to be updated before we return. +*/ queue->rcv_state =NVMET_TCP_RECV_ERR ;if (queue->nvme_sq.ctrl)nvmet_ctrl_fatal_error (queue->nvme_sq.ctrl);
@@ -923,11 +936,24 @@ static int nvmet_tcp_handle_icreq(struct nvmet_tcp_queue *queue) iov.iov_len =sizeof (*icresp); ret =kernel_sendmsg (queue->sock, &msg, &iov,1 , iov.iov_len);if (ret <0 ) { +spin_lock_bh (&queue->state_lock); +if (queue->state ==NVMET_TCP_Q_DISCONNECTING ) { +spin_unlock_bh (&queue->state_lock); +return -ESHUTDOWN ; + } queue->state =NVMET_TCP_Q_FAILED ; +spin_unlock_bh (&queue->state_lock);return ret;/* queue removal will cleanup */ } +spin_lock_bh (&queue->state_lock); +if (queue->state ==NVMET_TCP_Q_DISCONNECTING ) { +spin_unlock_bh (&queue->state_lock); +/* Tell nvmet_tcp_socket_error() teardown is in progress. */ +return -ESHUTDOWN ; + } queue->state =NVMET_TCP_Q_LIVE ; +spin_unlock_bh (&queue->state_lock);nvmet_prepare_receive_pdu (queue);return 0 ; }
drivers/parisc/lasi.c +8 -4
@@ -193,8 +193,7 @@ static int __init lasi_init_chip(struct parisc_device *dev) ret =request_irq (lasi->gsc_irq.irq, gsc_asic_intr,0 ,"lasi" , lasi);if (ret <0 ) { -kfree (lasi); -return ret; + goto err_free; }/* enable IRQ's for devices below LASI */
@@ -203,8 +202,7 @@ static int __init lasi_init_chip(struct parisc_device *dev)/* Done init'ing, register this driver */ ret =gsc_common_setup (dev, lasi);if (ret) { -kfree (lasi); -return ret; + goto err_irq; }gsc_fixup_irqs (dev, lasi, lasi_choose_irq);
@@ -214,6 +212,12 @@ static int __init lasi_init_chip(struct parisc_device *dev) SYS_OFF_PRIO_DEFAULT, lasi_power_off, lasi);return ret; + +err_irq: +free_irq (lasi->gsc_irq.irq, lasi); +err_free: +kfree (lasi); +return ret; }static struct parisc_device_id lasi_tbl[]__initdata = {
drivers/pci/pci.c +3 -4
@@ -2272,10 +2272,9 @@ EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state);#ifdef CONFIG_PCIEAER void pcie_clear_device_status (struct pci_dev *dev) { -u16 sta; - -pcie_capability_read_word (dev,PCI_EXP_DEVSTA , &sta); -pcie_capability_write_word (dev,PCI_EXP_DEVSTA , sta); +pcie_capability_write_word (dev,PCI_EXP_DEVSTA , +PCI_EXP_DEVSTA_CED |PCI_EXP_DEVSTA_NFED | +PCI_EXP_DEVSTA_FED |PCI_EXP_DEVSTA_URD ); }#endif
drivers/pci/pcie/aer.c +0 -2
@@ -1034,8 +1034,6 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info)* 3) There are multiple errors and prior ID comparing fails; * We check AER status registers to find possible reporter. */ -if (atomic_read (&dev->enable_cnt) ==0 ) -return false;/* Check if AER is enabled */ pcie_capability_read_word (dev,PCI_EXP_DEVCTL , ®16);
drivers/pci/pcie/aspm.c +12 -5
@@ -706,22 +706,29 @@ static void aspm_calc_l12_info(struct pcie_link_state *link, }/* Program T_POWER_ON times in both ports */ -pci_write_config_dword (parent, parent->l1ss +PCI_L1SS_CTL2 , ctl2); -pci_write_config_dword (child, child->l1ss +PCI_L1SS_CTL2 , ctl2); +pci_clear_and_set_config_dword (parent, parent->l1ss +PCI_L1SS_CTL2 , +PCI_L1SS_CTL2_T_PWR_ON_VALUE | +PCI_L1SS_CTL2_T_PWR_ON_SCALE , ctl2); +pci_clear_and_set_config_dword (child, child->l1ss +PCI_L1SS_CTL2 , +PCI_L1SS_CTL2_T_PWR_ON_VALUE | +PCI_L1SS_CTL2_T_PWR_ON_SCALE , ctl2);/* Program Common_Mode_Restore_Time in upstream device */ pci_clear_and_set_config_dword (parent, parent->l1ss +PCI_L1SS_CTL1 , -PCI_L1SS_CTL1_CM_RESTORE_TIME , ctl1); +PCI_L1SS_CTL1_CM_RESTORE_TIME , + ctl1 &PCI_L1SS_CTL1_CM_RESTORE_TIME );/* Program LTR_L1.2_THRESHOLD time in both ports */ pci_clear_and_set_config_dword (parent, parent->l1ss +PCI_L1SS_CTL1 ,PCI_L1SS_CTL1_LTR_L12_TH_VALUE |PCI_L1SS_CTL1_LTR_L12_TH_SCALE , - ctl1); + ctl1 & (PCI_L1SS_CTL1_LTR_L12_TH_VALUE | +PCI_L1SS_CTL1_LTR_L12_TH_SCALE ));pci_clear_and_set_config_dword (child, child->l1ss +PCI_L1SS_CTL1 ,PCI_L1SS_CTL1_LTR_L12_TH_VALUE |PCI_L1SS_CTL1_LTR_L12_TH_SCALE , - ctl1); + ctl1 & (PCI_L1SS_CTL1_LTR_L12_TH_VALUE | +PCI_L1SS_CTL1_LTR_L12_TH_SCALE ));if (pl1_2_enables || cl1_2_enables) { pci_clear_and_set_config_dword(parent,
drivers/pci/setup-res.c +2 -0
@@ -102,6 +102,7 @@ static void pci_std_update_resource(struct pci_dev *dev, int resno) }pci_write_config_dword (dev, reg, new); + dev->saved_config_space[reg /4 ] = new;pci_read_config_dword (dev, reg, &check);if ((new ^ check) & mask) {
@@ -112,6 +113,7 @@ static void pci_std_update_resource(struct pci_dev *dev, int resno)if (res->flags &IORESOURCE_MEM_64 ) { new = region.start >>16 >>16 ;pci_write_config_dword (dev, reg +4 , new); + dev->saved_config_space[(reg +4 ) /4 ] = new;pci_read_config_dword (dev, reg +4 , &check);if (check != new) { pci_err(dev, "%s: error updating (high %#010x != %#010x)\n",
drivers/platform/chrome/cros_typec_altmode.c +1 -0
@@ -359,6 +359,7 @@ cros_typec_register_thunderbolt(struct cros_typec_port *port, }INIT_WORK (&adata->work, cros_typec_altmode_work); +mutex_init (&adata->lock); adata->alt = alt; adata->port = port; adata->ap_mode_entry = true;
drivers/pmdomain/core.c +9 -1
@@ -3074,6 +3074,7 @@ static const struct bus_type genpd_bus_type = {static void genpd_dev_pm_detach (struct device *dev,bool power_off) {struct generic_pm_domain *pd; +bool is_virt_dev;unsigned int i;int ret =0 ;
@@ -3083,6 +3084,13 @@ static void genpd_dev_pm_detach(struct device *dev, bool power_off)dev_dbg (dev,"removing from PM domain %s\n" , pd->name); +/* Check if the device was created by genpd at attach. */ + is_virt_dev = dev->bus == &genpd_bus_type; + +/* Disable runtime PM if we enabled it at attach. */ +if (is_virt_dev) +pm_runtime_disable (dev); +/* Drop the default performance state */ if (dev_gpd_data (dev)->default_pstate) {dev_pm_genpd_set_performance_state (dev,0 );
@@ -3108,7 +3116,7 @@ static void genpd_dev_pm_detach(struct device *dev, bool power_off)genpd_queue_power_off_work (pd);/* Unregister the device if it was created by genpd. */ -if (dev->bus == &genpd_bus_type) +if (is_virt_dev)device_unregister (dev); }
drivers/pmdomain/mediatek/mtk-pm-domains.c +7 -3
@@ -757,6 +757,7 @@ static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *sstruct device_node *node, *smi_np;int num_regmaps =0 , i, j;struct regmap *regmap[3 ]; +int ret =0 ;/* * Legacy code retrieves a maximum of three bus protection handles:
@@ -807,11 +808,14 @@ static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *sif (node) { regmap[2 ] =syscon_regmap_lookup_by_phandle (node,"mediatek,infracfg-nao" ); num_regmaps++; -of_node_put (node); -if (IS_ERR (regmap[2 ])) -return dev_err_probe (dev,PTR_ERR (regmap[2 ]), +if (IS_ERR (regmap[2 ])) { + ret =dev_err_probe (dev,PTR_ERR (regmap[2 ]),"%pOF: failed to get infracfg regmap\n" , node); +of_node_put (node); +return ret; + } +of_node_put (node); }else { regmap[2 ] =NULL ; }
drivers/power/supply/max17042_battery.c +1 -1
@@ -201,7 +201,7 @@ static int max17042_get_battery_health(struct max17042_chip *chip, int *health) goto out; } -if (vbatt > chip->pdata->vmax +MAX17042_VMAX_TOLERANCE ) { +if (vbatt >size_add (chip->pdata->vmax,MAX17042_VMAX_TOLERANCE )) { *health =POWER_SUPPLY_HEALTH_OVERVOLTAGE ; goto out; }
drivers/scsi/mpt3sas/mpt3sas_scsih.c +13 -1
@@ -2681,8 +2681,20 @@ scsih_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim) pcie_device->enclosure_level, pcie_device->connector_name); +/* +* The HBA firmware passes the NVMe drive's MDTS +* (Maximum Data Transfer Size) up to the driver. However, +* the driver hardcodes a 4K buffer size for the PRP list, +* accommodating at most 512 entries. This strictly limits +* the maximum supported NVMe I/O transfer to 2 MiB. +* +* Cap max_hw_sectors to the smaller of the drive's reported +* MDTS or the 2 MiB driver limit to prevent kernel oopses. +*/ + lim->max_hw_sectors =SZ_2M >>SECTOR_SHIFT ;if (pcie_device->nvme_mdts) - lim->max_hw_sectors = pcie_device->nvme_mdts /512 ; + lim->max_hw_sectors =min (lim->max_hw_sectors, + pcie_device->nvme_mdts >>SECTOR_SHIFT );pcie_device_put (pcie_device);spin_unlock_irqrestore (&ioc->pcie_device_lock, flags);
drivers/spi/spi-microchip-core-qspi.c +83 -20
54 lines not on this page · raw message
drivers/video/fbdev/core/fb_defio.c +142 -36
178 lines not on this page · raw message
fs/erofs/decompressor.c +47 -39
86 lines not on this page · raw message
fs/f2fs/node.c +49 -44
93 lines not on this page · raw message
fs/hfsplus/bfind.c +51 -0
51 lines not on this page · raw message
fs/smb/server/connection.c +38 -8
46 lines not on this page · raw message
fs/smb/server/smbacl.c +52 -14
66 lines not on this page · raw message
include/linux/firmware/samsung/exynos-acpm-protocol.h +12 -17
Lines of this file are not shown. View the raw message.
net/key/af_key.c +34 -18
52 lines not on this page · raw message
net/mptcp/pm.c +42 -20
62 lines not on this page · raw message
net/psp/psp_main.c +31 -11
42 lines not on this page · raw message
rust/pin-init/src/macros.rs +54 -37
91 lines not on this page · raw message
security/selinux/selinuxfs.c +27 -142
169 lines not on this page · raw message
security/selinux/ss/services.c +0 -125
125 lines not on this page · raw message
sound/hda/codecs/side-codecs/cs35l56_hda.c +14 -5
Lines of this file are not shown. View the raw message.
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_lib.sh +10 -6
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/pm_netlink.sh +13 -7
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.