Linux 6.12.88
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.12.88 kernel.
All users of the 6.12 kernel series must upgrade.
The updated 6.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.12.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
------------
Makefile | 2 arch/arm64/include/asm/kvm_host.h | 2 arch/arm64/kvm/arm.c | 5 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/svm.c | 1 arch/s390/kernel/debug.c | 5 arch/x86/include/asm/msr-index.h | 3 arch/x86/kernel/cpu/amd.c | 3 arch/x86/kernel/shstk.c | 45 ++-- arch/x86/kvm/hyperv.c | 2 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 block/blk.h | 2 drivers/acpi/cppc_acpi.c | 6 drivers/acpi/power.c | 2 drivers/acpi/scan.c | 2 drivers/acpi/video_detect.c | 16 + 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/nx/nx-842.c | 8 drivers/extcon/extcon-ptn5150.c | 14 + drivers/gpio/gpiolib-of.c | 9 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/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/amd/amd_iommu_types.h | 2 drivers/iommu/amd/init.c | 2 drivers/iommu/amd/iommu.c | 18 + drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 7 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/mmc/core/card.h | 5 drivers/mmc/core/queue.c | 9 drivers/mmc/core/quirks.h | 9 drivers/mtd/nand/spi/winbond.c | 4 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/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/txgbe/txgbe_phy.c | 2 drivers/net/gtp.c | 2 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/pmdomain/core.c | 10 drivers/power/supply/max17042_battery.c | 2 drivers/spi/spi-microchip-core-qspi.c | 12 - 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/video/fbdev/core/fb_defio.c | 179 ++++++++++++---- drivers/video/fbdev/udlfb.c | 31 ++ fs/btrfs/space-info.c | 2 fs/erofs/compress.h | 2 fs/erofs/decompressor.c | 163 ++++++-------- fs/erofs/decompressor_deflate.c | 8 fs/erofs/decompressor_lzma.c | 8 fs/erofs/decompressor_zstd.c | 8 fs/erofs/zdata.c | 2 fs/f2fs/data.c | 28 ++ fs/f2fs/extent_cache.c | 17 - fs/f2fs/inode.c | 2 fs/f2fs/sysfs.c | 10 fs/file_table.c | 22 + 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/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 | 5 fs/tracefs/internal.h | 3 fs/udf/misc.c | 8 fs/udf/super.c | 4 include/linux/dma-mapping.h | 17 + include/linux/fb.h | 4 include/linux/fsnotify_backend.h | 1 include/linux/mm.h | 12 - include/linux/mm_types.h | 7 include/linux/mmap_lock.h | 61 +++-- include/linux/mmc/card.h | 1 include/linux/printk.h | 13 + include/trace/events/rxrpc.h | 1 include/video/udlfb.h | 1 kernel/bpf/arena.c | 19 + kernel/exit.c | 1 kernel/fork.c | 5 kernel/tracepoint.c | 2 lib/crypto/mpi/mpicoder.c | 2 lib/scatterlist.c | 8 mm/damon/sysfs-schemes.c | 12 - mm/init-mm.c | 2 net/bluetooth/hci_event.c | 27 ++ net/bluetooth/l2cap_core.c | 8 net/bluetooth/l2cap_sock.c | 6 net/ceph/auth.c | 2 net/ceph/mon_client.c | 2 net/core/flow_dissector.c | 13 - 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/protocol.c | 3 net/mptcp/sockopt.c | 12 - net/mptcp/subflow.c | 4 net/openvswitch/vport-netdev.c | 6 net/rds/message.c | 20 + net/rxrpc/call_event.c | 4 net/rxrpc/conn_event.c | 30 ++ net/sched/sch_red.c | 2 net/unix/af_unix.c | 3 net/vmw_vsock/hyperv_transport.c | 4 net/xfrm/xfrm_state.c | 12 - net/xfrm/xfrm_user.c | 1 security/selinux/hooks.c | 3 security/selinux/selinuxfs.c | 54 +--- sound/core/oss/pcm_oss.c | 29 ++ sound/drivers/aloop.c | 44 ++- sound/firewire/tascam/tascam-hwdep.c | 1 sound/soc/amd/yc/acp6x-mach.c | 14 + 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 + tools/testing/vma/vma.c | 4 tools/testing/vma/vma_internal.h | 4 221 files changed, 1795 insertions(+), 675 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
Amir Goldstein (1):
fs: prepare for adding LSM blob to backing_file
André Draszik (1):
power: supply: max17042: avoid overflow when determining health
Ankit Soni (1):
iommu/amd: serialize sequence allocation under concurrent TLB invalidations
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
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()
Christoph Hellwig (1):
dma-mapping: drop unneeded includes from dma-mapping.h
Conor Dooley (1):
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 (5):
ALSA: usb-audio: midi2: Restart output URBs on resume
ALSA: usb-audio: Fix UAC3 cluster descriptor size check
ALSA: firewire-tascam: Do not drop unread control events
ASoC: Intel: bytcr_wm5102: Fix MCLK leak on platform_clock_control error
ALSA: aloop: Fix peer runtime UAF during format-change stop
DaeMyung Kang (1):
ksmbd: rewrite stop_sessions() with restartable iteration
David Carlier (4):
eventfs: Hold eventfs_mutex and SRCU when remount walks events
octeon_ep_vf: add NULL check for napi_build_skb()
gtp: disable BH before calling udp_tunnel_xmit_skb()
tracepoint: balance regfunc() on func_add() failure in tracepoint_add_func()
David Howells (1):
rxrpc: Fix conn-level packet handling to unshare RESPONSE packets
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
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
Fuad Tabba (1):
KVM: arm64: Fix kvm_vcpu_initialized() macro parameter
Gang Yan (2):
mptcp: sockopt: set timestamp flags on subflow socket, not msk
mptcp: fix scheduling with atomic in timestamp sockopt
Gao Xiang (2):
erofs: move {in,out}pages into struct z_erofs_decompress_req
erofs: tidy up z_erofs_lz4_handle_overlap()
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.12.88
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
Hyunwoo Kim (2):
Bluetooth: L2CAP: Fix deadlock in l2cap_conn_del()
rxrpc: Also unshare DATA/RESPONSE packets when paged frags are present
Ilya Maximets (1):
openvswitch: vport: fix self-deadlock on release of tunnel ports
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 (7):
RDMA/hns: Fix unlocked call to hns_roce_qp_remove() 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: Validate rx_hash_key_len
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
Jeongjun Park (1):
wifi: rsi: fix kthread lifetime race between self-exit and external-stop
Jiawen Wu (2):
net: txgbe: fix RTNL assertion warning when remove module
net: libwx: fix VF illegal register access
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 (1):
net: rtnetlink: zero ifla_vf_broadcast to avoid stack infoleak in rtnl_fill_vfinfo
Leon Yen (1):
wifi: mt76: mt7921: fix a potential clc buffer length underflow
Linus Torvalds (1):
x86: shadow stacks: proper error handling for mmap lock
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
Matthieu Baerts (NGI0) (3):
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
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
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
Miquel Raynal (1):
mtd: spinand: winbond: Declare the QE bit on W25NxxJW
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
Paolo Bonzini (2):
KVM: SVM: check validity of VMCB controls when returning from SMM
KVM: x86: check for nEPT/nNPT in slow flush hypercalls
Pavitra Jha (1):
net: wwan: t7xx: validate port_count against message length in t7xx_port_enum_msg_handler
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 AMPDU state handling in mt7925_tx_check_aggr
wifi: mt76: mt7921: fix ROC abort flow interruption in mt7921_roc_work
wifi: mt76: mt7925: fix incorrect TLV length in CLC command
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
Raphael Zimmer (1):
libceph: Fix slab-out-of-bounds access in auth message processing
Rick Edgecombe (1):
x86/shstk: Prevent deadlock during shstk sigreturn
Ruijie Li (1):
xfrm: provide message size for XFRM_MSG_MAPPING
Russell King (Oracle) (2):
net: stmmac: avoid shadowing global buf_sz
net: stmmac: rename STMMAC_GET_ENTRY() -> STMMAC_NEXT_ENTRY()
Sam Edwards (1):
net: stmmac: Prevent NULL deref when RX memory exhausted
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
Seohyeon Maeng (1):
udf: fix partition descriptor append bookkeeping
SeongJae Park (1):
mm/damon/sysfs-schemes: protect memcg_path kfree() with damon_sysfs_lock
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 (2):
Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_new_connection_cb()
Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_state_change_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 (2):
selinux: shrink critical section in sel_write_load()
selinux: prune /sys/fs/selinux/disable
Suren Baghdasaryan (1):
mm: convert mm_lock_seq to a proper seqcount
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 (1):
fbdev: defio: Disconnect deferred I/O from the lifetime of struct fb_info
Thorsten Blum (5):
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
crypto: nx - fix bounce buffer leaks in nx842_crypto_{alloc,free}_ctx
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()
Ulf Hansson (1):
pmdomain: core: Fix detach procedure for virtual devices in genpd
Uros Bizjak (1):
iommu/amd: Use atomic64_inc_return() in iommu.c
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()
Xianglai Li (1):
LoongArch: KVM: Fix "unreliable stack" for kvm_exc_entry
Xu Yang (1):
extcon: ptn5150: handle pending IRQ events during system resume
Yilin Zhu (1):
ipv6: xfrm6: release dst on error in xfrm6_rcv_encap()
Yongpeng Yang (3):
f2fs: fix fiemap boundary handling when read extent cache is incomplete
f2fs: fix incorrect multidevice info in trace_f2fs_map_blocks()
f2fs: fix node_cnt race between extent node destroy and writeback
Zhengchuan Liang (1):
net: af_key: zero aligned sockaddr tail in PF_KEY exports
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()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 12 -SUBLEVEL = 87 +SUBLEVEL = 88 EXTRAVERSION = NAME = Baby Opossum Posse
arch/arm64/include/asm/kvm_host.h +1 -1
@@ -1390,7 +1390,7 @@ static inline bool __vcpu_has_feature(const struct kvm_arch *ka, int feature)#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/kvm/arm.c +5 -0
@@ -729,6 +729,11 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,int kvm_arch_vcpu_runnable (struct kvm_vcpu *v) {bool irq_lines = *vcpu_hcr (v) & (HCR_VI |HCR_VF ); + + 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/hyp/nvhe/setup.c +3 -3
@@ -307,15 +307,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_pcpu_fixmap ();if (ret) goto out; - ret =hyp_create_pcpu_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
@@ -167,7 +167,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
@@ -371,6 +371,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
@@ -112,7 +112,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
@@ -91,7 +91,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
@@ -133,6 +133,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/svm.c +1 -0
@@ -8,6 +8,7 @@#include <linux/mm.h> #include <linux/memblock.h> +#include <linux/mem_encrypt.h> #include <linux/cc_platform.h> #include <asm/machdep.h> #include <asm/svm.h>
arch/s390/kernel/debug.c +5 -0
@@ -1432,6 +1432,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/include/asm/msr-index.h +2 -1
@@ -734,9 +734,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
@@ -989,6 +989,9 @@ static void init_amd_zen2(struct cpuinfo_x86 *c)msr_clear_bit (MSR_AMD64_CPUID_FN_7 ,18 );pr_emerg ("RDSEED is not reliable on this platform; disabling.\n" ); } + +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/kernel/shstk.c +29 -16
86 lines not on this page · raw message
arch/x86/kvm/hyperv.c +1 -1
@@ -2038,7 +2038,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/mmu/mmu.c +14 -21
@@ -182,6 +182,8 @@ struct kmem_cache *mmu_page_header_cache;static struct percpu_counter kvm_total_used_mmu_pages;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;
@@ -1187,19 +1189,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.
@@ -2342,7 +2331,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);
@@ -2420,13 +2410,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
@@ -416,6 +416,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.
@@ -883,8 +892,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
@@ -4934,6 +4934,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
@@ -672,6 +672,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);
block/blk.h +2 -0
@@ -117,6 +117,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))
drivers/acpi/cppc_acpi.c +3 -3
@@ -349,7 +349,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)
@@ -511,13 +511,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
@@ -986,7 +986,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
@@ -1914,7 +1914,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/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
@@ -63,7 +63,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
@@ -3268,7 +3268,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),
@@ -3288,7 +3288,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/nx/nx-842.c +4 -4
@@ -112,8 +112,8 @@ int nx842_crypto_init(struct crypto_tfm *tfm, struct nx842_driver *driver) ctx->dbounce = (u8 *)__get_free_pages (GFP_KERNEL ,BOUNCE_BUFFER_ORDER );if (!ctx->wmem || !ctx->sbounce || !ctx->dbounce) {kfree (ctx->wmem); -free_page ((unsigned long )ctx->sbounce); -free_page ((unsigned long )ctx->dbounce); +free_pages ((unsigned long )ctx->sbounce,BOUNCE_BUFFER_ORDER ); +free_pages ((unsigned long )ctx->dbounce,BOUNCE_BUFFER_ORDER );return -ENOMEM ; }
@@ -126,8 +126,8 @@ void nx842_crypto_exit(struct crypto_tfm *tfm)struct nx842_crypto_ctx *ctx =crypto_tfm_ctx (tfm);kfree (ctx->wmem); -free_page ((unsigned long )ctx->sbounce); -free_page ((unsigned long )ctx->dbounce); +free_pages ((unsigned long )ctx->sbounce,BOUNCE_BUFFER_ORDER ); +free_pages ((unsigned long )ctx->dbounce,BOUNCE_BUFFER_ORDER ); }EXPORT_SYMBOL_GPL (nx842_crypto_exit);
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/gpio/gpiolib-of.c +8 -1
@@ -1196,5 +1196,12 @@ 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); }
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/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
@@ -3127,6 +3127,7 @@ int mlx5_ib_dev_res_srq_init(struct mlx5_ib_dev *dev) ret =PTR_ERR (s1);mlx5_ib_err (dev,"Couldn't create SRQ 1 for res init, err=%d\n" , ret);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
@@ -350,7 +350,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/amd/amd_iommu_types.h +1 -1
@@ -781,7 +781,7 @@ struct amd_iommu {u32 flags;volatile u64 *cmd_sem; -atomic64_t cmd_sem_val; +u64 cmd_sem_val;#ifdef CONFIG_AMD_IOMMU_DEBUGFS /* DebugFS Info */
drivers/iommu/amd/init.c +1 -1
@@ -1742,7 +1742,7 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h, iommu->pci_seg = pci_seg;raw_spin_lock_init (&iommu->lock); -atomic64_set (&iommu->cmd_sem_val,0 ); + iommu->cmd_sem_val =0 ;/* Add IOMMU to internal data structures */ list_add_tail (&iommu->list, &amd_iommu_list);
drivers/iommu/amd/iommu.c +12 -6
@@ -1252,6 +1252,12 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd)return iommu_queue_command_sync (iommu, cmd, true); } +static u64 get_cmdsem_val (struct amd_iommu *iommu) +{ +lockdep_assert_held (&iommu->lock); +return ++iommu->cmd_sem_val; +} +/* * This function queues a completion wait command into the command * buffer of an IOMMU
@@ -1266,11 +1272,11 @@ static int iommu_completion_wait(struct amd_iommu *iommu)if (!iommu->need_sync)return 0 ; - data =atomic64_add_return (1 , &iommu->cmd_sem_val); -build_completion_wait (&cmd, iommu, data); -raw_spin_lock_irqsave (&iommu->lock, flags); + data =get_cmdsem_val (iommu); +build_completion_wait (&cmd, iommu, data); + ret =__iommu_queue_command_sync (iommu, &cmd, false);raw_spin_unlock_irqrestore (&iommu->lock, flags);
@@ -2929,10 +2935,11 @@ static void iommu_flush_irt_and_complete(struct amd_iommu *iommu, u16 devid)return ;build_inv_irt (&cmd, devid); - data =atomic64_add_return (1 , &iommu->cmd_sem_val); -build_completion_wait (&cmd2, iommu, data);raw_spin_lock_irqsave (&iommu->lock, flags); + data =get_cmdsem_val (iommu); +build_completion_wait (&cmd2, iommu, data); + ret =__iommu_queue_command_sync (iommu, &cmd, true);if (ret) goto out_err;
@@ -2946,7 +2953,6 @@ static void iommu_flush_irt_and_complete(struct amd_iommu *iommu, u16 devid) out_err:raw_spin_unlock_irqrestore (&iommu->lock, flags); -return ; } static void set_dte_irq_entry(struct amd_iommu *iommu, u16 devid,
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +7 -0
@@ -1161,6 +1161,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/iommufd/io_pagetable.c +10 -0
@@ -724,6 +724,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
@@ -668,7 +668,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)) {
@@ -731,7 +731,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 ;
@@ -749,8 +750,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
@@ -3872,6 +3872,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/mmc/core/card.h +5 -0
@@ -300,4 +300,9 @@ 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_fixed_secure_erase_trim_time (const struct mmc_card *c) +{ +return c->quirks &MMC_QUIRK_FIXED_SECURE_ERASE_TRIM_TIME ; +} +#endif
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_can_secure_erase_trim (card)) - lim->max_secure_erase_sectors = max_discard; +if (mmc_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_can_trim (card) && card->erased_byte ==0 ) lim->max_write_zeroes_sectors = max_discard;
drivers/mmc/core/quirks.h +9 -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 };
drivers/mtd/nand/spi/winbond.c +2 -2
@@ -240,7 +240,7 @@ static const struct spinand_info winbond_spinand_table[] = { SPINAND_INFO_OP_VARIANTS(&read_cache_variants, &write_cache_variants, &update_cache_variants), - 0, + SPINAND_HAS_QE_BIT, SPINAND_ECCINFO(&w25n01jw_ooblayout, NULL)), SPINAND_INFO("W25N02JWZEIF", SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xbf, 0x22),
@@ -249,7 +249,7 @@ static const struct spinand_info winbond_spinand_table[] = { SPINAND_INFO_OP_VARIANTS(&read_cache_variants, &write_cache_variants, &update_cache_variants), - 0, + SPINAND_HAS_QE_BIT, SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL)), SPINAND_INFO("W25N512GW", SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xba, 0x20),
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
@@ -1608,6 +1608,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,
@@ -1619,6 +1640,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
@@ -36,6 +36,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/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
@@ -55,7 +55,7 @@#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 +26 -21
139 lines not on this page · raw message
drivers/net/ethernet/wangxun/libwx/wx_hw.c +5 -2
@@ -1943,8 +1943,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 ) { wx->subsystem_vendor_id = pdev->subsystem_vendor;
drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c +2 -0
@@ -622,7 +622,9 @@ int txgbe_init_phy(struct txgbe *txgbe)void txgbe_remove_phy (struct txgbe *txgbe) {if (txgbe->wx->media_type == sp_media_copper) { +rtnl_lock ();phylink_disconnect_phy (txgbe->wx->phylink); +rtnl_unlock ();phylink_destroy (txgbe->wx->phylink);return ; }
drivers/net/gtp.c +2 -0
@@ -2401,6 +2401,7 @@ static int gtp_genl_send_echo_req(struct sk_buff *skb, struct genl_info *info)return -ENODEV ; } +local_bh_disable (); udp_tunnel_xmit_skb(rt, sk, skb_to_send, fl4.saddr, fl4.daddr, fl4.flowi4_tos,
@@ -2410,6 +2411,7 @@ static int gtp_genl_send_echo_req(struct sk_buff *skb, struct genl_info *info) !net_eq (sock_net (sk),dev_net (gtp->dev)), false); +local_bh_enable ();return 0 ; }
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
@@ -2475,8 +2475,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 ; }
@@ -4557,8 +4558,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
@@ -381,10 +381,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
@@ -1344,6 +1344,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
@@ -885,8 +885,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
@@ -3261,7 +3261,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,
@@ -3289,6 +3288,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 ); skb =__mt76_mcu_msg_alloc (&dev->mt76, &req,le16_to_cpu (req.size) +sizeof (req),sizeof (req),GFP_KERNEL );
@@ -3595,7 +3595,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
@@ -456,8 +456,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 )
@@ -467,8 +479,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
@@ -102,7 +102,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
@@ -1210,11 +1210,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
@@ -1505,7 +1505,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
@@ -406,6 +406,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);
@@ -962,11 +975,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
@@ -2321,10 +2321,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
@@ -849,8 +849,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
@@ -704,22 +704,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/pmdomain/core.c +9 -1
@@ -2900,6 +2900,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 ;
@@ -2909,6 +2910,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 );
@@ -2934,7 +2942,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/power/supply/max17042_battery.c +1 -1
@@ -199,7 +199,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/spi/spi-microchip-core-qspi.c +8 -4
@@ -512,7 +512,7 @@ static int mchp_coreqspi_probe(struct platform_device *pdev) "unable to allocate host for QSPI controller\n"); qspi =spi_controller_get_devdata (ctlr); -platform_set_drvdata (pdev, qspi); +platform_set_drvdata (pdev, ctlr); qspi->regs =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (qspi->regs))
@@ -545,7 +545,7 @@ static int mchp_coreqspi_probe(struct platform_device *pdev)SPI_TX_DUAL |SPI_TX_QUAD ; ctlr->dev.of_node = np; - ret =devm_spi_register_controller (&pdev->dev, ctlr); + ret =spi_register_controller (ctlr);if (ret)return dev_err_probe (&pdev->dev, ret,"spi_register_controller failed\n" );
@@ -555,9 +555,13 @@ static int mchp_coreqspi_probe(struct platform_device *pdev)static void mchp_coreqspi_remove (struct platform_device *pdev) { -struct mchp_coreqspi *qspi =platform_get_drvdata (pdev); -u32 control =readl_relaxed (qspi->regs +REG_CONTROL ); +struct spi_controller *ctlr =platform_get_drvdata (pdev); +struct mchp_coreqspi *qspi =spi_controller_get_devdata (ctlr); +u32 control; +spi_unregister_controller (ctlr); + + control =readl_relaxed (qspi->regs +REG_CONTROL );mchp_coreqspi_disable_ints (qspi); control &= ~CONTROL_ENABLE ;writel_relaxed (control, qspi->regs +REG_CONTROL );
drivers/spi/spi-rockchip.c +3 -1
@@ -914,7 +914,7 @@ static int rockchip_spi_probe(struct platform_device *pdev)break ; } - ret =devm_spi_register_controller (&pdev->dev, ctlr); + ret =spi_register_controller (ctlr);if (ret <0 ) {dev_err (&pdev->dev,"Failed to register controller\n" ); goto err_free_dma_rx;
@@ -942,6 +942,8 @@ static void rockchip_spi_remove(struct platform_device *pdev)pm_runtime_get_sync (&pdev->dev); +spi_unregister_controller (ctlr); +pm_runtime_put_noidle (&pdev->dev);pm_runtime_disable (&pdev->dev);pm_runtime_set_suspended (&pdev->dev);
drivers/spi/spi-s3c64xx.c +0 -5
@@ -1404,11 +1404,6 @@ static void s3c64xx_spi_remove(struct platform_device *pdev)writel (0 , sdd->regs +S3C64XX_SPI_INT_EN ); -if (!is_polling (sdd)) { -dma_release_channel (sdd->rx_dma.ch); -dma_release_channel (sdd->tx_dma.ch); - } -pm_runtime_put_noidle (&pdev->dev);pm_runtime_disable (&pdev->dev);pm_runtime_set_suspended (&pdev->dev);
drivers/spi/spi-sun4i.c +9 -1
@@ -504,7 +504,7 @@ static int sun4i_spi_probe(struct platform_device *pdev)pm_runtime_enable (&pdev->dev);pm_runtime_idle (&pdev->dev); - ret =devm_spi_register_controller (&pdev->dev, host); + ret =spi_register_controller (host);if (ret) {dev_err (&pdev->dev,"cannot register SPI host\n" ); goto err_pm_disable;
@@ -522,7 +522,15 @@ static int sun4i_spi_probe(struct platform_device *pdev)static void sun4i_spi_remove (struct platform_device *pdev) { +struct spi_controller *host =platform_get_drvdata (pdev); + +spi_controller_get (host); + +spi_unregister_controller (host); +pm_runtime_force_suspend (&pdev->dev); + +spi_controller_put (host); }static const struct of_device_id sun4i_spi_match[] = {
drivers/spi/spi-sun6i.c +7 -1
@@ -743,7 +743,7 @@ static int sun6i_spi_probe(struct platform_device *pdev)pm_runtime_set_active (&pdev->dev);pm_runtime_enable (&pdev->dev); - ret =devm_spi_register_controller (&pdev->dev, host); + ret =spi_register_controller (host);if (ret) {dev_err (&pdev->dev,"cannot register SPI host\n" ); goto err_pm_disable;
@@ -769,12 +769,18 @@ static void sun6i_spi_remove(struct platform_device *pdev) {struct spi_controller *host =platform_get_drvdata (pdev); +spi_controller_get (host); + +spi_unregister_controller (host); +pm_runtime_force_suspend (&pdev->dev);if (host->dma_tx)dma_release_channel (host->dma_tx);if (host->dma_rx)dma_release_channel (host->dma_rx); + +spi_controller_put (host); }static const struct sun6i_spi_cfg sun6i_a31_spi_cfg = {
drivers/spi/spi-synquacer.c +7 -1
@@ -719,7 +719,7 @@ static int synquacer_spi_probe(struct platform_device *pdev)pm_runtime_set_active (sspi->dev);pm_runtime_enable (sspi->dev); - ret =devm_spi_register_controller (sspi->dev, host); + ret =spi_register_controller (host);if (ret) goto disable_pm;
@@ -740,9 +740,15 @@ static void synquacer_spi_remove(struct platform_device *pdev)struct spi_controller *host =platform_get_drvdata (pdev);struct synquacer_spi *sspi =spi_controller_get_devdata (host); +spi_controller_get (host); + +spi_unregister_controller (host); +pm_runtime_disable (sspi->dev);clk_disable_unprepare (sspi->clk); + +spi_controller_put (host); }static int __maybe_unused synquacer_spi_suspend (struct device *dev)
drivers/spi/spi-ti-qspi.c +6 -8
@@ -895,7 +895,7 @@ static int ti_qspi_probe(struct platform_device *pdev) qspi->mmap_enabled = false; qspi->current_cs =-1 ; - ret =devm_spi_register_controller (&pdev->dev, host); + ret =spi_register_controller (host);if (!ret)return 0 ;
@@ -910,19 +910,17 @@ static int ti_qspi_probe(struct platform_device *pdev)static void ti_qspi_remove (struct platform_device *pdev) {struct ti_qspi *qspi =platform_get_drvdata (pdev); -int rc; - rc =spi_controller_suspend (qspi->host); -if (rc) { -dev_alert (&pdev->dev,"spi_controller_suspend() failed (%pe)\n" , -ERR_PTR (rc)); -return ; - } +spi_controller_get (qspi->host); + +spi_unregister_controller (qspi->host);pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);ti_qspi_dma_cleanup (qspi); + +spi_controller_put (qspi->host); }static const struct dev_pm_ops ti_qspi_pm_ops = {
drivers/spi/spi-topcliff-pch.c +8 -3
@@ -1406,8 +1406,9 @@ static void pch_spi_pd_remove(struct platform_device *plat_dev)dev_dbg (&plat_dev->dev,"%s:[ch%d] irq=%d\n" , __func__, plat_dev->id, board_dat->pdev->irq); -if (use_dma) -pch_free_dma_buf (board_dat, data); +spi_controller_get (data->host); + +spi_unregister_controller (data->host);/* check for any pending messages; no action is taken if the queue * is still full; but at least we tried. Unload anyway */
@@ -1432,8 +1433,12 @@ static void pch_spi_pd_remove(struct platform_device *plat_dev)free_irq (board_dat->pdev->irq, data); } +if (use_dma) +pch_free_dma_buf (board_dat, data); +pci_iounmap (board_dat->pdev, data->io_remap_addr); -spi_unregister_controller (data->host); + +spi_controller_put (data->host); }#ifdef CONFIG_PM static int pch_spi_pd_suspend(struct platform_device *pd_dev,
drivers/spi/spi-zynqmp-gqspi.c +3 -1
@@ -1334,7 +1334,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev) ctlr->dev.of_node = np; ctlr->auto_runtime_pm = true; - ret =devm_spi_register_controller (&pdev->dev, ctlr); + ret =spi_register_controller (ctlr);if (ret) {dev_err (&pdev->dev,"spi_register_controller failed\n" ); goto clk_dis_all;
@@ -1373,6 +1373,8 @@ static void zynqmp_qspi_remove(struct platform_device *pdev)pm_runtime_get_sync (&pdev->dev); +spi_unregister_controller (xqspi->ctlr); +zynqmp_gqspi_write (xqspi,GQSPI_EN_OFST ,0x0 );pm_runtime_disable (&pdev->dev);
drivers/staging/vme_user/vme_fake.c +2 -0
@@ -1230,6 +1230,8 @@ static int __init fake_init(void) err_driver:kfree (fake_bridge); err_struct: +root_device_unregister (vme_root); +return retval; }
drivers/target/target_core_configfs.c +1 -1
@@ -3172,7 +3172,7 @@ static ssize_t target_tg_pt_gp_members_show(struct config_item *item, config_item_name(&lun->lun_group.cg_item)); cur_len++;/* Extra byte for NULL terminator */ -if ((cur_len + len) >PAGE_SIZE ) { +if (cur_len >TG_PT_GROUP_NAME_BUF || (cur_len + len) >PAGE_SIZE ) {pr_warn ("Ran out of lu_gp_show_attr" "_members buffer\n" );break ;
drivers/thermal/sprd_thermal.c +2 -2
@@ -178,7 +178,7 @@ static int sprd_thm_sensor_calibration(struct device_node *np,static int sprd_thm_rawdata_to_temp (struct sprd_thermal_sensor *sen,u32 rawdata) { -clamp (rawdata, (u32 )SPRD_THM_RAW_DATA_LOW , (u32 )SPRD_THM_RAW_DATA_HIGH ); + rawdata =clamp (rawdata,SPRD_THM_RAW_DATA_LOW ,SPRD_THM_RAW_DATA_HIGH );/* * According to the thermal datasheet, the formula of converting
@@ -192,7 +192,7 @@ static int sprd_thm_temp_to_rawdata(int temp, struct sprd_thermal_sensor *sen) {u32 val; -clamp (temp, (int )SPRD_THM_TEMP_LOW , (int )SPRD_THM_TEMP_HIGH ); + temp =clamp (temp,SPRD_THM_TEMP_LOW ,SPRD_THM_TEMP_HIGH );/* * According to the thermal datasheet, the formula of converting
drivers/thermal/thermal_core.c +4 -2
@@ -918,6 +918,7 @@ static void thermal_release(struct device *dev) tz =to_thermal_zone (dev);thermal_zone_destroy_device_groups (tz);thermal_set_governor (tz,NULL ); +ida_destroy (&tz->ida);mutex_destroy (&tz->lock);complete (&tz->removal); } else if (!strncmp(dev_name(dev), "cooling_device",
@@ -1634,8 +1635,6 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)cancel_delayed_work_sync (&tz->poll_queue);thermal_remove_hwmon_sysfs (tz); -ida_free (&thermal_tz_ida, tz->id); -ida_destroy (&tz->ida);device_del (&tz->device);put_device (&tz->device);
@@ -1643,6 +1642,9 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)thermal_notify_tz_delete (tz);wait_for_completion (&tz->removal); + +ida_free (&thermal_tz_ida, tz->id); +kfree (tz->tzp);kfree (tz); }
drivers/usb/class/usblp.c +2 -1
@@ -1166,7 +1166,7 @@ static int usblp_probe(struct usb_interface *intf, }/* Allocate buffer for printer status */ - usblp->statusbuf =kmalloc (STATUS_BUF_SIZE ,GFP_KERNEL ); + usblp->statusbuf =kzalloc (STATUS_BUF_SIZE ,GFP_KERNEL );if (!usblp->statusbuf) { retval = -ENOMEM ; goto abort;
@@ -1365,6 +1365,7 @@ static int usblp_cache_device_id_string(struct usblp *usblp) {int err, length; +memset (usblp->device_id_string,0 ,USBLP_DEVICE_ID_SIZE ); err =usblp_get_id (usblp,0 , usblp->device_id_string,USBLP_DEVICE_ID_SIZE -1 );if (err <0 ) { dev_dbg(&usblp->intf->dev,
drivers/usb/common/ulpi.c +4 -1
@@ -286,12 +286,15 @@ static int ulpi_register(struct device *dev, struct ulpi *ulpi)ACPI_COMPANION_SET (&ulpi->dev,ACPI_COMPANION (dev)); ret =ulpi_of_register (ulpi); -if (ret) +if (ret) { +kfree (ulpi);return ret; + } ret =ulpi_read_id (ulpi);if (ret) {of_node_put (ulpi->dev.of_node); +kfree (ulpi);return ret; }
drivers/usb/gadget/udc/omap_udc.c +0 -4
@@ -732,8 +732,6 @@ static void dma_channel_claim(struct omap_ep *ep, unsigned channel)if (status ==0 ) {omap_writew (reg,UDC_TXDMA_CFG );/* EMIFF or SDRC */ -omap_set_dma_src_burst_mode (ep->lch, -OMAP_DMA_DATA_BURST_4 );omap_set_dma_src_data_pack (ep->lch,1 );/* TIPB */ omap_set_dma_dest_params(ep->lch,
@@ -755,8 +753,6 @@ static void dma_channel_claim(struct omap_ep *ep, unsigned channel)UDC_DATA_DMA , 0, 0);/* EMIFF or SDRC */ -omap_set_dma_dest_burst_mode (ep->lch, -OMAP_DMA_DATA_BURST_4 );omap_set_dma_dest_data_pack (ep->lch,1 ); } }
drivers/usb/serial/option.c +4 -0
@@ -1513,7 +1513,11 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1231, 0xff), /* Telit LE910Cx (RNDIS) */ .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x1250, 0xff, 0x00, 0x00) }, /* Telit LE910Cx (rmnet) */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1251, 0xff) }, /* Telit LE910Cx (RNDIS) */ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1252, 0xff) }, /* Telit LE910Cx (MBIM) */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1253, 0xff) }, /* Telit LE910Cx (ECM) */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1254, 0xff) }, /* Telit LE910Cx */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1255, 0xff) }, /* Telit LE910Cx */ { USB_DEVICE(TELIT_VENDOR_ID, 0x1260), .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE(TELIT_VENDOR_ID, 0x1261),
drivers/video/fbdev/core/fb_defio.c +142 -37
294 lines not on this page · raw message
drivers/video/fbdev/udlfb.c +30 -1
@@ -321,12 +321,32 @@ static int dlfb_set_video_mode(struct dlfb_data *dlfb,return retval; } +static void dlfb_vm_open (struct vm_area_struct *vma) +{ +struct dlfb_data *dlfb = vma->vm_private_data; + +atomic_inc (&dlfb->mmap_count); +} + +static void dlfb_vm_close (struct vm_area_struct *vma) +{ +struct dlfb_data *dlfb = vma->vm_private_data; + +atomic_dec (&dlfb->mmap_count); +} + +static const struct vm_operations_struct dlfb_vm_ops = { + .open = dlfb_vm_open, + .close = dlfb_vm_close, +}; +static int dlfb_ops_mmap (struct fb_info *info,struct vm_area_struct *vma) {unsigned long start = vma->vm_start;unsigned long size = vma->vm_end - vma->vm_start;unsigned long offset = vma->vm_pgoff <<PAGE_SHIFT ;unsigned long page, pos; +struct dlfb_data *dlfb = info->par;if (info->fbdefio)return fb_deferred_io_mmap (info, vma);
@@ -358,6 +378,9 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma) size =0 ; } + vma->vm_ops = &dlfb_vm_ops; + vma->vm_private_data = dlfb; +atomic_inc (&dlfb->mmap_count);return 0 ; }
@@ -1176,7 +1199,6 @@ static void dlfb_deferred_vfree(struct dlfb_data *dlfb, void *mem)/* * Assumes &info->lock held by caller -* Assumes no active clients have framebuffer open */ static int dlfb_realloc_framebuffer (struct dlfb_data *dlfb,struct fb_info *info,u32 new_len) {
@@ -1188,6 +1210,13 @@ static int dlfb_realloc_framebuffer(struct dlfb_data *dlfb, struct fb_info *info new_len =PAGE_ALIGN (new_len);if (new_len > old_len) { +if (atomic_read (&dlfb->mmap_count) >0 ) { +dev_warn (info->dev, +"refusing realloc: %d active mmaps\n" , +atomic_read (&dlfb->mmap_count)); +return -EBUSY ; + } +/* * Alloc system memory for virtual framebuffer */
fs/btrfs/space-info.c +1 -1
@@ -296,7 +296,7 @@ static int create_space_info(struct btrfs_fs_info *info, u64 flags) ret =btrfs_sysfs_add_space_info_type (info, space_info);if (ret) - goto out_free; +return ret;list_add (&space_info->list, &info->space_info);if (flags &BTRFS_BLOCK_GROUP_DATA )
fs/erofs/compress.h +1 -1
@@ -11,6 +11,7 @@struct z_erofs_decompress_req {struct super_block *sb;struct page **in, **out; +unsigned int inpages, outpages;unsigned short pageofs_in, pageofs_out;unsigned int inputsize, outputsize;
@@ -80,7 +81,6 @@ extern const struct z_erofs_decompressor *z_erofs_decomp[];struct z_erofs_stream_dctx {struct z_erofs_decompress_req *rq; -unsigned int inpages, outpages;/* # of {en,de}coded pages */ int no, ni;/* the current {en,de}coded page # */ unsigned int avail_out;/* remaining bytes in the decoded buffer */
fs/erofs/decompressor.c +74 -89
180 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/mmap_lock.h +39 -22
61 lines not on this page · raw message
net/key/af_key.c +34 -18
52 lines not on this page · raw message
security/selinux/selinuxfs.c +15 -39
54 lines not on this page · raw message
sound/drivers/aloop.c +30 -14
44 lines not on this page · 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.