patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 6.14 000/145] 6.14.8-rc1 review
@ 2025-05-20 13:49 Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 001/145] arm64: dts: rockchip: Assign RT5616 MCLK rate on rk3588-friendlyelec-cm3588 Greg Kroah-Hartman
                   ` (156 more replies)
  0 siblings, 157 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, linux-kernel, torvalds, akpm, linux,
	shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie

This is the start of the stable review cycle for the 6.14.8 release.
There are 145 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
or in the git tree and branch at:
	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 6.14.8-rc1

Dan Carpenter <dan.carpenter@linaro.org>
    phy: tegra: xusb: remove a stray unlock

Tiezhu Yang <yangtiezhu@loongson.cn>
    perf tools: Fix build error for LoongArch

Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    mm/page_alloc: fix race condition in unaccepted memory handling

Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
    drm/xe/gsc: do not flush the GSC worker from the reset path

Maciej Falkowski <maciej.falkowski@linux.intel.com>
    accel/ivpu: Flush pending jobs of device's workqueues

Karol Wachowski <karol.wachowski@intel.com>
    accel/ivpu: Fix missing MMU events if file_priv is unbound

Karol Wachowski <karol.wachowski@intel.com>
    accel/ivpu: Fix missing MMU events from reserved SSID

Karol Wachowski <karol.wachowski@intel.com>
    accel/ivpu: Move parts of MMU event IRQ handling to thread handler

Karol Wachowski <karol.wachowski@intel.com>
    accel/ivpu: Dump only first MMU fault from single context

Maciej Falkowski <maciej.falkowski@linux.intel.com>
    accel/ivpu: Use workqueue for IRQ handling

Shuai Xue <xueshuai@linux.alibaba.com>
    dmaengine: idxd: Refactor remove call with idxd_cleanup() helper

Shuai Xue <xueshuai@linux.alibaba.com>
    dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe

Shuai Xue <xueshuai@linux.alibaba.com>
    dmaengine: idxd: fix memory leak in error handling path of idxd_alloc

Shuai Xue <xueshuai@linux.alibaba.com>
    dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call

Shuai Xue <xueshuai@linux.alibaba.com>
    dmaengine: idxd: Add missing cleanups in cleanup internals

Shuai Xue <xueshuai@linux.alibaba.com>
    dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals

Shuai Xue <xueshuai@linux.alibaba.com>
    dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups

Shuai Xue <xueshuai@linux.alibaba.com>
    dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines

Shuai Xue <xueshuai@linux.alibaba.com>
    dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs

Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
    dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy

Ronald Wahl <ronald.wahl@legrand.com>
    dmaengine: ti: k3-udma: Add missing locking

Barry Song <baohua@kernel.org>
    mm: userfaultfd: correct dirty flags set for both present and swap pte

Wupeng Ma <mawupeng1@huawei.com>
    mm: hugetlb: fix incorrect fallback for subpool

hexue <xue01.he@samsung.com>
    io_uring/uring_cmd: fix hybrid polling initialization issue

Jens Axboe <axboe@kernel.dk>
    io_uring/memmap: don't use page_address() on a highmem page

Nathan Chancellor <nathan@kernel.org>
    net: qede: Initialize qede_ll_ops with designated initializer

Steven Rostedt <rostedt@goodmis.org>
    ring-buffer: Fix persistent buffer when commit page is the reader page

Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
    wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl

Fedor Pchelkin <pchelkin@ispras.ru>
    wifi: mt76: disable napi on driver removal

Jarkko Sakkinen <jarkko@kernel.org>
    tpm: Mask TPM RC in tpm2_start_auth_session()

Aaron Kling <webgeek1234@gmail.com>
    spi: tegra114: Use value to check for invalid delays

Jethro Donaldson <devel@jro.nz>
    smb: client: fix memory leak during error handling for POSIX mkdir

Steve Siwinski <ssiwinski@atto.com>
    scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer

Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
    phy: renesas: rcar-gen3-usb2: Set timing registers only once

Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
    phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind

Oleksij Rempel <o.rempel@pengutronix.de>
    net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink

Oleksij Rempel <o.rempel@pengutronix.de>
    net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches

Ma Ke <make24@iscas.ac.cn>
    phy: Fix error handling in tegra_xusb_port_init

Wayne Chang <waynec@nvidia.com>
    phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking

Steven Rostedt <rostedt@goodmis.org>
    tracing: samples: Initialize trace_array_printk() with the correct function

Ashish Kalra <ashish.kalra@amd.com>
    x86/sev: Make sure pages are not skipped during kdump

Ashish Kalra <ashish.kalra@amd.com>
    x86/sev: Do not touch VMSA pages during SNP guest memory kdump

pengdonglin <pengdonglin@xiaomi.com>
    ftrace: Fix preemption accounting for stacktrace filter command

pengdonglin <pengdonglin@xiaomi.com>
    ftrace: Fix preemption accounting for stacktrace trigger command

Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    i2c: designware: Fix an error handling path in i2c_dw_pci_probe()

Nathan Chancellor <nathan@kernel.org>
    kbuild: Disable -Wdefault-const-init-unsafe

Michael Kelley <mhklinux@outlook.com>
    Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()

Michael Kelley <mhklinux@outlook.com>
    Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges

Michael Kelley <mhklinux@outlook.com>
    hv_netvsc: Remove rmsg_pgcnt

Michael Kelley <mhklinux@outlook.com>
    hv_netvsc: Preserve contiguous PFN grouping in the page buffer array

Michael Kelley <mhklinux@outlook.com>
    hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages

Dragan Simic <dsimic@manjaro.org>
    arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi

Sam Edwards <cfsworks@gmail.com>
    arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down

Christian Hewitt <christianshewitt@gmail.com>
    arm64: dts: amlogic: dreambox: fix missing clkc_audio node

Hyejeong Choi <hjeong.choi@samsung.com>
    dma-buf: insert memory barrier before updating num_fences

Nicolas Chauvet <kwizart@gmail.com>
    ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera

Christian Heusel <christian@heusel.eu>
    ALSA: usb-audio: Add sample rate quirk for Audioengine D1

Wentao Liang <vulab@iscas.ac.cn>
    ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()

Jeremy Linton <jeremy.linton@arm.com>
    ACPI: PPTT: Fix processor subtable walk

Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
    gpio: pca953x: fix IRQ storm on system wake up

Alexey Makhalov <alexey.makhalov@broadcom.com>
    MAINTAINERS: Update Alexey Makhalov's email address

Wayne Lin <Wayne.Lin@amd.com>
    drm/amd/display: Avoid flooding unnecessary info messages

Wayne Lin <Wayne.Lin@amd.com>
    drm/amd/display: Correct the reply value when AUX write incomplete

Philip Yang <Philip.Yang@amd.com>
    drm/amdgpu: csa unmap use uninterruptible lock

Tim Huang <tim.huang@amd.com>
    drm/amdgpu: fix incorrect MALL size for GFX1151

David (Ming Qiang) Wu <David.Wu3@amd.com>
    drm/amdgpu: read back register after written for VCN v4.0.5

Fabio Estevam <festevam@denx.de>
    drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc()

Melissa Wen <mwen@igalia.com>
    Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor"

Kyoji Ogasawara <sawara04.o@gmail.com>
    btrfs: add back warning for mount option commit values exceeding 300

Boris Burkov <boris@bur.io>
    btrfs: fix folio leak in submit_one_async_extent()

Filipe Manana <fdmanana@suse.com>
    btrfs: fix discard worker infinite loop after disabling discard

Tiezhu Yang <yangtiezhu@loongson.cn>
    LoongArch: uprobes: Remove redundant code about resume_era

Tiezhu Yang <yangtiezhu@loongson.cn>
    LoongArch: uprobes: Remove user_{en,dis}able_single_step()

Huacai Chen <chenhuacai@kernel.org>
    LoongArch: Fix MAX_REG_OFFSET calculation

Huacai Chen <chenhuacai@kernel.org>
    LoongArch: Save and restore CSR.CNTC for hibernation

Huacai Chen <chenhuacai@kernel.org>
    LoongArch: Move __arch_cpu_idle() to .cpuidle.text section

Tianyang Zhang <zhangtianyang@loongson.cn>
    LoongArch: Prevent cond_resched() occurring within kernel-fpu

Mario Limonciello <mario.limonciello@amd.com>
    HID: amd_sfh: Fix SRA sensor when it's the only sensor

Rong Zhang <i@rong.moe>
    HID: bpf: abort dispatch if device destroyed

Max Kellermann <max.kellermann@ionos.com>
    fs/eventpoll: fix endless busy loop after timeout has expired

Jan Kara <jack@suse.cz>
    udf: Make sure i_lenExtents is uptodate on inode eviction

Tejun Heo <tj@kernel.org>
    sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator

Thomas Weißschuh <linux@weissschuh.net>
    Revert "kbuild, rust: use -fremap-path-prefix to make paths relative"

Nathan Lynch <nathan.lynch@amd.com>
    dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted"

Trond Myklebust <trond.myklebust@hammerspace.com>
    NFSv4/pnfs: Reset the layout state after a layoutreturn

Ming Lei <ming.lei@redhat.com>
    ublk: fix dead loop when canceling io command

Gerhard Engleder <gerhard@engleder-embedded.com>
    tsnep: fix timestamping with a stacked DSA driver

Pengtao He <hept.hept.hept@gmail.com>
    net/tls: fix kernel panic when alloc_page failed

Ido Schimmel <idosch@nvidia.com>
    mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices

Kees Cook <kees@kernel.org>
    wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request

Subbaraya Sundeep <sbhatta@marvell.com>
    octeontx2-pf: Do not reallocate all ntuple filters

Hariprasad Kelam <hkelam@marvell.com>
    octeontx2-af: Fix CGX Receive counters

Bo-Cun Chen <bc-bocun.chen@mediatek.com>
    net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability

Subbaraya Sundeep <sbhatta@marvell.com>
    octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy

Jakub Kicinski <kuba@kernel.org>
    netlink: specs: tc: all actions are indexed arrays

Jakub Kicinski <kuba@kernel.org>
    netlink: specs: tc: fix a couple of attribute names

Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
    drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value

Jens Axboe <axboe@kernel.dk>
    io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo()

Hariprasad Kelam <hkelam@marvell.com>
    octeontx2-pf: Fix ethtool support for SDP representors

Cosmin Tanislav <demonsingur@gmail.com>
    regulator: max20086: fix invalid memory access

Abdun Nihaal <abdun.nihaal@gmail.com>
    qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd()

Carolina Jubran <cjubran@nvidia.com>
    net/mlx5e: Disable MACsec offload for uplink representor profile

Konstantin Shkolnyy <kshk@linux.ibm.com>
    vsock/test: Fix occasional failure in SIOCOUTQ tests

Melissa Wen <mwen@igalia.com>
    drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp

Jonas Gorski <jonas.gorski@gmail.com>
    net: dsa: b53: prevent standalone from trying to forward to other ports

Geert Uytterhoeven <geert+renesas@glider.be>
    ALSA: sh: SND_AICA should depend on SH_DMA_API

Keith Busch <kbusch@kernel.org>
    nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable

Kees Cook <kees@kernel.org>
    nvme-pci: make nvme_pci_npages_prp() __always_inline

Vladimir Oltean <vladimir.oltean@nxp.com>
    net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING

Mathieu Othacehe <othacehe@gnu.org>
    net: cadence: macb: Fix a possible deadlock in macb_halt_tx.

Takashi Iwai <tiwai@suse.de>
    ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info

Takashi Iwai <tiwai@suse.de>
    ALSA: seq: Fix delivery of UMP events to group ports

Andrew Jeffery <andrew@codeconstruct.com.au>
    net: mctp: Ensure keys maintain only one ref to corresponding dev

Cosmin Ratiu <cratiu@nvidia.com>
    tests/ncdevmem: Fix double-free of queue array

Matt Johnston <matt@codeconstruct.com.au>
    net: mctp: Don't access ifa_index when missing

Hangbin Liu <liuhangbin@gmail.com>
    tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing

I Hsin Cheng <richard120310@gmail.com>
    drm/meson: Use 1000ULL when operating with mode->clock

Cong Wang <xiyou.wangcong@gmail.com>
    net_sched: Flush gso_skb list too during ->change()

Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags

Zhu Yanjun <yanjun.zhu@linux.dev>
    RDMA/core: Fix "KASAN: slab-use-after-free Read in ib_register_device" problem

Geert Uytterhoeven <geert+renesas@glider.be>
    spi: loopback-test: Do not split 1024-byte hexdumps

Trond Myklebust <trond.myklebust@hammerspace.com>
    NFS/localio: Fix a race in nfs_local_open_fh()

Li Lingfeng <lilingfeng3@huawei.com>
    nfs: handle failure of nfs_get_lock_context in unlock path

Henry Martin <bsdhenrymartin@gmail.com>
    HID: uclogic: Add NULL check in uclogic_input_configured()

Qasim Ijaz <qasdev00@gmail.com>
    HID: thrustmaster: fix memory leak in thrustmaster_interrupts()

Zhu Yanjun <yanjun.zhu@linux.dev>
    RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug

David Lechner <dlechner@baylibre.com>
    iio: adc: ad7606: check for NULL before calling sw_mode_config()

Guillaume Stols <gstols@baylibre.com>
    iio: adc: ad7606: move software functions into common file

Guillaume Stols <gstols@baylibre.com>
    iio: adc: ad7606: move the software mode configuration

Michal Suchanek <msuchanek@suse.de>
    tpm: tis: Double the timeout B to 4s

Masami Hiramatsu (Google) <mhiramat@kernel.org>
    tracing: probes: Fix a possible race in trace_probe_log APIs

Breno Leitao <leitao@debian.org>
    tracing: fprobe: Fix RCU warning message in list traversal

Waiman Long <longman@redhat.com>
    cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks

Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
    arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout

Hans de Goede <hdegoede@redhat.com>
    platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection

Runhua He <hua@aosc.io>
    platform/x86/amd/pmc: Declare quirk_spurious_8042 for MECHREVO Wujie 14XA (GX4HRXL)

Kees Cook <kees@kernel.org>
    binfmt_elf: Move brk for static PIE even if ASLR disabled

Ze Huang <huangze@whut.edu.cn>
    riscv: dts: sophgo: fix DMA data-width configuration for CV18xx

Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
    arm64: dts: rockchip: fix Sige5 RTC interrupt pin

Suma Hegde <suma.hegde@amd.com>
    platform/x86/amd/hsmp: Make amd_hsmp and hsmp_acpi as mutually exclusive drivers

Yazen Ghannam <yazen.ghannam@amd.com>
    x86/amd_node, platform/x86/amd/hsmp: Have HSMP use SMN through AMD_NODE

Mario Limonciello <mario.limonciello@amd.com>
    drivers/platform/x86/amd: pmf: Check for invalid Smart PC Policies

Mario Limonciello <mario.limonciello@amd.com>
    drivers/platform/x86/amd: pmf: Check for invalid sideloaded Smart PC Policies

Stephen Smalley <stephen.smalley.work@gmail.com>
    fs/xattr.c: fix simple_xattr_list to always include security.* xattrs

Tom Vincent <linux@tlvince.com>
    arm64: dts: rockchip: Assign RT5616 MCLK rate on rk3588-friendlyelec-cm3588


-------------

Diffstat:

 Documentation/netlink/specs/tc.yaml                |  10 +-
 MAINTAINERS                                        |   6 +-
 Makefile                                           |   5 +-
 .../boot/dts/amlogic/meson-g12b-dreambox.dtsi      |   4 +
 arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi  |  12 +-
 .../boot/dts/rockchip/rk3576-armsom-sige5.dts      |   2 +-
 .../dts/rockchip/rk3588-friendlyelec-cm3588.dtsi   |   4 +
 .../arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi |   2 +
 arch/arm64/boot/dts/rockchip/rk3588j.dtsi          |  53 ++---
 arch/loongarch/include/asm/ptrace.h                |   2 +-
 arch/loongarch/include/asm/uprobes.h               |   1 -
 arch/loongarch/kernel/genex.S                      |   7 +-
 arch/loongarch/kernel/kfpu.c                       |  22 +-
 arch/loongarch/kernel/time.c                       |   2 +-
 arch/loongarch/kernel/uprobes.c                    |  11 +-
 arch/loongarch/power/hibernate.c                   |   3 +
 arch/riscv/boot/dts/sophgo/cv18xx.dtsi             |   2 +-
 arch/x86/coco/sev/core.c                           | 255 +++++++++++++--------
 arch/x86/include/asm/amd_nb.h                      |   1 -
 arch/x86/include/asm/amd_node.h                    |  13 ++
 arch/x86/kernel/amd_nb.c                           |   1 -
 arch/x86/kernel/amd_node.c                         |   9 +
 block/bio.c                                        |   2 +-
 drivers/accel/ivpu/ivpu_drv.c                      |  39 +---
 drivers/accel/ivpu/ivpu_drv.h                      |   5 +-
 drivers/accel/ivpu/ivpu_hw.c                       |   5 -
 drivers/accel/ivpu/ivpu_hw.h                       |   9 -
 drivers/accel/ivpu/ivpu_hw_btrs.c                  |   3 +-
 drivers/accel/ivpu/ivpu_ipc.c                      |   7 +-
 drivers/accel/ivpu/ivpu_ipc.h                      |   2 +-
 drivers/accel/ivpu/ivpu_job.c                      |  15 +-
 drivers/accel/ivpu/ivpu_job.h                      |   2 +-
 drivers/accel/ivpu/ivpu_mmu.c                      | 109 +++++++--
 drivers/accel/ivpu/ivpu_mmu.h                      |   2 +
 drivers/accel/ivpu/ivpu_mmu_context.c              |  13 --
 drivers/accel/ivpu/ivpu_mmu_context.h              |   2 -
 drivers/accel/ivpu/ivpu_pm.c                       |   3 +-
 drivers/accel/ivpu/ivpu_pm.h                       |   2 +-
 drivers/acpi/pptt.c                                |  11 +-
 drivers/block/ublk_drv.c                           |   2 +-
 drivers/char/tpm/tpm2-sessions.c                   |  20 +-
 drivers/char/tpm/tpm_tis_core.h                    |   2 +-
 drivers/dma-buf/dma-resv.c                         |   5 +-
 drivers/dma/dmatest.c                              |   6 +-
 drivers/dma/idxd/init.c                            | 159 +++++++++----
 drivers/dma/ti/k3-udma.c                           |  10 +-
 drivers/gpio/gpio-pca953x.c                        |   6 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c            |   2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c             |  12 +
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c            |   8 +
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |   3 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c    |  16 +-
 .../drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c  |   5 +-
 .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c  |   6 +-
 drivers/gpu/drm/meson/meson_encoder_hdmi.c         |   4 +-
 drivers/gpu/drm/tiny/panel-mipi-dbi.c              |   5 +-
 drivers/gpu/drm/xe/instructions/xe_mi_commands.h   |   4 +
 drivers/gpu/drm/xe/xe_gsc.c                        |  22 ++
 drivers/gpu/drm/xe/xe_gsc.h                        |   1 +
 drivers/gpu/drm/xe/xe_gsc_proxy.c                  |  11 +
 drivers/gpu/drm/xe/xe_gsc_proxy.h                  |   1 +
 drivers/gpu/drm/xe/xe_gt.c                         |   2 +-
 drivers/gpu/drm/xe/xe_lrc.c                        |   2 +-
 drivers/gpu/drm/xe/xe_ring_ops.c                   |   7 +-
 drivers/gpu/drm/xe/xe_uc.c                         |   8 +-
 drivers/gpu/drm/xe/xe_uc.h                         |   1 +
 drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c      |   7 +-
 drivers/hid/bpf/hid_bpf_dispatch.c                 |   9 +
 drivers/hid/hid-thrustmaster.c                     |   1 +
 drivers/hid/hid-uclogic-core.c                     |   7 +-
 drivers/hv/channel.c                               |  65 +-----
 drivers/i2c/busses/i2c-designware-pcidrv.c         |   4 +-
 drivers/iio/adc/ad7606.c                           | 154 +++++++++++--
 drivers/iio/adc/ad7606.h                           |  37 ++-
 drivers/iio/adc/ad7606_spi.c                       | 137 +----------
 drivers/infiniband/core/device.c                   |   6 +-
 drivers/infiniband/sw/rxe/rxe_cq.c                 |   5 +-
 drivers/net/dsa/b53/b53_common.c                   |  33 +++
 drivers/net/dsa/b53/b53_regs.h                     |  14 ++
 drivers/net/dsa/microchip/ksz_common.c             | 137 ++++++++---
 drivers/net/dsa/sja1105/sja1105_main.c             |   6 +-
 drivers/net/ethernet/cadence/macb_main.c           |  19 +-
 drivers/net/ethernet/engleder/tsnep_main.c         |  30 ++-
 drivers/net/ethernet/marvell/octeontx2/af/cgx.c    |   5 +
 .../ethernet/marvell/octeontx2/nic/cn10k_macsec.c  |   3 +-
 .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   1 +
 .../ethernet/marvell/octeontx2/nic/otx2_devlink.c  |   1 +
 .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c  |  10 +-
 .../ethernet/marvell/octeontx2/nic/otx2_flows.c    |   3 +-
 drivers/net/ethernet/mediatek/mtk_eth_soc.c        |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |   4 +
 .../net/ethernet/mellanox/mlxsw/spectrum_router.c  |   3 +
 drivers/net/ethernet/qlogic/qede/qede_main.c       |   2 +-
 .../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c   |   7 +-
 drivers/net/hyperv/hyperv_net.h                    |  13 +-
 drivers/net/hyperv/netvsc.c                        |  57 ++++-
 drivers/net/hyperv/netvsc_drv.c                    |  62 ++---
 drivers/net/hyperv/rndis_filter.c                  |  24 +-
 drivers/net/phy/micrel.c                           |   7 -
 drivers/net/wireless/mediatek/mt76/dma.c           |   1 +
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c    |   4 +-
 drivers/nvme/host/pci.c                            |   4 +-
 drivers/phy/renesas/phy-rcar-gen3-usb2.c           |  38 ++-
 drivers/phy/tegra/xusb-tegra186.c                  |  46 ++--
 drivers/phy/tegra/xusb.c                           |   8 +-
 drivers/platform/x86/amd/hsmp/Kconfig              |   2 +-
 drivers/platform/x86/amd/hsmp/acpi.c               |  10 +-
 drivers/platform/x86/amd/hsmp/hsmp.c               |   1 -
 drivers/platform/x86/amd/hsmp/hsmp.h               |   4 +-
 drivers/platform/x86/amd/hsmp/plat.c               |  42 ++--
 drivers/platform/x86/amd/pmc/pmc-quirks.c          |   7 +
 drivers/platform/x86/amd/pmf/tee-if.c              |  23 +-
 drivers/platform/x86/asus-wmi.c                    |   3 +-
 drivers/regulator/max20086-regulator.c             |   7 +-
 drivers/scsi/sd_zbc.c                              |   6 +-
 drivers/scsi/storvsc_drv.c                         |   1 +
 drivers/spi/spi-loopback-test.c                    |   2 +-
 drivers/spi/spi-tegra114.c                         |   6 +-
 drivers/usb/gadget/function/f_midi2.c              |   2 +-
 fs/binfmt_elf.c                                    |  71 ++++--
 fs/btrfs/discard.c                                 |  17 +-
 fs/btrfs/fs.h                                      |   1 +
 fs/btrfs/inode.c                                   |   7 +
 fs/btrfs/super.c                                   |   4 +
 fs/eventpoll.c                                     |   7 +-
 fs/nfs/localio.c                                   |   2 +-
 fs/nfs/nfs4proc.c                                  |   9 +-
 fs/nfs/pnfs.c                                      |   9 +
 fs/smb/client/smb2pdu.c                            |   2 +-
 fs/udf/truncate.c                                  |   2 +-
 fs/xattr.c                                         |  24 ++
 include/linux/bio.h                                |   1 +
 include/linux/hyperv.h                             |   7 -
 include/linux/micrel_phy.h                         |   1 -
 include/linux/tpm.h                                |  21 +-
 include/net/sch_generic.h                          |  15 ++
 include/sound/ump_msg.h                            |   4 +-
 io_uring/fdinfo.c                                  |  48 ++--
 io_uring/memmap.c                                  |   2 +-
 io_uring/uring_cmd.c                               |   5 +
 kernel/cgroup/cpuset.c                             |   6 +-
 kernel/sched/ext.c                                 |   6 +
 kernel/trace/fprobe.c                              |   3 +-
 kernel/trace/ring_buffer.c                         |   8 +-
 kernel/trace/trace_dynevent.c                      |  16 +-
 kernel/trace/trace_dynevent.h                      |   1 +
 kernel/trace/trace_events_trigger.c                |   2 +-
 kernel/trace/trace_functions.c                     |   6 +-
 kernel/trace/trace_kprobe.c                        |   2 +-
 kernel/trace/trace_probe.c                         |   9 +
 kernel/trace/trace_uprobe.c                        |   2 +-
 mm/hugetlb.c                                       |  28 ++-
 mm/page_alloc.c                                    |  23 --
 mm/userfaultfd.c                                   |  12 +-
 net/bluetooth/mgmt.c                               |   9 +-
 net/mac80211/main.c                                |   6 +-
 net/mctp/device.c                                  |  15 +-
 net/mctp/route.c                                   |   4 +-
 net/sched/sch_codel.c                              |   2 +-
 net/sched/sch_fq.c                                 |   2 +-
 net/sched/sch_fq_codel.c                           |   2 +-
 net/sched/sch_fq_pie.c                             |   2 +-
 net/sched/sch_hhf.c                                |   2 +-
 net/sched/sch_pie.c                                |   2 +-
 net/tls/tls_strp.c                                 |   3 +-
 samples/ftrace/sample-trace-array.c                |   2 +-
 scripts/Makefile.extrawarn                         |  12 +
 sound/core/seq/seq_clientmgr.c                     |  52 +++--
 sound/core/seq/seq_ump_convert.c                   |  18 ++
 sound/core/seq/seq_ump_convert.h                   |   1 +
 sound/pci/es1968.c                                 |   6 +-
 sound/sh/Kconfig                                   |   2 +-
 sound/usb/quirks.c                                 |   4 +
 tools/net/ynl/pyynl/ethtool.py                     |  22 +-
 tools/perf/arch/loongarch/include/syscall_table.h  |   2 +-
 tools/testing/selftests/drivers/net/hw/ncdevmem.c  |  55 ++---
 tools/testing/vsock/vsock_test.c                   |  28 ++-
 177 files changed, 1689 insertions(+), 1027 deletions(-)



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 001/145] arm64: dts: rockchip: Assign RT5616 MCLK rate on rk3588-friendlyelec-cm3588
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 002/145] fs/xattr.c: fix simple_xattr_list to always include security.* xattrs Greg Kroah-Hartman
                   ` (155 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Tom Vincent, Heiko Stuebner,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tom Vincent <linux@tlvince.com>

[ Upstream commit 5e6a4ee9799b202fefa8c6264647971f892f0264 ]

The Realtek RT5616 audio codec on the FriendlyElec CM3588 module fails
to probe correctly due to the missing clock properties. This results
in distorted analogue audio output.

Assign MCLK to 12.288 MHz, which allows the codec to advertise most of
the standard sample rates per other RK3588 devices.

Fixes: e23819cf273c ("arm64: dts: rockchip: Add FriendlyElec CM3588 NAS board")
Signed-off-by: Tom Vincent <linux@tlvince.com>
Link: https://lore.kernel.org/r/20250417081753.644950-1-linux@tlvince.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588.dtsi
index e3a9598b99fca..cacffc851584f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588.dtsi
@@ -222,6 +222,10 @@
 		compatible = "realtek,rt5616";
 		reg = <0x1b>;
 		#sound-dai-cells = <0>;
+		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+		assigned-clock-rates = <12288000>;
+		clocks = <&cru I2S0_8CH_MCLKOUT>;
+		clock-names = "mclk";
 	};
 };
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 002/145] fs/xattr.c: fix simple_xattr_list to always include security.* xattrs
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 001/145] arm64: dts: rockchip: Assign RT5616 MCLK rate on rk3588-friendlyelec-cm3588 Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 003/145] drivers/platform/x86/amd: pmf: Check for invalid sideloaded Smart PC Policies Greg Kroah-Hartman
                   ` (154 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Stephen Smalley, Christian Brauner,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stephen Smalley <stephen.smalley.work@gmail.com>

[ Upstream commit 8b0ba61df5a1c44e2b3cf683831a4fc5e24ea99d ]

The vfs has long had a fallback to obtain the security.* xattrs from the
LSM when the filesystem does not implement its own listxattr, but
shmem/tmpfs and kernfs later gained their own xattr handlers to support
other xattrs. Unfortunately, as a side effect, tmpfs and kernfs-based
filesystems like sysfs no longer return the synthetic security.* xattr
names via listxattr unless they are explicitly set by userspace or
initially set upon inode creation after policy load. coreutils has
recently switched from unconditionally invoking getxattr for security.*
for ls -Z via libselinux to only doing so if listxattr returns the xattr
name, breaking ls -Z of such inodes.

Before:
$ getfattr -m.* /run/initramfs
<no output>
$ getfattr -m.* /sys/kernel/fscaps
<no output>
$ setfattr -n user.foo /run/initramfs
$ getfattr -m.* /run/initramfs
user.foo

After:
$ getfattr -m.* /run/initramfs
security.selinux
$ getfattr -m.* /sys/kernel/fscaps
security.selinux
$ setfattr -n user.foo /run/initramfs
$ getfattr -m.* /run/initramfs
security.selinux
user.foo

Link: https://lore.kernel.org/selinux/CAFqZXNtF8wDyQajPCdGn=iOawX4y77ph0EcfcqcUUj+T87FKyA@mail.gmail.com/
Link: https://lore.kernel.org/selinux/20250423175728.3185-2-stephen.smalley.work@gmail.com/
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Link: https://lore.kernel.org/20250424152822.2719-1-stephen.smalley.work@gmail.com
Fixes: b09e0fa4b4ea66266058ee ("tmpfs: implement generic xattr support")
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/xattr.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/fs/xattr.c b/fs/xattr.c
index fabb2a04501ee..8ec5b0204bfdc 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -1428,6 +1428,15 @@ static bool xattr_is_trusted(const char *name)
 	return !strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN);
 }
 
+static bool xattr_is_maclabel(const char *name)
+{
+	const char *suffix = name + XATTR_SECURITY_PREFIX_LEN;
+
+	return !strncmp(name, XATTR_SECURITY_PREFIX,
+			XATTR_SECURITY_PREFIX_LEN) &&
+		security_ismaclabel(suffix);
+}
+
 /**
  * simple_xattr_list - list all xattr objects
  * @inode: inode from which to get the xattrs
@@ -1460,6 +1469,17 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
 	if (err)
 		return err;
 
+	err = security_inode_listsecurity(inode, buffer, remaining_size);
+	if (err < 0)
+		return err;
+
+	if (buffer) {
+		if (remaining_size < err)
+			return -ERANGE;
+		buffer += err;
+	}
+	remaining_size -= err;
+
 	read_lock(&xattrs->lock);
 	for (rbp = rb_first(&xattrs->rb_root); rbp; rbp = rb_next(rbp)) {
 		xattr = rb_entry(rbp, struct simple_xattr, rb_node);
@@ -1468,6 +1488,10 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
 		if (!trusted && xattr_is_trusted(xattr->name))
 			continue;
 
+		/* skip MAC labels; these are provided by LSM above */
+		if (xattr_is_maclabel(xattr->name))
+			continue;
+
 		err = xattr_list_one(&buffer, &remaining_size, xattr->name);
 		if (err)
 			break;
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 003/145] drivers/platform/x86/amd: pmf: Check for invalid sideloaded Smart PC Policies
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 001/145] arm64: dts: rockchip: Assign RT5616 MCLK rate on rk3588-friendlyelec-cm3588 Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 002/145] fs/xattr.c: fix simple_xattr_list to always include security.* xattrs Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 004/145] drivers/platform/x86/amd: pmf: Check for invalid " Greg Kroah-Hartman
                   ` (153 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Mario Limonciello,
	Ilpo Järvinen, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mario Limonciello <mario.limonciello@amd.com>

[ Upstream commit 690d722e02819ef978f90cd7553973eba1007e6c ]

If a policy is passed into amd_pmf_get_pb_data() that causes the engine
to fail to start there is a memory leak. Free the memory in this failure
path.

Fixes: 10817f28e5337 ("platform/x86/amd/pmf: Add capability to sideload of policy binary")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20250423132002.3984997-2-superm1@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/amd/pmf/tee-if.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c
index 14b99d8b63d2f..e008ac079fade 100644
--- a/drivers/platform/x86/amd/pmf/tee-if.c
+++ b/drivers/platform/x86/amd/pmf/tee-if.c
@@ -364,9 +364,14 @@ static ssize_t amd_pmf_get_pb_data(struct file *filp, const char __user *buf,
 	amd_pmf_hex_dump_pb(dev);
 	ret = amd_pmf_start_policy_engine(dev);
 	if (ret < 0)
-		return ret;
+		goto cleanup;
 
 	return length;
+
+cleanup:
+	kfree(dev->policy_buf);
+	dev->policy_buf = NULL;
+	return ret;
 }
 
 static const struct file_operations pb_fops = {
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 004/145] drivers/platform/x86/amd: pmf: Check for invalid Smart PC Policies
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 003/145] drivers/platform/x86/amd: pmf: Check for invalid sideloaded Smart PC Policies Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 005/145] x86/amd_node, platform/x86/amd/hsmp: Have HSMP use SMN through AMD_NODE Greg Kroah-Hartman
                   ` (152 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Christian Heusel, Mario Limonciello,
	Ilpo Järvinen, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mario Limonciello <mario.limonciello@amd.com>

[ Upstream commit 8e81b9cd6e95188d12c9cc25d40b61dd5ea05ace ]

commit 376a8c2a14439 ("platform/x86/amd/pmf: Update PMF Driver for
Compatibility with new PMF-TA") added support for platforms that support
an updated TA, however it also exposed a number of platforms that although
they have support for the updated TA don't actually populate a policy
binary.

Add an explicit check that the policy binary isn't empty before
initializing the TA.

Reported-by: Christian Heusel <christian@heusel.eu>
Closes: https://lore.kernel.org/platform-driver-x86/ae644428-5bf2-4b30-81ba-0b259ed3449b@heusel.eu/
Fixes: 376a8c2a14439 ("platform/x86/amd/pmf: Update PMF Driver for Compatibility with new PMF-TA")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Tested-by: Christian Heusel <christian@heusel.eu>
Link: https://lore.kernel.org/r/20250423132002.3984997-3-superm1@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/amd/pmf/tee-if.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c
index e008ac079fade..d3bd12ad036ae 100644
--- a/drivers/platform/x86/amd/pmf/tee-if.c
+++ b/drivers/platform/x86/amd/pmf/tee-if.c
@@ -334,6 +334,11 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
 	return 0;
 }
 
+static inline bool amd_pmf_pb_valid(struct amd_pmf_dev *dev)
+{
+	return memchr_inv(dev->policy_buf, 0xff, dev->policy_sz);
+}
+
 #ifdef CONFIG_AMD_PMF_DEBUG
 static void amd_pmf_hex_dump_pb(struct amd_pmf_dev *dev)
 {
@@ -361,6 +366,11 @@ static ssize_t amd_pmf_get_pb_data(struct file *filp, const char __user *buf,
 	dev->policy_buf = new_policy_buf;
 	dev->policy_sz = length;
 
+	if (!amd_pmf_pb_valid(dev)) {
+		ret = -EINVAL;
+		goto cleanup;
+	}
+
 	amd_pmf_hex_dump_pb(dev);
 	ret = amd_pmf_start_policy_engine(dev);
 	if (ret < 0)
@@ -533,6 +543,12 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
 
 	memcpy_fromio(dev->policy_buf, dev->policy_base, dev->policy_sz);
 
+	if (!amd_pmf_pb_valid(dev)) {
+		dev_info(dev->dev, "No Smart PC policy present\n");
+		ret = -EINVAL;
+		goto err_free_policy;
+	}
+
 	amd_pmf_hex_dump_pb(dev);
 
 	dev->prev_data = kzalloc(sizeof(*dev->prev_data), GFP_KERNEL);
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 005/145] x86/amd_node, platform/x86/amd/hsmp: Have HSMP use SMN through AMD_NODE
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 004/145] drivers/platform/x86/amd: pmf: Check for invalid " Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 006/145] platform/x86/amd/hsmp: Make amd_hsmp and hsmp_acpi as mutually exclusive drivers Greg Kroah-Hartman
                   ` (151 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Yazen Ghannam, Borislav Petkov (AMD),
	Carlos Bilbao, Ilpo Järvinen, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Yazen Ghannam <yazen.ghannam@amd.com>

[ Upstream commit 735049b801cf3d597752017385cfc8768ce44303 ]

The HSMP interface is just an SMN interface with different offsets.

Define an HSMP wrapper in the SMN code and have the HSMP platform driver
use that rather than a local solution.

Also, remove the "root" member from AMD_NB, since there are no more
users of it.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Carlos Bilbao <carlos.bilbao@kernel.org>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20250130-wip-x86-amd-nb-cleanup-v4-1-b5cc997e471b@amd.com
Stable-dep-of: 0581d384f344 ("platform/x86/amd/hsmp: Make amd_hsmp and hsmp_acpi as mutually exclusive drivers")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/include/asm/amd_nb.h         |  1 -
 arch/x86/include/asm/amd_node.h       | 13 ++++++++++
 arch/x86/kernel/amd_nb.c              |  1 -
 arch/x86/kernel/amd_node.c            |  9 +++++++
 drivers/platform/x86/amd/hsmp/Kconfig |  2 +-
 drivers/platform/x86/amd/hsmp/acpi.c  |  7 +++---
 drivers/platform/x86/amd/hsmp/hsmp.c  |  1 -
 drivers/platform/x86/amd/hsmp/hsmp.h  |  3 ---
 drivers/platform/x86/amd/hsmp/plat.c  | 36 +++++++++------------------
 9 files changed, 39 insertions(+), 34 deletions(-)

diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h
index 4c4efb93045ed..adfa0854cf2da 100644
--- a/arch/x86/include/asm/amd_nb.h
+++ b/arch/x86/include/asm/amd_nb.h
@@ -27,7 +27,6 @@ struct amd_l3_cache {
 };
 
 struct amd_northbridge {
-	struct pci_dev *root;
 	struct pci_dev *misc;
 	struct pci_dev *link;
 	struct amd_l3_cache l3_cache;
diff --git a/arch/x86/include/asm/amd_node.h b/arch/x86/include/asm/amd_node.h
index 113ad3e8ee40a..002c3afbd30f9 100644
--- a/arch/x86/include/asm/amd_node.h
+++ b/arch/x86/include/asm/amd_node.h
@@ -30,7 +30,20 @@ static inline u16 amd_num_nodes(void)
 	return topology_amd_nodes_per_pkg() * topology_max_packages();
 }
 
+#ifdef CONFIG_AMD_NODE
 int __must_check amd_smn_read(u16 node, u32 address, u32 *value);
 int __must_check amd_smn_write(u16 node, u32 address, u32 value);
 
+/* Should only be used by the HSMP driver. */
+int __must_check amd_smn_hsmp_rdwr(u16 node, u32 address, u32 *value, bool write);
+#else
+static inline int __must_check amd_smn_read(u16 node, u32 address, u32 *value) { return -ENODEV; }
+static inline int __must_check amd_smn_write(u16 node, u32 address, u32 value) { return -ENODEV; }
+
+static inline int __must_check amd_smn_hsmp_rdwr(u16 node, u32 address, u32 *value, bool write)
+{
+	return -ENODEV;
+}
+#endif /* CONFIG_AMD_NODE */
+
 #endif /*_ASM_X86_AMD_NODE_H_*/
diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
index 67e773744edb2..6d12a9b694327 100644
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
@@ -73,7 +73,6 @@ static int amd_cache_northbridges(void)
 	amd_northbridges.nb = nb;
 
 	for (i = 0; i < amd_northbridges.num; i++) {
-		node_to_amd_nb(i)->root = amd_node_get_root(i);
 		node_to_amd_nb(i)->misc = amd_node_get_func(i, 3);
 
 		/*
diff --git a/arch/x86/kernel/amd_node.c b/arch/x86/kernel/amd_node.c
index d2ec7fd555c51..65045f223c10a 100644
--- a/arch/x86/kernel/amd_node.c
+++ b/arch/x86/kernel/amd_node.c
@@ -97,6 +97,9 @@ static DEFINE_MUTEX(smn_mutex);
 #define SMN_INDEX_OFFSET	0x60
 #define SMN_DATA_OFFSET		0x64
 
+#define HSMP_INDEX_OFFSET	0xc4
+#define HSMP_DATA_OFFSET	0xc8
+
 /*
  * SMN accesses may fail in ways that are difficult to detect here in the called
  * functions amd_smn_read() and amd_smn_write(). Therefore, callers must do
@@ -179,6 +182,12 @@ int __must_check amd_smn_write(u16 node, u32 address, u32 value)
 }
 EXPORT_SYMBOL_GPL(amd_smn_write);
 
+int __must_check amd_smn_hsmp_rdwr(u16 node, u32 address, u32 *value, bool write)
+{
+	return __amd_smn_rw(HSMP_INDEX_OFFSET, HSMP_DATA_OFFSET, node, address, value, write);
+}
+EXPORT_SYMBOL_GPL(amd_smn_hsmp_rdwr);
+
 static int amd_cache_roots(void)
 {
 	u16 node, num_nodes = amd_num_nodes();
diff --git a/drivers/platform/x86/amd/hsmp/Kconfig b/drivers/platform/x86/amd/hsmp/Kconfig
index 7d10d4462a453..d6f7a62d55b5e 100644
--- a/drivers/platform/x86/amd/hsmp/Kconfig
+++ b/drivers/platform/x86/amd/hsmp/Kconfig
@@ -7,7 +7,7 @@ config AMD_HSMP
 	tristate
 
 menu "AMD HSMP Driver"
-	depends on AMD_NB || COMPILE_TEST
+	depends on AMD_NODE || COMPILE_TEST
 
 config AMD_HSMP_ACPI
 	tristate "AMD HSMP ACPI device driver"
diff --git a/drivers/platform/x86/amd/hsmp/acpi.c b/drivers/platform/x86/amd/hsmp/acpi.c
index 444b43be35a25..c1eccb3c80c5c 100644
--- a/drivers/platform/x86/amd/hsmp/acpi.c
+++ b/drivers/platform/x86/amd/hsmp/acpi.c
@@ -10,7 +10,6 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <asm/amd_hsmp.h>
-#include <asm/amd_nb.h>
 
 #include <linux/acpi.h>
 #include <linux/device.h>
@@ -24,6 +23,8 @@
 
 #include <uapi/asm-generic/errno-base.h>
 
+#include <asm/amd_node.h>
+
 #include "hsmp.h"
 
 #define DRIVER_NAME		"amd_hsmp"
@@ -321,8 +322,8 @@ static int hsmp_acpi_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	if (!hsmp_pdev->is_probed) {
-		hsmp_pdev->num_sockets = amd_nb_num();
-		if (hsmp_pdev->num_sockets == 0 || hsmp_pdev->num_sockets > MAX_AMD_SOCKETS)
+		hsmp_pdev->num_sockets = amd_num_nodes();
+		if (hsmp_pdev->num_sockets == 0 || hsmp_pdev->num_sockets > MAX_AMD_NUM_NODES)
 			return -ENODEV;
 
 		hsmp_pdev->sock = devm_kcalloc(&pdev->dev, hsmp_pdev->num_sockets,
diff --git a/drivers/platform/x86/amd/hsmp/hsmp.c b/drivers/platform/x86/amd/hsmp/hsmp.c
index 03164e30b3a50..a3ac09a90de45 100644
--- a/drivers/platform/x86/amd/hsmp/hsmp.c
+++ b/drivers/platform/x86/amd/hsmp/hsmp.c
@@ -8,7 +8,6 @@
  */
 
 #include <asm/amd_hsmp.h>
-#include <asm/amd_nb.h>
 
 #include <linux/acpi.h>
 #include <linux/delay.h>
diff --git a/drivers/platform/x86/amd/hsmp/hsmp.h b/drivers/platform/x86/amd/hsmp/hsmp.h
index e852f0a947e4f..af8b21f821d66 100644
--- a/drivers/platform/x86/amd/hsmp/hsmp.h
+++ b/drivers/platform/x86/amd/hsmp/hsmp.h
@@ -21,8 +21,6 @@
 
 #define HSMP_ATTR_GRP_NAME_SIZE	10
 
-#define MAX_AMD_SOCKETS 8
-
 #define HSMP_CDEV_NAME		"hsmp_cdev"
 #define HSMP_DEVNODE_NAME	"hsmp"
 
@@ -41,7 +39,6 @@ struct hsmp_socket {
 	void __iomem *virt_base_addr;
 	struct semaphore hsmp_sem;
 	char name[HSMP_ATTR_GRP_NAME_SIZE];
-	struct pci_dev *root;
 	struct device *dev;
 	u16 sock_ind;
 	int (*amd_hsmp_rdwr)(struct hsmp_socket *sock, u32 off, u32 *val, bool rw);
diff --git a/drivers/platform/x86/amd/hsmp/plat.c b/drivers/platform/x86/amd/hsmp/plat.c
index 02ca85762b686..b9782a078dbd2 100644
--- a/drivers/platform/x86/amd/hsmp/plat.c
+++ b/drivers/platform/x86/amd/hsmp/plat.c
@@ -10,14 +10,16 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <asm/amd_hsmp.h>
-#include <asm/amd_nb.h>
 
+#include <linux/build_bug.h>
 #include <linux/device.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/sysfs.h>
 
+#include <asm/amd_node.h>
+
 #include "hsmp.h"
 
 #define DRIVER_NAME		"amd_hsmp"
@@ -34,28 +36,12 @@
 #define SMN_HSMP_MSG_RESP	0x0010980
 #define SMN_HSMP_MSG_DATA	0x00109E0
 
-#define HSMP_INDEX_REG		0xc4
-#define HSMP_DATA_REG		0xc8
-
 static struct hsmp_plat_device *hsmp_pdev;
 
 static int amd_hsmp_pci_rdwr(struct hsmp_socket *sock, u32 offset,
 			     u32 *value, bool write)
 {
-	int ret;
-
-	if (!sock->root)
-		return -ENODEV;
-
-	ret = pci_write_config_dword(sock->root, HSMP_INDEX_REG,
-				     sock->mbinfo.base_addr + offset);
-	if (ret)
-		return ret;
-
-	ret = (write ? pci_write_config_dword(sock->root, HSMP_DATA_REG, *value)
-		     : pci_read_config_dword(sock->root, HSMP_DATA_REG, value));
-
-	return ret;
+	return amd_smn_hsmp_rdwr(sock->sock_ind, sock->mbinfo.base_addr + offset, value, write);
 }
 
 static ssize_t hsmp_metric_tbl_plat_read(struct file *filp, struct kobject *kobj,
@@ -95,7 +81,12 @@ static umode_t hsmp_is_sock_attr_visible(struct kobject *kobj,
  * Static array of 8 + 1(for NULL) elements is created below
  * to create sysfs groups for sockets.
  * is_bin_visible function is used to show / hide the necessary groups.
+ *
+ * Validate the maximum number against MAX_AMD_NUM_NODES. If this changes,
+ * then the attributes and groups below must be adjusted.
  */
+static_assert(MAX_AMD_NUM_NODES == 8);
+
 #define HSMP_BIN_ATTR(index, _list)					\
 static const struct bin_attribute attr##index = {			\
 	.attr = { .name = HSMP_METRICS_TABLE_NAME, .mode = 0444},	\
@@ -159,10 +150,7 @@ static int init_platform_device(struct device *dev)
 	int ret, i;
 
 	for (i = 0; i < hsmp_pdev->num_sockets; i++) {
-		if (!node_to_amd_nb(i))
-			return -ENODEV;
 		sock = &hsmp_pdev->sock[i];
-		sock->root			= node_to_amd_nb(i)->root;
 		sock->sock_ind			= i;
 		sock->dev			= dev;
 		sock->mbinfo.base_addr		= SMN_HSMP_BASE;
@@ -305,11 +293,11 @@ static int __init hsmp_plt_init(void)
 		return -ENOMEM;
 
 	/*
-	 * amd_nb_num() returns number of SMN/DF interfaces present in the system
+	 * amd_num_nodes() returns number of SMN/DF interfaces present in the system
 	 * if we have N SMN/DF interfaces that ideally means N sockets
 	 */
-	hsmp_pdev->num_sockets = amd_nb_num();
-	if (hsmp_pdev->num_sockets == 0 || hsmp_pdev->num_sockets > MAX_AMD_SOCKETS)
+	hsmp_pdev->num_sockets = amd_num_nodes();
+	if (hsmp_pdev->num_sockets == 0 || hsmp_pdev->num_sockets > MAX_AMD_NUM_NODES)
 		return ret;
 
 	ret = platform_driver_register(&amd_hsmp_driver);
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 006/145] platform/x86/amd/hsmp: Make amd_hsmp and hsmp_acpi as mutually exclusive drivers
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 005/145] x86/amd_node, platform/x86/amd/hsmp: Have HSMP use SMN through AMD_NODE Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 007/145] arm64: dts: rockchip: fix Sige5 RTC interrupt pin Greg Kroah-Hartman
                   ` (150 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Naveen Krishna Chatradhi,
	Gregory Price, Suma Hegde, Ilpo Järvinen, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Suma Hegde <suma.hegde@amd.com>

[ Upstream commit 0581d384f344ed0a963dd27cbff3c7af80c189e7 ]

amd_hsmp and hsmp_acpi are intended to be mutually exclusive drivers and
amd_hsmp is for legacy platforms. To achieve this, it is essential to
check for the presence of the ACPI device in plat.c. If the hsmp ACPI
device entry is found, allow the hsmp_acpi driver to manage the hsmp
and return an error from plat.c.

Additionally, rename the driver from amd_hsmp to hsmp_acpi to prevent
"Driver 'amd_hsmp' is already registered, aborting..." error in case
both drivers are loaded simultaneously.

Also, support both platform device based and ACPI based probing for
family 0x1A models 0x00 to 0x0F, implement only ACPI based probing
for family 0x1A, models 0x10 to 0x1F. Return false from
legacy_hsmp_support() for this platform.
This aligns with the condition check in is_f1a_m0h().

Link: https://lore.kernel.org/platform-driver-x86/aALZxvHWmphNL1wa@gourry-fedora-PF4VCD3F/
Fixes: 7d3135d16356 ("platform/x86/amd/hsmp: Create separate ACPI, plat and common drivers")
Reviewed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>
Co-developed-by: Gregory Price <gourry@gourry.net>
Signed-off-by: Gregory Price <gourry@gourry.net>
Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Link: https://lore.kernel.org/r/20250425102357.266790-1-suma.hegde@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/amd/hsmp/acpi.c | 3 +--
 drivers/platform/x86/amd/hsmp/hsmp.h | 1 +
 drivers/platform/x86/amd/hsmp/plat.c | 6 +++++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/amd/hsmp/acpi.c b/drivers/platform/x86/amd/hsmp/acpi.c
index c1eccb3c80c5c..eaae044e4f824 100644
--- a/drivers/platform/x86/amd/hsmp/acpi.c
+++ b/drivers/platform/x86/amd/hsmp/acpi.c
@@ -27,9 +27,8 @@
 
 #include "hsmp.h"
 
-#define DRIVER_NAME		"amd_hsmp"
+#define DRIVER_NAME		"hsmp_acpi"
 #define DRIVER_VERSION		"2.3"
-#define ACPI_HSMP_DEVICE_HID	"AMDI0097"
 
 /* These are the strings specified in ACPI table */
 #define MSG_IDOFF_STR		"MsgIdOffset"
diff --git a/drivers/platform/x86/amd/hsmp/hsmp.h b/drivers/platform/x86/amd/hsmp/hsmp.h
index af8b21f821d66..d58d4f0c20d55 100644
--- a/drivers/platform/x86/amd/hsmp/hsmp.h
+++ b/drivers/platform/x86/amd/hsmp/hsmp.h
@@ -23,6 +23,7 @@
 
 #define HSMP_CDEV_NAME		"hsmp_cdev"
 #define HSMP_DEVNODE_NAME	"hsmp"
+#define ACPI_HSMP_DEVICE_HID    "AMDI0097"
 
 struct hsmp_mbaddr_info {
 	u32 base_addr;
diff --git a/drivers/platform/x86/amd/hsmp/plat.c b/drivers/platform/x86/amd/hsmp/plat.c
index b9782a078dbd2..81931e808bbc8 100644
--- a/drivers/platform/x86/amd/hsmp/plat.c
+++ b/drivers/platform/x86/amd/hsmp/plat.c
@@ -11,6 +11,7 @@
 
 #include <asm/amd_hsmp.h>
 
+#include <linux/acpi.h>
 #include <linux/build_bug.h>
 #include <linux/device.h>
 #include <linux/module.h>
@@ -266,7 +267,7 @@ static bool legacy_hsmp_support(void)
 		}
 	case 0x1A:
 		switch (boot_cpu_data.x86_model) {
-		case 0x00 ... 0x1F:
+		case 0x00 ... 0x0F:
 			return true;
 		default:
 			return false;
@@ -288,6 +289,9 @@ static int __init hsmp_plt_init(void)
 		return ret;
 	}
 
+	if (acpi_dev_present(ACPI_HSMP_DEVICE_HID, NULL, -1))
+		return -ENODEV;
+
 	hsmp_pdev = get_hsmp_pdev();
 	if (!hsmp_pdev)
 		return -ENOMEM;
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 007/145] arm64: dts: rockchip: fix Sige5 RTC interrupt pin
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 006/145] platform/x86/amd/hsmp: Make amd_hsmp and hsmp_acpi as mutually exclusive drivers Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 008/145] riscv: dts: sophgo: fix DMA data-width configuration for CV18xx Greg Kroah-Hartman
                   ` (149 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Nicolas Frattaroli, Heiko Stuebner,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>

[ Upstream commit 4bf593be2e462623c4c34c7e3b604eb3f8f9de45 ]

Someone made a typo when they added the RTC to the Sige5 DTS, which
resulted in it using interrupts from GPIO0 B0 instead of GPIO0 A0. The
pinctrl entry for it wasn't typoed though, curiously enough.

The Sige5 v1.1 schematic was used to verify that GPIO0 A0 is the correct
pin for the RTC wakeup interrupt, so let's change it to that.

Fixes: 40f742b07ab2 ("arm64: dts: rockchip: Add rk3576-armsom-sige5 board")
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://lore.kernel.org/r/20250429-sige5-rtc-oopsie-v1-1-8686767d0f1f@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
index a9b9db31d2a3e..bab66b688e011 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
@@ -578,7 +578,7 @@
 		reg = <0x51>;
 		clock-output-names = "hym8563";
 		interrupt-parent = <&gpio0>;
-		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
+		interrupts = <RK_PA0 IRQ_TYPE_LEVEL_LOW>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&hym8563_int>;
 		wakeup-source;
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 008/145] riscv: dts: sophgo: fix DMA data-width configuration for CV18xx
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 007/145] arm64: dts: rockchip: fix Sige5 RTC interrupt pin Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 009/145] binfmt_elf: Move brk for static PIE even if ASLR disabled Greg Kroah-Hartman
                   ` (148 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Yu Yuan, Ze Huang, Inochi Amaoto,
	Chen Wang, Chen Wang, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ze Huang <huangze@whut.edu.cn>

[ Upstream commit 3e6244429ba38f8dee3336b8b805948276b281ab ]

The "snps,data-width" property[1] defines the AXI data width of the DMA
controller as:

    width = 8 × (2^n) bits

(0 = 8 bits, 1 = 16 bits, 2 = 32 bits, ..., 6 = 512 bits)
where "n" is the value of "snps,data-width".

For the CV18xx DMA controller, the correct AXI data width is 32 bits,
corresponding to "snps,data-width = 2".

Test results on Milkv Duo S can be found here [2].

Link: https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/dma/snps%2Cdw-axi-dmac.yaml#L74 [1]
Link: https://gist.github.com/Sutter099/4fa99bb2d89e5af975983124704b3861 [2]

Fixes: 514951a81a5e ("riscv: dts: sophgo: cv18xx: add DMA controller")
Co-developed-by: Yu Yuan <yu.yuan@sjtu.edu.cn>
Signed-off-by: Yu Yuan <yu.yuan@sjtu.edu.cn>
Signed-off-by: Ze Huang <huangze@whut.edu.cn>
Link: https://lore.kernel.org/r/20250428-duo-dma-config-v1-1-eb6ad836ca42@whut.edu.cn
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi
index c18822ec849f3..58cd546392e05 100644
--- a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi
@@ -341,7 +341,7 @@
 					   1024 1024 1024 1024>;
 			snps,priority = <0 1 2 3 4 5 6 7>;
 			snps,dma-masters = <2>;
-			snps,data-width = <4>;
+			snps,data-width = <2>;
 			status = "disabled";
 		};
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 009/145] binfmt_elf: Move brk for static PIE even if ASLR disabled
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 008/145] riscv: dts: sophgo: fix DMA data-width configuration for CV18xx Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 010/145] platform/x86/amd/pmc: Declare quirk_spurious_8042 for MECHREVO Wujie 14XA (GX4HRXL) Greg Kroah-Hartman
                   ` (147 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Ryan Roberts, Kees Cook, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kees Cook <kees@kernel.org>

[ Upstream commit 11854fe263eb1b9a8efa33b0c087add7719ea9b4 ]

In commit bbdc6076d2e5 ("binfmt_elf: move brk out of mmap when doing
direct loader exec"), the brk was moved out of the mmap region when
loading static PIE binaries (ET_DYN without INTERP). The common case
for these binaries was testing new ELF loaders, so the brk needed to
be away from mmap to avoid colliding with stack, future mmaps (of the
loader-loaded binary), etc. But this was only done when ASLR was enabled,
in an attempt to minimize changes to memory layouts.

After adding support to respect alignment requirements for static PIE
binaries in commit 3545deff0ec7 ("binfmt_elf: Honor PT_LOAD alignment
for static PIE"), it became possible to have a large gap after the
final PT_LOAD segment and the top of the mmap region. This means that
future mmap allocations might go after the last PT_LOAD segment (where
brk might be if ASLR was disabled) instead of before them (where they
traditionally ended up).

On arm64, running with ASLR disabled, Ubuntu 22.04's "ldconfig" binary,
a static PIE, has alignment requirements that leaves a gap large enough
after the last PT_LOAD segment to fit the vdso and vvar, but still leave
enough space for the brk (which immediately follows the last PT_LOAD
segment) to be allocated by the binary.

fffff7f20000-fffff7fde000 r-xp 00000000 fe:02 8110426 /sbin/ldconfig.real
fffff7fee000-fffff7ff5000 rw-p 000be000 fe:02 8110426 /sbin/ldconfig.real
fffff7ff5000-fffff7ffa000 rw-p 00000000 00:00 0
***[brk will go here at fffff7ffa000]***
fffff7ffc000-fffff7ffe000 r--p 00000000 00:00 0       [vvar]
fffff7ffe000-fffff8000000 r-xp 00000000 00:00 0       [vdso]
fffffffdf000-1000000000000 rw-p 00000000 00:00 0      [stack]

After commit 0b3bc3354eb9 ("arm64: vdso: Switch to generic storage
implementation"), the arm64 vvar grew slightly, and suddenly the brk
collided with the allocation.

fffff7f20000-fffff7fde000 r-xp 00000000 fe:02 8110426 /sbin/ldconfig.real
fffff7fee000-fffff7ff5000 rw-p 000be000 fe:02 8110426 /sbin/ldconfig.real
fffff7ff5000-fffff7ffa000 rw-p 00000000 00:00 0
***[oops, no room any more, vvar is at fffff7ffa000!]***
fffff7ffa000-fffff7ffe000 r--p 00000000 00:00 0       [vvar]
fffff7ffe000-fffff8000000 r-xp 00000000 00:00 0       [vdso]
fffffffdf000-1000000000000 rw-p 00000000 00:00 0      [stack]

The solution is to unconditionally move the brk out of the mmap region
for static PIE binaries. Whether ASLR is enabled or not does not change if
there may be future mmap allocation collisions with a growing brk region.

Update memory layout comments (with kernel-doc headings), consolidate
the setting of mm->brk to later (it isn't needed early), move static PIE
brk out of mmap unconditionally, and make sure brk(2) knows to base brk
position off of mm->start_brk not mm->end_data no matter what the cause of
moving it is (via current->brk_randomized).

For the CONFIG_COMPAT_BRK case, though, leave the logic unchanged, as we
can never safely move the brk. These systems, however, are not using
specially aligned static PIE binaries.

Reported-by: Ryan Roberts <ryan.roberts@arm.com>
Closes: https://lore.kernel.org/lkml/f93db308-4a0e-4806-9faf-98f890f5a5e6@arm.com/
Fixes: bbdc6076d2e5 ("binfmt_elf: move brk out of mmap when doing direct loader exec")
Link: https://lore.kernel.org/r/20250425224502.work.520-kees@kernel.org
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Tested-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/binfmt_elf.c | 71 ++++++++++++++++++++++++++++++++-----------------
 1 file changed, 47 insertions(+), 24 deletions(-)

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 8054f44d39cf7..855ef79561062 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -831,6 +831,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
 	struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
 	struct elf_phdr *elf_property_phdata = NULL;
 	unsigned long elf_brk;
+	bool brk_moved = false;
 	int retval, i;
 	unsigned long elf_entry;
 	unsigned long e_entry;
@@ -1098,15 +1099,19 @@ static int load_elf_binary(struct linux_binprm *bprm)
 			/* Calculate any requested alignment. */
 			alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum);
 
-			/*
-			 * There are effectively two types of ET_DYN
-			 * binaries: programs (i.e. PIE: ET_DYN with PT_INTERP)
-			 * and loaders (ET_DYN without PT_INTERP, since they
-			 * _are_ the ELF interpreter). The loaders must
-			 * be loaded away from programs since the program
-			 * may otherwise collide with the loader (especially
-			 * for ET_EXEC which does not have a randomized
-			 * position). For example to handle invocations of
+			/**
+			 * DOC: PIE handling
+			 *
+			 * There are effectively two types of ET_DYN ELF
+			 * binaries: programs (i.e. PIE: ET_DYN with
+			 * PT_INTERP) and loaders (i.e. static PIE: ET_DYN
+			 * without PT_INTERP, usually the ELF interpreter
+			 * itself). Loaders must be loaded away from programs
+			 * since the program may otherwise collide with the
+			 * loader (especially for ET_EXEC which does not have
+			 * a randomized position).
+			 *
+			 * For example, to handle invocations of
 			 * "./ld.so someprog" to test out a new version of
 			 * the loader, the subsequent program that the
 			 * loader loads must avoid the loader itself, so
@@ -1119,6 +1124,9 @@ static int load_elf_binary(struct linux_binprm *bprm)
 			 * ELF_ET_DYN_BASE and loaders are loaded into the
 			 * independently randomized mmap region (0 load_bias
 			 * without MAP_FIXED nor MAP_FIXED_NOREPLACE).
+			 *
+			 * See below for "brk" handling details, which is
+			 * also affected by program vs loader and ASLR.
 			 */
 			if (interpreter) {
 				/* On ET_DYN with PT_INTERP, we do the ASLR. */
@@ -1235,8 +1243,6 @@ static int load_elf_binary(struct linux_binprm *bprm)
 	start_data += load_bias;
 	end_data += load_bias;
 
-	current->mm->start_brk = current->mm->brk = ELF_PAGEALIGN(elf_brk);
-
 	if (interpreter) {
 		elf_entry = load_elf_interp(interp_elf_ex,
 					    interpreter,
@@ -1292,27 +1298,44 @@ static int load_elf_binary(struct linux_binprm *bprm)
 	mm->end_data = end_data;
 	mm->start_stack = bprm->p;
 
-	if ((current->flags & PF_RANDOMIZE) && (snapshot_randomize_va_space > 1)) {
+	/**
+	 * DOC: "brk" handling
+	 *
+	 * For architectures with ELF randomization, when executing a
+	 * loader directly (i.e. static PIE: ET_DYN without PT_INTERP),
+	 * move the brk area out of the mmap region and into the unused
+	 * ELF_ET_DYN_BASE region. Since "brk" grows up it may collide
+	 * early with the stack growing down or other regions being put
+	 * into the mmap region by the kernel (e.g. vdso).
+	 *
+	 * In the CONFIG_COMPAT_BRK case, though, everything is turned
+	 * off because we're not allowed to move the brk at all.
+	 */
+	if (!IS_ENABLED(CONFIG_COMPAT_BRK) &&
+	    IS_ENABLED(CONFIG_ARCH_HAS_ELF_RANDOMIZE) &&
+	    elf_ex->e_type == ET_DYN && !interpreter) {
+		elf_brk = ELF_ET_DYN_BASE;
+		/* This counts as moving the brk, so let brk(2) know. */
+		brk_moved = true;
+	}
+	mm->start_brk = mm->brk = ELF_PAGEALIGN(elf_brk);
+
+	if ((current->flags & PF_RANDOMIZE) && snapshot_randomize_va_space > 1) {
 		/*
-		 * For architectures with ELF randomization, when executing
-		 * a loader directly (i.e. no interpreter listed in ELF
-		 * headers), move the brk area out of the mmap region
-		 * (since it grows up, and may collide early with the stack
-		 * growing down), and into the unused ELF_ET_DYN_BASE region.
+		 * If we didn't move the brk to ELF_ET_DYN_BASE (above),
+		 * leave a gap between .bss and brk.
 		 */
-		if (IS_ENABLED(CONFIG_ARCH_HAS_ELF_RANDOMIZE) &&
-		    elf_ex->e_type == ET_DYN && !interpreter) {
-			mm->brk = mm->start_brk = ELF_ET_DYN_BASE;
-		} else {
-			/* Otherwise leave a gap between .bss and brk. */
+		if (!brk_moved)
 			mm->brk = mm->start_brk = mm->brk + PAGE_SIZE;
-		}
 
 		mm->brk = mm->start_brk = arch_randomize_brk(mm);
+		brk_moved = true;
+	}
+
 #ifdef compat_brk_randomized
+	if (brk_moved)
 		current->brk_randomized = 1;
 #endif
-	}
 
 	if (current->personality & MMAP_PAGE_ZERO) {
 		/* Why this, you ask???  Well SVr4 maps page 0 as read-only,
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 010/145] platform/x86/amd/pmc: Declare quirk_spurious_8042 for MECHREVO Wujie 14XA (GX4HRXL)
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 009/145] binfmt_elf: Move brk for static PIE even if ASLR disabled Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 011/145] platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection Greg Kroah-Hartman
                   ` (146 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Mingcong Bai, Xinhui Yang,
	Rong Zhang, Mario Limonciello, Yemu Lu, Runhua He,
	Ilpo Järvinen, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Runhua He <hua@aosc.io>

[ Upstream commit 0887817e4953885fbd6a5c1bec2fdd339261eb19 ]

MECHREVO Wujie 14XA (GX4HRXL) wakes up immediately after s2idle entry.
This happens regardless of whether the laptop is plugged into AC power,
or whether any peripheral is plugged into the laptop.

Similar to commit a55bdad5dfd1 ("platform/x86/amd/pmc: Disable keyboard
wakeup on AMD Framework 13"), the MECHREVO Wujie 14XA wakes up almost
instantly after s2idle suspend entry (IRQ1 is the keyboard):

2025-04-18 17:23:57,588 DEBUG:  PM: Triggering wakeup from IRQ 9
2025-04-18 17:23:57,588 DEBUG:  PM: Triggering wakeup from IRQ 1

Add this model to the spurious_8042 quirk to workaround this.

This patch does not affect the wake-up function of the built-in keyboard.
Because the firmware of this machine adds an insurance for keyboard
wake-up events, as it always triggers an additional IRQ 9 to wake up the
system.

Suggested-by: Mingcong Bai <jeffbai@aosc.io>
Suggested-by: Xinhui Yang <cyan@cyano.uk>
Suggested-by: Rong Zhang <i@rong.moe>
Fixes: a55bdad5dfd1 ("platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4166
Cc: Mario Limonciello <mario.limonciello@amd.com>
Link: https://zhuanldan.zhihu.com/p/730538041
Tested-by: Yemu Lu <prcups@krgm.moe>
Signed-off-by: Runhua He <hua@aosc.io>
Link: https://lore.kernel.org/r/20250507100103.995395-1-hua@aosc.io
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/amd/pmc/pmc-quirks.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
index b4f49720c87f6..2e3f6fc67c568 100644
--- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
+++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
@@ -217,6 +217,13 @@ static const struct dmi_system_id fwbug_list[] = {
 			DMI_MATCH(DMI_BIOS_VERSION, "03.05"),
 		}
 	},
+	{
+		.ident = "MECHREVO Wujie 14X (GX4HRXL)",
+		.driver_data = &quirk_spurious_8042,
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "WUJIE14-GX4HRXL"),
+		}
+	},
 	{}
 };
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 011/145] platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 010/145] platform/x86/amd/pmc: Declare quirk_spurious_8042 for MECHREVO Wujie 14XA (GX4HRXL) Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 012/145] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout Greg Kroah-Hartman
                   ` (145 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Hans de Goede, Armin Wolf,
	Ilpo Järvinen, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hans de Goede <hdegoede@redhat.com>

[ Upstream commit bfcfe6d335a967f8ea0c1980960e6f0205b5de6e ]

The wlan_ctrl_by_user detection was introduced by commit a50bd128f28c
("asus-wmi: record wlan status while controlled by userapp").

Quoting from that commit's commit message:

"""
When you call WMIMethod(DSTS, 0x00010011) to get WLAN status, it may return

(1) 0x00050001 (On)
(2) 0x00050000 (Off)
(3) 0x00030001 (On)
(4) 0x00030000 (Off)
(5) 0x00000002 (Unknown)

(1), (2) means that the model has hardware GPIO for WLAN, you can call
WMIMethod(DEVS, 0x00010011, 1 or 0) to turn WLAN on/off.
(3), (4) means that the model doesn’t have hardware GPIO, you need to use
API or driver library to turn WLAN on/off, and call
WMIMethod(DEVS, 0x00010012, 1 or 0) to set WLAN LED status.
After you set WLAN LED status, you can see the WLAN status is changed with
WMIMethod(DSTS, 0x00010011). Because the status is recorded lastly
(ex: Windows), you can use it for synchronization.
(5) means that the model doesn’t have WLAN device.

WLAN is the ONLY special case with upper rule.
"""

The wlan_ctrl_by_user flag should be set on 0x0003000? ((3), (4) above)
return values, but the flag mistakenly also gets set on laptops with
0x0005000? ((1), (2)) return values. This is causing rfkill problems on
laptops where 0x0005000? is returned.

Fix the check to only set the wlan_ctrl_by_user flag for 0x0003000?
return values.

Fixes: a50bd128f28c ("asus-wmi: record wlan status while controlled by userapp")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219786
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20250501131702.103360-2-hdegoede@redhat.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/asus-wmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 38ef778e8c19b..f66d152e265da 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -4777,7 +4777,8 @@ static int asus_wmi_add(struct platform_device *pdev)
 		goto fail_leds;
 
 	asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_WLAN, &result);
-	if (result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT))
+	if ((result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT)) ==
+	    (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT))
 		asus->driver->wlan_ctrl_by_user = 1;
 
 	if (!(asus->driver->wlan_ctrl_by_user && ashs_present())) {
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 012/145] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 011/145] platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 013/145] cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks Greg Kroah-Hartman
                   ` (144 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Himanshu Bhavani, Tarang Raval,
	Shawn Guo, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>

[ Upstream commit c6888983134e2ccc2db8ffd2720b0d4826d952e4 ]

Fix SD card timeout issue caused by LDO5 regulator getting disabled
after boot.

The kernel log shows LDO5 being disabled, which leads to a timeout
on USDHC2:
[   33.760561] LDO5: disabling
[   81.119861] mmc1: Timeout waiting for hardware interrupt.

To prevent this, set regulator-boot-on and regulator-always-on for
LDO5. Also add the vqmmc regulator to properly support 1.8V/3.3V
signaling for USDHC2 using a GPIO-controlled regulator.

Fixes: 6c2a1f4f71258 ("arm64: dts: imx8mp-var-som-symphony: Add Variscite Symphony board and VAR-SOM-MX8MP SoM")
Signed-off-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
Acked-by: Tarang Raval <tarang.raval@siliconsignals.io>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi
index b2ac2583a5929..b59da91fdd041 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi
@@ -35,7 +35,6 @@
 		      <0x1 0x00000000 0 0xc0000000>;
 	};
 
-
 	reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
 	        compatible = "regulator-fixed";
 	        regulator-name = "VSD_3V3";
@@ -46,6 +45,16 @@
 	        startup-delay-us = <100>;
 	        off-on-delay-us = <12000>;
 	};
+
+	reg_usdhc2_vqmmc: regulator-usdhc2-vqmmc {
+		compatible = "regulator-gpio";
+		regulator-name = "VSD_VSEL";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+		gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
+		states = <3300000 0x0 1800000 0x1>;
+		vin-supply = <&ldo5>;
+	};
 };
 
 &A53_0 {
@@ -205,6 +214,7 @@
         pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
         cd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
         vmmc-supply = <&reg_usdhc2_vmmc>;
+	vqmmc-supply = <&reg_usdhc2_vqmmc>;
         bus-width = <4>;
         status = "okay";
 };
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 013/145] cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 012/145] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 014/145] tracing: fprobe: Fix RCU warning message in list traversal Greg Kroah-Hartman
                   ` (143 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Waiman Long, Frederic Weisbecker,
	Tejun Heo, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Waiman Long <longman@redhat.com>

[ Upstream commit 39b5ef791d109dd54c7c2e6e87933edfcc0ad1ac ]

Commit ec5fbdfb99d1 ("cgroup/cpuset: Enable update_tasks_cpumask()
on top_cpuset") enabled us to pull CPUs dedicated to child partitions
from tasks in top_cpuset by ignoring per cpu kthreads. However, there
can be other kthreads that are not per cpu but have PF_NO_SETAFFINITY
flag set to indicate that we shouldn't mess with their CPU affinity.
For other kthreads, their affinity will be changed to skip CPUs dedicated
to child partitions whether it is an isolating or a scheduling one.

As all the per cpu kthreads have PF_NO_SETAFFINITY set, the
PF_NO_SETAFFINITY tasks are essentially a superset of per cpu kthreads.
Fix this issue by dropping the kthread_is_per_cpu() check and checking
the PF_NO_SETAFFINITY flag instead.

Fixes: ec5fbdfb99d1 ("cgroup/cpuset: Enable update_tasks_cpumask() on top_cpuset")
Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/cgroup/cpuset.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 1287274ae1ce9..6fbffdca0c741 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -1116,9 +1116,11 @@ void cpuset_update_tasks_cpumask(struct cpuset *cs, struct cpumask *new_cpus)
 
 		if (top_cs) {
 			/*
-			 * Percpu kthreads in top_cpuset are ignored
+			 * PF_NO_SETAFFINITY tasks are ignored.
+			 * All per cpu kthreads should have PF_NO_SETAFFINITY
+			 * flag set, see kthread_set_per_cpu().
 			 */
-			if (kthread_is_per_cpu(task))
+			if (task->flags & PF_NO_SETAFFINITY)
 				continue;
 			cpumask_andnot(new_cpus, possible_mask, subpartitions_cpus);
 		} else {
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 014/145] tracing: fprobe: Fix RCU warning message in list traversal
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 013/145] cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 015/145] tracing: probes: Fix a possible race in trace_probe_log APIs Greg Kroah-Hartman
                   ` (142 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Breno Leitao, Antonio Quartulli,
	Matthieu Baerts (NGI0), Masami Hiramatsu (Google), Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Breno Leitao <leitao@debian.org>

[ Upstream commit 9dda18a32b4a6693fccd3f7c0738af646147b1cf ]

When CONFIG_PROVE_RCU_LIST is enabled, fprobe triggers the following
warning:

    WARNING: suspicious RCU usage
    kernel/trace/fprobe.c:457 RCU-list traversed in non-reader section!!

    other info that might help us debug this:
	#1: ffffffff863c4e08 (fprobe_mutex){+.+.}-{4:4}, at: fprobe_module_callback+0x7b/0x8c0

    Call Trace:
	fprobe_module_callback
	notifier_call_chain
	blocking_notifier_call_chain

This warning occurs because fprobe_remove_node_in_module() traverses an
RCU list using RCU primitives without holding an RCU read lock. However,
the function is only called from fprobe_module_callback(), which holds
the fprobe_mutex lock that provides sufficient protection for safely
traversing the list.

Fix the warning by specifying the locking design to the
CONFIG_PROVE_RCU_LIST mechanism. Add the lockdep_is_held() argument to
hlist_for_each_entry_rcu() to inform the RCU checker that fprobe_mutex
provides the required protection.

Link: https://lore.kernel.org/all/20250410-fprobe-v1-1-068ef5f41436@debian.org/

Fixes: a3dc2983ca7b90 ("tracing: fprobe: Cleanup fprobe hash when module unloading")
Signed-off-by: Breno Leitao <leitao@debian.org>
Tested-by: Antonio Quartulli <antonio@mandelbit.com>
Tested-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/trace/fprobe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c
index 95c6e3473a76b..ba7ff14f5339b 100644
--- a/kernel/trace/fprobe.c
+++ b/kernel/trace/fprobe.c
@@ -454,7 +454,8 @@ static void fprobe_remove_node_in_module(struct module *mod, struct hlist_head *
 	struct fprobe_hlist_node *node;
 	int ret = 0;
 
-	hlist_for_each_entry_rcu(node, head, hlist) {
+	hlist_for_each_entry_rcu(node, head, hlist,
+				 lockdep_is_held(&fprobe_mutex)) {
 		if (!within_module(node->addr, mod))
 			continue;
 		if (delete_fprobe_node(node))
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 015/145] tracing: probes: Fix a possible race in trace_probe_log APIs
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 014/145] tracing: fprobe: Fix RCU warning message in list traversal Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 016/145] tpm: tis: Double the timeout B to 4s Greg Kroah-Hartman
                   ` (141 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Paul Cacheux,
	Masami Hiramatsu (Google), Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Masami Hiramatsu (Google) <mhiramat@kernel.org>

[ Upstream commit fd837de3c9cb1a162c69bc1fb1f438467fe7f2f5 ]

Since the shared trace_probe_log variable can be accessed and
modified via probe event create operation of kprobe_events,
uprobe_events, and dynamic_events, it should be protected.
In the dynamic_events, all operations are serialized by
`dyn_event_ops_mutex`. But kprobe_events and uprobe_events
interfaces are not serialized.

To solve this issue, introduces dyn_event_create(), which runs
create() operation under the mutex, for kprobe_events and
uprobe_events. This also uses lockdep to check the mutex is
held when using trace_probe_log* APIs.

Link: https://lore.kernel.org/all/174684868120.551552.3068655787654268804.stgit@devnote2/

Reported-by: Paul Cacheux <paulcacheux@gmail.com>
Closes: https://lore.kernel.org/all/20250510074456.805a16872b591e2971a4d221@kernel.org/
Fixes: ab105a4fb894 ("tracing: Use tracing error_log with probe events")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/trace/trace_dynevent.c | 16 +++++++++++++++-
 kernel/trace/trace_dynevent.h |  1 +
 kernel/trace/trace_kprobe.c   |  2 +-
 kernel/trace/trace_probe.c    |  9 +++++++++
 kernel/trace/trace_uprobe.c   |  2 +-
 5 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/trace_dynevent.c b/kernel/trace/trace_dynevent.c
index a322e4f249a50..5d64a18cacacc 100644
--- a/kernel/trace/trace_dynevent.c
+++ b/kernel/trace/trace_dynevent.c
@@ -16,7 +16,7 @@
 #include "trace_output.h"	/* for trace_event_sem */
 #include "trace_dynevent.h"
 
-static DEFINE_MUTEX(dyn_event_ops_mutex);
+DEFINE_MUTEX(dyn_event_ops_mutex);
 static LIST_HEAD(dyn_event_ops_list);
 
 bool trace_event_dyn_try_get_ref(struct trace_event_call *dyn_call)
@@ -116,6 +116,20 @@ int dyn_event_release(const char *raw_command, struct dyn_event_operations *type
 	return ret;
 }
 
+/*
+ * Locked version of event creation. The event creation must be protected by
+ * dyn_event_ops_mutex because of protecting trace_probe_log.
+ */
+int dyn_event_create(const char *raw_command, struct dyn_event_operations *type)
+{
+	int ret;
+
+	mutex_lock(&dyn_event_ops_mutex);
+	ret = type->create(raw_command);
+	mutex_unlock(&dyn_event_ops_mutex);
+	return ret;
+}
+
 static int create_dyn_event(const char *raw_command)
 {
 	struct dyn_event_operations *ops;
diff --git a/kernel/trace/trace_dynevent.h b/kernel/trace/trace_dynevent.h
index 936477a111d3e..beee3f8d75444 100644
--- a/kernel/trace/trace_dynevent.h
+++ b/kernel/trace/trace_dynevent.h
@@ -100,6 +100,7 @@ void *dyn_event_seq_next(struct seq_file *m, void *v, loff_t *pos);
 void dyn_event_seq_stop(struct seq_file *m, void *v);
 int dyn_events_release_all(struct dyn_event_operations *type);
 int dyn_event_release(const char *raw_command, struct dyn_event_operations *type);
+int dyn_event_create(const char *raw_command, struct dyn_event_operations *type);
 
 /*
  * for_each_dyn_event	-	iterate over the dyn_event list
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 8287b175667f3..a5d46f109fcce 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -1092,7 +1092,7 @@ static int create_or_delete_trace_kprobe(const char *raw_command)
 	if (raw_command[0] == '-')
 		return dyn_event_release(raw_command, &trace_kprobe_ops);
 
-	ret = trace_kprobe_create(raw_command);
+	ret = dyn_event_create(raw_command, &trace_kprobe_ops);
 	return ret == -ECANCELED ? -EINVAL : ret;
 }
 
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index 2eeecb6c95eea..424751cdf31f9 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -154,9 +154,12 @@ static const struct fetch_type *find_fetch_type(const char *type, unsigned long
 }
 
 static struct trace_probe_log trace_probe_log;
+extern struct mutex dyn_event_ops_mutex;
 
 void trace_probe_log_init(const char *subsystem, int argc, const char **argv)
 {
+	lockdep_assert_held(&dyn_event_ops_mutex);
+
 	trace_probe_log.subsystem = subsystem;
 	trace_probe_log.argc = argc;
 	trace_probe_log.argv = argv;
@@ -165,11 +168,15 @@ void trace_probe_log_init(const char *subsystem, int argc, const char **argv)
 
 void trace_probe_log_clear(void)
 {
+	lockdep_assert_held(&dyn_event_ops_mutex);
+
 	memset(&trace_probe_log, 0, sizeof(trace_probe_log));
 }
 
 void trace_probe_log_set_index(int index)
 {
+	lockdep_assert_held(&dyn_event_ops_mutex);
+
 	trace_probe_log.index = index;
 }
 
@@ -178,6 +185,8 @@ void __trace_probe_log_err(int offset, int err_type)
 	char *command, *p;
 	int i, len = 0, pos = 0;
 
+	lockdep_assert_held(&dyn_event_ops_mutex);
+
 	if (!trace_probe_log.argv)
 		return;
 
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index 3386439ec9f67..35cf76c75dd76 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -741,7 +741,7 @@ static int create_or_delete_trace_uprobe(const char *raw_command)
 	if (raw_command[0] == '-')
 		return dyn_event_release(raw_command, &trace_uprobe_ops);
 
-	ret = trace_uprobe_create(raw_command);
+	ret = dyn_event_create(raw_command, &trace_uprobe_ops);
 	return ret == -ECANCELED ? -EINVAL : ret;
 }
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 016/145] tpm: tis: Double the timeout B to 4s
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 015/145] tracing: probes: Fix a possible race in trace_probe_log APIs Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 017/145] iio: adc: ad7606: move the software mode configuration Greg Kroah-Hartman
                   ` (140 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Michal Suchanek, Jarkko Sakkinen,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Michal Suchanek <msuchanek@suse.de>

[ Upstream commit 2f661f71fda1fc0c42b7746ca5b7da529eb6b5be ]

With some Infineon chips the timeouts in tpm_tis_send_data (both B and
C) can reach up to about 2250 ms.

Timeout C is retried since
commit de9e33df7762 ("tpm, tpm_tis: Workaround failed command reception on Infineon devices")

Timeout B still needs to be extended.

The problem is most commonly encountered with context related operation
such as load context/save context. These are issued directly by the
kernel, and there is no retry logic for them.

When a filesystem is set up to use the TPM for unlocking the boot fails,
and restarting the userspace service is ineffective. This is likely
because ignoring a load context/save context result puts the real TPM
state and the TPM state expected by the kernel out of sync.

Chips known to be affected:
tpm_tis IFX1522:00: 2.0 TPM (device-id 0x1D, rev-id 54)
Description: SLB9672
Firmware Revision: 15.22

tpm_tis MSFT0101:00: 2.0 TPM (device-id 0x1B, rev-id 22)
Firmware Revision: 7.83

tpm_tis MSFT0101:00: 2.0 TPM (device-id 0x1A, rev-id 16)
Firmware Revision: 5.63

Link: https://lore.kernel.org/linux-integrity/Z5pI07m0Muapyu9w@kitsune.suse.cz/
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/char/tpm/tpm_tis_core.h | 2 +-
 include/linux/tpm.h             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
index 970d02c337c7f..6c3aa480396b6 100644
--- a/drivers/char/tpm/tpm_tis_core.h
+++ b/drivers/char/tpm/tpm_tis_core.h
@@ -54,7 +54,7 @@ enum tis_int_flags {
 enum tis_defaults {
 	TIS_MEM_LEN = 0x5000,
 	TIS_SHORT_TIMEOUT = 750,	/* ms */
-	TIS_LONG_TIMEOUT = 2000,	/* 2 sec */
+	TIS_LONG_TIMEOUT = 4000,	/* 4 secs */
 	TIS_TIMEOUT_MIN_ATML = 14700,	/* usecs */
 	TIS_TIMEOUT_MAX_ATML = 15000,	/* usecs */
 };
diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index 6c3125300c009..3db0b6a87d454 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -224,7 +224,7 @@ enum tpm2_const {
 
 enum tpm2_timeouts {
 	TPM2_TIMEOUT_A          =    750,
-	TPM2_TIMEOUT_B          =   2000,
+	TPM2_TIMEOUT_B          =   4000,
 	TPM2_TIMEOUT_C          =    200,
 	TPM2_TIMEOUT_D          =     30,
 	TPM2_DURATION_SHORT     =     20,
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 017/145] iio: adc: ad7606: move the software mode configuration
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 016/145] tpm: tis: Double the timeout B to 4s Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 018/145] iio: adc: ad7606: move software functions into common file Greg Kroah-Hartman
                   ` (139 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Guillaume Stols, Jonathan Cameron,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Guillaume Stols <gstols@baylibre.com>

[ Upstream commit f2a62931b39478c98f977caf299df5bc072f38e0 ]

This is a preparation for the intoduction of the sofware functions in
the iio backend version of the driver.
The software mode configuration must be executed once the channels are
configured, and the number of channels is known. This is not the case
before iio-backend's configuration is called, and iio backend version of
the driver does not have a timestamp channel.
Also the sw_mode_config callback is configured during the iio-backend
configuration.
For clarity purpose, I moved the entire block instead of just the
concerned function calls.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20250210-wip-bl-ad7606_add_backend_sw_mode-v4-2-160df18b1da7@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: 5257d80e22bf ("iio: adc: ad7606: check for NULL before calling sw_mode_config()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/iio/adc/ad7606.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c
index d39354afd5394..376c808df11c7 100644
--- a/drivers/iio/adc/ad7606.c
+++ b/drivers/iio/adc/ad7606.c
@@ -1246,17 +1246,6 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,
 			return -ERESTARTSYS;
 	}
 
-	st->write_scale = ad7606_write_scale_hw;
-	st->write_os = ad7606_write_os_hw;
-
-	ret = ad7606_sw_mode_setup(indio_dev);
-	if (ret)
-		return ret;
-
-	ret = ad7606_chan_scales_setup(indio_dev);
-	if (ret)
-		return ret;
-
 	/* If convst pin is not defined, setup PWM. */
 	if (!st->gpio_convst) {
 		st->cnvst_pwm = devm_pwm_get(dev, NULL);
@@ -1334,6 +1323,17 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,
 			return ret;
 	}
 
+	st->write_scale = ad7606_write_scale_hw;
+	st->write_os = ad7606_write_os_hw;
+
+	ret = ad7606_sw_mode_setup(indio_dev);
+	if (ret)
+		return ret;
+
+	ret = ad7606_chan_scales_setup(indio_dev);
+	if (ret)
+		return ret;
+
 	return devm_iio_device_register(dev, indio_dev);
 }
 EXPORT_SYMBOL_NS_GPL(ad7606_probe, "IIO_AD7606");
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 018/145] iio: adc: ad7606: move software functions into common file
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 017/145] iio: adc: ad7606: move the software mode configuration Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 019/145] iio: adc: ad7606: check for NULL before calling sw_mode_config() Greg Kroah-Hartman
                   ` (138 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Guillaume Stols, Angelo Dureghello,
	Jonathan Cameron, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Guillaume Stols <gstols@baylibre.com>

[ Upstream commit d2477887f6677de0675e600f1590378a5fb52909 ]

Since the register are always the same, whatever bus is used, moving the
software functions into the main file avoids the code to be duplicated
in both SPI and parallel version of the driver.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Co-developed-by: Angelo Dureghello <adureghello@baylibre.com>
Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
Link: https://patch.msgid.link/20250210-wip-bl-ad7606_add_backend_sw_mode-v4-3-160df18b1da7@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: 5257d80e22bf ("iio: adc: ad7606: check for NULL before calling sw_mode_config()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/iio/adc/ad7606.c     | 133 +++++++++++++++++++++++++++++++---
 drivers/iio/adc/ad7606.h     |  37 +++++++++-
 drivers/iio/adc/ad7606_spi.c | 137 +----------------------------------
 3 files changed, 158 insertions(+), 149 deletions(-)

diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c
index 376c808df11c7..7985570ed1521 100644
--- a/drivers/iio/adc/ad7606.c
+++ b/drivers/iio/adc/ad7606.c
@@ -85,6 +85,10 @@ static const unsigned int ad7606_oversampling_avail[7] = {
 	1, 2, 4, 8, 16, 32, 64,
 };
 
+static const unsigned int ad7606b_oversampling_avail[9] = {
+	1, 2, 4, 8, 16, 32, 64, 128, 256,
+};
+
 static const unsigned int ad7616_oversampling_avail[8] = {
 	1, 2, 4, 8, 16, 32, 64, 128,
 };
@@ -187,6 +191,8 @@ static int ad7608_chan_scale_setup(struct iio_dev *indio_dev,
 				   struct iio_chan_spec *chan, int ch);
 static int ad7609_chan_scale_setup(struct iio_dev *indio_dev,
 				   struct iio_chan_spec *chan, int ch);
+static int ad7616_sw_mode_setup(struct iio_dev *indio_dev);
+static int ad7606b_sw_mode_setup(struct iio_dev *indio_dev);
 
 const struct ad7606_chip_info ad7605_4_info = {
 	.channels = ad7605_channels,
@@ -239,6 +245,7 @@ const struct ad7606_chip_info ad7606b_info = {
 	.oversampling_avail = ad7606_oversampling_avail,
 	.oversampling_num = ARRAY_SIZE(ad7606_oversampling_avail),
 	.scale_setup_cb = ad7606_16bit_chan_scale_setup,
+	.sw_setup_cb = ad7606b_sw_mode_setup,
 };
 EXPORT_SYMBOL_NS_GPL(ad7606b_info, "IIO_AD7606");
 
@@ -250,6 +257,7 @@ const struct ad7606_chip_info ad7606c_16_info = {
 	.oversampling_avail = ad7606_oversampling_avail,
 	.oversampling_num = ARRAY_SIZE(ad7606_oversampling_avail),
 	.scale_setup_cb = ad7606c_16bit_chan_scale_setup,
+	.sw_setup_cb = ad7606b_sw_mode_setup,
 };
 EXPORT_SYMBOL_NS_GPL(ad7606c_16_info, "IIO_AD7606");
 
@@ -294,6 +302,7 @@ const struct ad7606_chip_info ad7606c_18_info = {
 	.oversampling_avail = ad7606_oversampling_avail,
 	.oversampling_num = ARRAY_SIZE(ad7606_oversampling_avail),
 	.scale_setup_cb = ad7606c_18bit_chan_scale_setup,
+	.sw_setup_cb = ad7606b_sw_mode_setup,
 };
 EXPORT_SYMBOL_NS_GPL(ad7606c_18_info, "IIO_AD7606");
 
@@ -307,6 +316,7 @@ const struct ad7606_chip_info ad7616_info = {
 	.oversampling_num = ARRAY_SIZE(ad7616_oversampling_avail),
 	.os_req_reset = true,
 	.scale_setup_cb = ad7606_16bit_chan_scale_setup,
+	.sw_setup_cb = ad7616_sw_mode_setup,
 };
 EXPORT_SYMBOL_NS_GPL(ad7616_info, "IIO_AD7606");
 
@@ -1138,16 +1148,118 @@ static const struct iio_trigger_ops ad7606_trigger_ops = {
 	.validate_device = iio_trigger_validate_own_device,
 };
 
-static int ad7606_sw_mode_setup(struct iio_dev *indio_dev)
+static int ad7606_write_mask(struct ad7606_state *st, unsigned int addr,
+			     unsigned long mask, unsigned int val)
+{
+	int readval;
+
+	readval = st->bops->reg_read(st, addr);
+	if (readval < 0)
+		return readval;
+
+	readval &= ~mask;
+	readval |= val;
+
+	return st->bops->reg_write(st, addr, readval);
+}
+
+static int ad7616_write_scale_sw(struct iio_dev *indio_dev, int ch, int val)
 {
 	struct ad7606_state *st = iio_priv(indio_dev);
+	unsigned int ch_addr, mode, ch_index;
 
-	st->sw_mode_en = st->bops->sw_mode_config &&
-			 device_property_present(st->dev, "adi,sw-mode");
-	if (!st->sw_mode_en)
-		return 0;
+	/*
+	 * Ad7616 has 16 channels divided in group A and group B.
+	 * The range of channels from A are stored in registers with address 4
+	 * while channels from B are stored in register with address 6.
+	 * The last bit from channels determines if it is from group A or B
+	 * because the order of channels in iio is 0A, 0B, 1A, 1B...
+	 */
+	ch_index = ch >> 1;
+
+	ch_addr = AD7616_RANGE_CH_ADDR(ch_index);
+
+	if ((ch & 0x1) == 0) /* channel A */
+		ch_addr += AD7616_RANGE_CH_A_ADDR_OFF;
+	else	/* channel B */
+		ch_addr += AD7616_RANGE_CH_B_ADDR_OFF;
+
+	/* 0b01 for 2.5v, 0b10 for 5v and 0b11 for 10v */
+	mode = AD7616_RANGE_CH_MODE(ch_index, ((val + 1) & 0b11));
 
-	indio_dev->info = &ad7606_info_sw_mode;
+	return ad7606_write_mask(st, ch_addr, AD7616_RANGE_CH_MSK(ch_index),
+				 mode);
+}
+
+static int ad7616_write_os_sw(struct iio_dev *indio_dev, int val)
+{
+	struct ad7606_state *st = iio_priv(indio_dev);
+
+	return ad7606_write_mask(st, AD7616_CONFIGURATION_REGISTER,
+				 AD7616_OS_MASK, val << 2);
+}
+
+static int ad7606_write_scale_sw(struct iio_dev *indio_dev, int ch, int val)
+{
+	struct ad7606_state *st = iio_priv(indio_dev);
+
+	return ad7606_write_mask(st, AD7606_RANGE_CH_ADDR(ch),
+				 AD7606_RANGE_CH_MSK(ch),
+				 AD7606_RANGE_CH_MODE(ch, val));
+}
+
+static int ad7606_write_os_sw(struct iio_dev *indio_dev, int val)
+{
+	struct ad7606_state *st = iio_priv(indio_dev);
+
+	return st->bops->reg_write(st, AD7606_OS_MODE, val);
+}
+
+static int ad7616_sw_mode_setup(struct iio_dev *indio_dev)
+{
+	struct ad7606_state *st = iio_priv(indio_dev);
+	int ret;
+
+	/*
+	 * Scale can be configured individually for each channel
+	 * in software mode.
+	 */
+
+	st->write_scale = ad7616_write_scale_sw;
+	st->write_os = &ad7616_write_os_sw;
+
+	ret = st->bops->sw_mode_config(indio_dev);
+	if (ret)
+		return ret;
+
+	/* Activate Burst mode and SEQEN MODE */
+	return ad7606_write_mask(st, AD7616_CONFIGURATION_REGISTER,
+				 AD7616_BURST_MODE | AD7616_SEQEN_MODE,
+				 AD7616_BURST_MODE | AD7616_SEQEN_MODE);
+}
+
+static int ad7606b_sw_mode_setup(struct iio_dev *indio_dev)
+{
+	struct ad7606_state *st = iio_priv(indio_dev);
+	DECLARE_BITMAP(os, 3);
+
+	bitmap_fill(os, 3);
+	/*
+	 * Software mode is enabled when all three oversampling
+	 * pins are set to high. If oversampling gpios are defined
+	 * in the device tree, then they need to be set to high,
+	 * otherwise, they must be hardwired to VDD
+	 */
+	if (st->gpio_os) {
+		gpiod_set_array_value(st->gpio_os->ndescs, st->gpio_os->desc,
+				      st->gpio_os->info, os);
+	}
+	/* OS of 128 and 256 are available only in software mode */
+	st->oversampling_avail = ad7606b_oversampling_avail;
+	st->num_os_ratios = ARRAY_SIZE(ad7606b_oversampling_avail);
+
+	st->write_scale = ad7606_write_scale_sw;
+	st->write_os = &ad7606_write_os_sw;
 
 	return st->bops->sw_mode_config(indio_dev);
 }
@@ -1326,9 +1438,12 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,
 	st->write_scale = ad7606_write_scale_hw;
 	st->write_os = ad7606_write_os_hw;
 
-	ret = ad7606_sw_mode_setup(indio_dev);
-	if (ret)
-		return ret;
+	st->sw_mode_en = st->chip_info->sw_setup_cb &&
+			 device_property_present(st->dev, "adi,sw-mode");
+	if (st->sw_mode_en) {
+		indio_dev->info = &ad7606_info_sw_mode;
+		st->chip_info->sw_setup_cb(indio_dev);
+	}
 
 	ret = ad7606_chan_scales_setup(indio_dev);
 	if (ret)
diff --git a/drivers/iio/adc/ad7606.h b/drivers/iio/adc/ad7606.h
index 8778ffe515b30..7a044b499cfe1 100644
--- a/drivers/iio/adc/ad7606.h
+++ b/drivers/iio/adc/ad7606.h
@@ -10,6 +10,36 @@
 
 #define AD760X_MAX_CHANNELS	16
 
+#define AD7616_CONFIGURATION_REGISTER	0x02
+#define AD7616_OS_MASK			GENMASK(4, 2)
+#define AD7616_BURST_MODE		BIT(6)
+#define AD7616_SEQEN_MODE		BIT(5)
+#define AD7616_RANGE_CH_A_ADDR_OFF	0x04
+#define AD7616_RANGE_CH_B_ADDR_OFF	0x06
+/*
+ * Range of channels from a group are stored in 2 registers.
+ * 0, 1, 2, 3 in a register followed by 4, 5, 6, 7 in second register.
+ * For channels from second group(8-15) the order is the same, only with
+ * an offset of 2 for register address.
+ */
+#define AD7616_RANGE_CH_ADDR(ch)	((ch) >> 2)
+/* The range of the channel is stored in 2 bits */
+#define AD7616_RANGE_CH_MSK(ch)		(0b11 << (((ch) & 0b11) * 2))
+#define AD7616_RANGE_CH_MODE(ch, mode)	((mode) << ((((ch) & 0b11)) * 2))
+
+#define AD7606_CONFIGURATION_REGISTER	0x02
+#define AD7606_SINGLE_DOUT		0x00
+
+/*
+ * Range for AD7606B channels are stored in registers starting with address 0x3.
+ * Each register stores range for 2 channels(4 bits per channel).
+ */
+#define AD7606_RANGE_CH_MSK(ch)		(GENMASK(3, 0) << (4 * ((ch) & 0x1)))
+#define AD7606_RANGE_CH_MODE(ch, mode)	\
+	((GENMASK(3, 0) & (mode)) << (4 * ((ch) & 0x1)))
+#define AD7606_RANGE_CH_ADDR(ch)	(0x03 + ((ch) >> 1))
+#define AD7606_OS_MODE			0x08
+
 #define AD760X_CHANNEL(num, mask_sep, mask_type, mask_all, bits) {	\
 		.type = IIO_VOLTAGE,				\
 		.indexed = 1,					\
@@ -71,6 +101,7 @@ struct ad7606_state;
 
 typedef int (*ad7606_scale_setup_cb_t)(struct iio_dev *indio_dev,
 				       struct iio_chan_spec *chan, int ch);
+typedef int (*ad7606_sw_setup_cb_t)(struct iio_dev *indio_dev);
 
 /**
  * struct ad7606_chip_info - chip specific information
@@ -80,6 +111,7 @@ typedef int (*ad7606_scale_setup_cb_t)(struct iio_dev *indio_dev,
  * @num_channels:	number of channels
  * @num_adc_channels	the number of channels the ADC actually inputs.
  * @scale_setup_cb:	callback to setup the scales for each channel
+ * @sw_setup_cb:	callback to setup the software mode if available.
  * @oversampling_avail	pointer to the array which stores the available
  *			oversampling ratios.
  * @oversampling_num	number of elements stored in oversampling_avail array
@@ -94,6 +126,7 @@ struct ad7606_chip_info {
 	unsigned int			num_adc_channels;
 	unsigned int			num_channels;
 	ad7606_scale_setup_cb_t		scale_setup_cb;
+	ad7606_sw_setup_cb_t		sw_setup_cb;
 	const unsigned int		*oversampling_avail;
 	unsigned int			oversampling_num;
 	bool				os_req_reset;
@@ -206,10 +239,6 @@ struct ad7606_bus_ops {
 	int (*reg_write)(struct ad7606_state *st,
 				unsigned int addr,
 				unsigned int val);
-	int (*write_mask)(struct ad7606_state *st,
-				 unsigned int addr,
-				 unsigned long mask,
-				 unsigned int val);
 	int (*update_scan_mode)(struct iio_dev *indio_dev, const unsigned long *scan_mask);
 	u16 (*rd_wr_cmd)(int addr, char isWriteOp);
 };
diff --git a/drivers/iio/adc/ad7606_spi.c b/drivers/iio/adc/ad7606_spi.c
index c8bc9e772dfc2..179115e909888 100644
--- a/drivers/iio/adc/ad7606_spi.c
+++ b/drivers/iio/adc/ad7606_spi.c
@@ -15,36 +15,6 @@
 
 #define MAX_SPI_FREQ_HZ		23500000	/* VDRIVE above 4.75 V */
 
-#define AD7616_CONFIGURATION_REGISTER	0x02
-#define AD7616_OS_MASK			GENMASK(4, 2)
-#define AD7616_BURST_MODE		BIT(6)
-#define AD7616_SEQEN_MODE		BIT(5)
-#define AD7616_RANGE_CH_A_ADDR_OFF	0x04
-#define AD7616_RANGE_CH_B_ADDR_OFF	0x06
-/*
- * Range of channels from a group are stored in 2 registers.
- * 0, 1, 2, 3 in a register followed by 4, 5, 6, 7 in second register.
- * For channels from second group(8-15) the order is the same, only with
- * an offset of 2 for register address.
- */
-#define AD7616_RANGE_CH_ADDR(ch)	((ch) >> 2)
-/* The range of the channel is stored in 2 bits */
-#define AD7616_RANGE_CH_MSK(ch)		(0b11 << (((ch) & 0b11) * 2))
-#define AD7616_RANGE_CH_MODE(ch, mode)	((mode) << ((((ch) & 0b11)) * 2))
-
-#define AD7606_CONFIGURATION_REGISTER	0x02
-#define AD7606_SINGLE_DOUT		0x00
-
-/*
- * Range for AD7606B channels are stored in registers starting with address 0x3.
- * Each register stores range for 2 channels(4 bits per channel).
- */
-#define AD7606_RANGE_CH_MSK(ch)		(GENMASK(3, 0) << (4 * ((ch) & 0x1)))
-#define AD7606_RANGE_CH_MODE(ch, mode)	\
-	((GENMASK(3, 0) & mode) << (4 * ((ch) & 0x1)))
-#define AD7606_RANGE_CH_ADDR(ch)	(0x03 + ((ch) >> 1))
-#define AD7606_OS_MODE			0x08
-
 static const struct iio_chan_spec ad7616_sw_channels[] = {
 	IIO_CHAN_SOFT_TIMESTAMP(16),
 	AD7616_CHANNEL(0),
@@ -89,10 +59,6 @@ static const struct iio_chan_spec ad7606c_18_sw_channels[] = {
 	AD7606_SW_CHANNEL(7, 18),
 };
 
-static const unsigned int ad7606B_oversampling_avail[9] = {
-	1, 2, 4, 8, 16, 32, 64, 128, 256
-};
-
 static u16 ad7616_spi_rd_wr_cmd(int addr, char isWriteOp)
 {
 	/*
@@ -194,118 +160,20 @@ static int ad7606_spi_reg_write(struct ad7606_state *st,
 	return spi_write(spi, &st->d16[0], sizeof(st->d16[0]));
 }
 
-static int ad7606_spi_write_mask(struct ad7606_state *st,
-				 unsigned int addr,
-				 unsigned long mask,
-				 unsigned int val)
-{
-	int readval;
-
-	readval = st->bops->reg_read(st, addr);
-	if (readval < 0)
-		return readval;
-
-	readval &= ~mask;
-	readval |= val;
-
-	return st->bops->reg_write(st, addr, readval);
-}
-
-static int ad7616_write_scale_sw(struct iio_dev *indio_dev, int ch, int val)
-{
-	struct ad7606_state *st = iio_priv(indio_dev);
-	unsigned int ch_addr, mode, ch_index;
-
-
-	/*
-	 * Ad7616 has 16 channels divided in group A and group B.
-	 * The range of channels from A are stored in registers with address 4
-	 * while channels from B are stored in register with address 6.
-	 * The last bit from channels determines if it is from group A or B
-	 * because the order of channels in iio is 0A, 0B, 1A, 1B...
-	 */
-	ch_index = ch >> 1;
-
-	ch_addr = AD7616_RANGE_CH_ADDR(ch_index);
-
-	if ((ch & 0x1) == 0) /* channel A */
-		ch_addr += AD7616_RANGE_CH_A_ADDR_OFF;
-	else	/* channel B */
-		ch_addr += AD7616_RANGE_CH_B_ADDR_OFF;
-
-	/* 0b01 for 2.5v, 0b10 for 5v and 0b11 for 10v */
-	mode = AD7616_RANGE_CH_MODE(ch_index, ((val + 1) & 0b11));
-	return st->bops->write_mask(st, ch_addr, AD7616_RANGE_CH_MSK(ch_index),
-				     mode);
-}
-
-static int ad7616_write_os_sw(struct iio_dev *indio_dev, int val)
-{
-	struct ad7606_state *st = iio_priv(indio_dev);
-
-	return st->bops->write_mask(st, AD7616_CONFIGURATION_REGISTER,
-				     AD7616_OS_MASK, val << 2);
-}
-
-static int ad7606_write_scale_sw(struct iio_dev *indio_dev, int ch, int val)
-{
-	struct ad7606_state *st = iio_priv(indio_dev);
-
-	return ad7606_spi_write_mask(st,
-				     AD7606_RANGE_CH_ADDR(ch),
-				     AD7606_RANGE_CH_MSK(ch),
-				     AD7606_RANGE_CH_MODE(ch, val));
-}
-
-static int ad7606_write_os_sw(struct iio_dev *indio_dev, int val)
-{
-	struct ad7606_state *st = iio_priv(indio_dev);
-
-	return ad7606_spi_reg_write(st, AD7606_OS_MODE, val);
-}
-
 static int ad7616_sw_mode_config(struct iio_dev *indio_dev)
 {
-	struct ad7606_state *st = iio_priv(indio_dev);
-
 	/*
 	 * Scale can be configured individually for each channel
 	 * in software mode.
 	 */
 	indio_dev->channels = ad7616_sw_channels;
 
-	st->write_scale = ad7616_write_scale_sw;
-	st->write_os = &ad7616_write_os_sw;
-
-	/* Activate Burst mode and SEQEN MODE */
-	return st->bops->write_mask(st,
-			      AD7616_CONFIGURATION_REGISTER,
-			      AD7616_BURST_MODE | AD7616_SEQEN_MODE,
-			      AD7616_BURST_MODE | AD7616_SEQEN_MODE);
+	return 0;
 }
 
 static int ad7606B_sw_mode_config(struct iio_dev *indio_dev)
 {
 	struct ad7606_state *st = iio_priv(indio_dev);
-	DECLARE_BITMAP(os, 3);
-
-	bitmap_fill(os, 3);
-	/*
-	 * Software mode is enabled when all three oversampling
-	 * pins are set to high. If oversampling gpios are defined
-	 * in the device tree, then they need to be set to high,
-	 * otherwise, they must be hardwired to VDD
-	 */
-	if (st->gpio_os) {
-		gpiod_set_array_value(st->gpio_os->ndescs,
-				      st->gpio_os->desc, st->gpio_os->info, os);
-	}
-	/* OS of 128 and 256 are available only in software mode */
-	st->oversampling_avail = ad7606B_oversampling_avail;
-	st->num_os_ratios = ARRAY_SIZE(ad7606B_oversampling_avail);
-
-	st->write_scale = ad7606_write_scale_sw;
-	st->write_os = &ad7606_write_os_sw;
 
 	/* Configure device spi to output on a single channel */
 	st->bops->reg_write(st,
@@ -350,7 +218,6 @@ static const struct ad7606_bus_ops ad7616_spi_bops = {
 	.read_block = ad7606_spi_read_block,
 	.reg_read = ad7606_spi_reg_read,
 	.reg_write = ad7606_spi_reg_write,
-	.write_mask = ad7606_spi_write_mask,
 	.rd_wr_cmd = ad7616_spi_rd_wr_cmd,
 	.sw_mode_config = ad7616_sw_mode_config,
 };
@@ -359,7 +226,6 @@ static const struct ad7606_bus_ops ad7606b_spi_bops = {
 	.read_block = ad7606_spi_read_block,
 	.reg_read = ad7606_spi_reg_read,
 	.reg_write = ad7606_spi_reg_write,
-	.write_mask = ad7606_spi_write_mask,
 	.rd_wr_cmd = ad7606B_spi_rd_wr_cmd,
 	.sw_mode_config = ad7606B_sw_mode_config,
 };
@@ -368,7 +234,6 @@ static const struct ad7606_bus_ops ad7606c_18_spi_bops = {
 	.read_block = ad7606_spi_read_block18to32,
 	.reg_read = ad7606_spi_reg_read,
 	.reg_write = ad7606_spi_reg_write,
-	.write_mask = ad7606_spi_write_mask,
 	.rd_wr_cmd = ad7606B_spi_rd_wr_cmd,
 	.sw_mode_config = ad7606c_18_sw_mode_config,
 };
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 019/145] iio: adc: ad7606: check for NULL before calling sw_mode_config()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 018/145] iio: adc: ad7606: move software functions into common file Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 020/145] RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug Greg Kroah-Hartman
                   ` (137 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Nuno Sá, David Lechner, Stable,
	Jonathan Cameron, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: David Lechner <dlechner@baylibre.com>

[ Upstream commit 5257d80e22bf27009d6742e4c174f42cfe54e425 ]

Check that the sw_mode_config function pointer is not NULL before
calling it. Not all buses define this callback, which resulted in a NULL
pointer dereference.

Fixes: e571c1902116 ("iio: adc: ad7606: move scale_setup as function pointer on chip-info")
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-1-4b605427774c@baylibre.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/iio/adc/ad7606.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c
index 7985570ed1521..0339e27f92c32 100644
--- a/drivers/iio/adc/ad7606.c
+++ b/drivers/iio/adc/ad7606.c
@@ -1228,9 +1228,11 @@ static int ad7616_sw_mode_setup(struct iio_dev *indio_dev)
 	st->write_scale = ad7616_write_scale_sw;
 	st->write_os = &ad7616_write_os_sw;
 
-	ret = st->bops->sw_mode_config(indio_dev);
-	if (ret)
-		return ret;
+	if (st->bops->sw_mode_config) {
+		ret = st->bops->sw_mode_config(indio_dev);
+		if (ret)
+			return ret;
+	}
 
 	/* Activate Burst mode and SEQEN MODE */
 	return ad7606_write_mask(st, AD7616_CONFIGURATION_REGISTER,
@@ -1261,6 +1263,9 @@ static int ad7606b_sw_mode_setup(struct iio_dev *indio_dev)
 	st->write_scale = ad7606_write_scale_sw;
 	st->write_os = &ad7606_write_os_sw;
 
+	if (!st->bops->sw_mode_config)
+		return 0;
+
 	return st->bops->sw_mode_config(indio_dev);
 }
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 020/145] RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 019/145] iio: adc: ad7606: check for NULL before calling sw_mode_config() Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 021/145] HID: thrustmaster: fix memory leak in thrustmaster_interrupts() Greg Kroah-Hartman
                   ` (136 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, liuyi, Zhu Yanjun, Daisuke Matsuda,
	Leon Romanovsky, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Zhu Yanjun <yanjun.zhu@linux.dev>

[ Upstream commit f81b33582f9339d2dc17c69b92040d3650bb4bae ]

Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x7d/0xa0 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xcf/0x610 mm/kasan/report.c:489
 kasan_report+0xb5/0xe0 mm/kasan/report.c:602
 rxe_queue_cleanup+0xd0/0xe0 drivers/infiniband/sw/rxe/rxe_queue.c:195
 rxe_cq_cleanup+0x3f/0x50 drivers/infiniband/sw/rxe/rxe_cq.c:132
 __rxe_cleanup+0x168/0x300 drivers/infiniband/sw/rxe/rxe_pool.c:232
 rxe_create_cq+0x22e/0x3a0 drivers/infiniband/sw/rxe/rxe_verbs.c:1109
 create_cq+0x658/0xb90 drivers/infiniband/core/uverbs_cmd.c:1052
 ib_uverbs_create_cq+0xc7/0x120 drivers/infiniband/core/uverbs_cmd.c:1095
 ib_uverbs_write+0x969/0xc90 drivers/infiniband/core/uverbs_main.c:679
 vfs_write fs/read_write.c:677 [inline]
 vfs_write+0x26a/0xcc0 fs/read_write.c:659
 ksys_write+0x1b8/0x200 fs/read_write.c:731
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xaa/0x1b0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

In the function rxe_create_cq, when rxe_cq_from_init fails, the function
rxe_cleanup will be called to handle the allocated resources. In fact,
some memory resources have already been freed in the function
rxe_cq_from_init. Thus, this problem will occur.

The solution is to let rxe_cleanup do all the work.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Link: https://paste.ubuntu.com/p/tJgC42wDf6/
Tested-by: liuyi <liuy22@mails.tsinghua.edu.cn>
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Link: https://patch.msgid.link/20250412075714.3257358-1-yanjun.zhu@linux.dev
Reviewed-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/infiniband/sw/rxe/rxe_cq.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_cq.c b/drivers/infiniband/sw/rxe/rxe_cq.c
index fec87c9030abd..fffd144d509eb 100644
--- a/drivers/infiniband/sw/rxe/rxe_cq.c
+++ b/drivers/infiniband/sw/rxe/rxe_cq.c
@@ -56,11 +56,8 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe,
 
 	err = do_mmap_info(rxe, uresp ? &uresp->mi : NULL, udata,
 			   cq->queue->buf, cq->queue->buf_size, &cq->queue->ip);
-	if (err) {
-		vfree(cq->queue->buf);
-		kfree(cq->queue);
+	if (err)
 		return err;
-	}
 
 	cq->is_user = uresp;
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 021/145] HID: thrustmaster: fix memory leak in thrustmaster_interrupts()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 020/145] RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 022/145] HID: uclogic: Add NULL check in uclogic_input_configured() Greg Kroah-Hartman
                   ` (135 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Qasim Ijaz, Jiri Kosina, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Qasim Ijaz <qasdev00@gmail.com>

[ Upstream commit 09d546303b370113323bfff456c4e8cff8756005 ]

In thrustmaster_interrupts(), the allocated send_buf is not
freed if the usb_check_int_endpoints() check fails, leading
to a memory leak.

Fix this by ensuring send_buf is freed before returning in
the error path.

Fixes: 50420d7c79c3 ("HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check")
Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-thrustmaster.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c
index 3b81468a1df29..0bf70664c35ee 100644
--- a/drivers/hid/hid-thrustmaster.c
+++ b/drivers/hid/hid-thrustmaster.c
@@ -174,6 +174,7 @@ static void thrustmaster_interrupts(struct hid_device *hdev)
 	u8 ep_addr[2] = {b_ep, 0};
 
 	if (!usb_check_int_endpoints(usbif, ep_addr)) {
+		kfree(send_buf);
 		hid_err(hdev, "Unexpected non-int endpoint\n");
 		return;
 	}
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 022/145] HID: uclogic: Add NULL check in uclogic_input_configured()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 021/145] HID: thrustmaster: fix memory leak in thrustmaster_interrupts() Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 023/145] nfs: handle failure of nfs_get_lock_context in unlock path Greg Kroah-Hartman
                   ` (134 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Henry Martin, Jiri Kosina,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Henry Martin <bsdhenrymartin@gmail.com>

[ Upstream commit bd07f751208ba190f9b0db5e5b7f35d5bb4a8a1e ]

devm_kasprintf() returns NULL when memory allocation fails. Currently,
uclogic_input_configured() does not check for this case, which results
in a NULL pointer dereference.

Add NULL check after devm_kasprintf() to prevent this issue.

Fixes: dd613a4e45f8 ("HID: uclogic: Correct devm device reference for hidinput input_dev name")
Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-uclogic-core.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-uclogic-core.c b/drivers/hid/hid-uclogic-core.c
index d8008933c052f..321c43fb06ae0 100644
--- a/drivers/hid/hid-uclogic-core.c
+++ b/drivers/hid/hid-uclogic-core.c
@@ -142,11 +142,12 @@ static int uclogic_input_configured(struct hid_device *hdev,
 			suffix = "System Control";
 			break;
 		}
-	}
-
-	if (suffix)
+	} else {
 		hi->input->name = devm_kasprintf(&hdev->dev, GFP_KERNEL,
 						 "%s %s", hdev->name, suffix);
+		if (!hi->input->name)
+			return -ENOMEM;
+	}
 
 	return 0;
 }
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 023/145] nfs: handle failure of nfs_get_lock_context in unlock path
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 022/145] HID: uclogic: Add NULL check in uclogic_input_configured() Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 024/145] NFS/localio: Fix a race in nfs_local_open_fh() Greg Kroah-Hartman
                   ` (133 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Li Lingfeng, Jeff Layton,
	Trond Myklebust, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Li Lingfeng <lilingfeng3@huawei.com>

[ Upstream commit c457dc1ec770a22636b473ce5d35614adfe97636 ]

When memory is insufficient, the allocation of nfs_lock_context in
nfs_get_lock_context() fails and returns -ENOMEM. If we mistakenly treat
an nfs4_unlockdata structure (whose l_ctx member has been set to -ENOMEM)
as valid and proceed to execute rpc_run_task(), this will trigger a NULL
pointer dereference in nfs4_locku_prepare. For example:

BUG: kernel NULL pointer dereference, address: 000000000000000c
PGD 0 P4D 0
Oops: Oops: 0000 [#1] SMP PTI
CPU: 15 UID: 0 PID: 12 Comm: kworker/u64:0 Not tainted 6.15.0-rc2-dirty #60
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40
Workqueue: rpciod rpc_async_schedule
RIP: 0010:nfs4_locku_prepare+0x35/0xc2
Code: 89 f2 48 89 fd 48 c7 c7 68 69 ef b5 53 48 8b 8e 90 00 00 00 48 89 f3
RSP: 0018:ffffbbafc006bdb8 EFLAGS: 00010246
RAX: 000000000000004b RBX: ffff9b964fc1fa00 RCX: 0000000000000000
RDX: 0000000000000000 RSI: fffffffffffffff4 RDI: ffff9ba53fddbf40
RBP: ffff9ba539934000 R08: 0000000000000000 R09: ffffbbafc006bc38
R10: ffffffffb6b689c8 R11: 0000000000000003 R12: ffff9ba539934030
R13: 0000000000000001 R14: 0000000004248060 R15: ffffffffb56d1c30
FS: 0000000000000000(0000) GS:ffff9ba5881f0000(0000) knlGS:00000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000000000c CR3: 000000093f244000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 __rpc_execute+0xbc/0x480
 rpc_async_schedule+0x2f/0x40
 process_one_work+0x232/0x5d0
 worker_thread+0x1da/0x3d0
 ? __pfx_worker_thread+0x10/0x10
 kthread+0x10d/0x240
 ? __pfx_kthread+0x10/0x10
 ret_from_fork+0x34/0x50
 ? __pfx_kthread+0x10/0x10
 ret_from_fork_asm+0x1a/0x30
 </TASK>
Modules linked in:
CR2: 000000000000000c
---[ end trace 0000000000000000 ]---

Free the allocated nfs4_unlockdata when nfs_get_lock_context() fails and
return NULL to terminate subsequent rpc_run_task, preventing NULL pointer
dereference.

Fixes: f30cb757f680 ("NFS: Always wait for I/O completion before unlock")
Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20250417072508.3850532-1-lilingfeng3@huawei.com
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/nfs/nfs4proc.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 6e95db6c17e92..810cfd9b7e533 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -7049,10 +7049,18 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
 	struct nfs4_unlockdata *p;
 	struct nfs4_state *state = lsp->ls_state;
 	struct inode *inode = state->inode;
+	struct nfs_lock_context *l_ctx;
 
 	p = kzalloc(sizeof(*p), GFP_KERNEL);
 	if (p == NULL)
 		return NULL;
+	l_ctx = nfs_get_lock_context(ctx);
+	if (!IS_ERR(l_ctx)) {
+		p->l_ctx = l_ctx;
+	} else {
+		kfree(p);
+		return NULL;
+	}
 	p->arg.fh = NFS_FH(inode);
 	p->arg.fl = &p->fl;
 	p->arg.seqid = seqid;
@@ -7060,7 +7068,6 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
 	p->lsp = lsp;
 	/* Ensure we don't close file until we're done freeing locks! */
 	p->ctx = get_nfs_open_context(ctx);
-	p->l_ctx = nfs_get_lock_context(ctx);
 	locks_init_lock(&p->fl);
 	locks_copy_lock(&p->fl, fl);
 	p->server = NFS_SERVER(inode);
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 024/145] NFS/localio: Fix a race in nfs_local_open_fh()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 023/145] nfs: handle failure of nfs_get_lock_context in unlock path Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 025/145] spi: loopback-test: Do not split 1024-byte hexdumps Greg Kroah-Hartman
                   ` (132 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Trond Myklebust, Mike Snitzer,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Trond Myklebust <trond.myklebust@hammerspace.com>

[ Upstream commit fa7ab64f1e2fdc8f2603aab8e0dd20de89cb10d9 ]

Once the clp->cl_uuid.lock has been dropped, another CPU could come in
and free the struct nfsd_file that was just added. To prevent that from
happening, take the RCU read lock before dropping the spin lock.

Fixes: 86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/nfs/localio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 5c21caeae075c..4ec952f9f47dd 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -278,6 +278,7 @@ nfs_local_open_fh(struct nfs_client *clp, const struct cred *cred,
 		new = __nfs_local_open_fh(clp, cred, fh, nfl, mode);
 		if (IS_ERR(new))
 			return NULL;
+		rcu_read_lock();
 		/* try to swap in the pointer */
 		spin_lock(&clp->cl_uuid.lock);
 		nf = rcu_dereference_protected(*pnf, 1);
@@ -287,7 +288,6 @@ nfs_local_open_fh(struct nfs_client *clp, const struct cred *cred,
 			rcu_assign_pointer(*pnf, nf);
 		}
 		spin_unlock(&clp->cl_uuid.lock);
-		rcu_read_lock();
 	}
 	nf = nfs_local_file_get(nf);
 	rcu_read_unlock();
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 025/145] spi: loopback-test: Do not split 1024-byte hexdumps
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 024/145] NFS/localio: Fix a race in nfs_local_open_fh() Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 026/145] RDMA/core: Fix "KASAN: slab-use-after-free Read in ib_register_device" problem Greg Kroah-Hartman
                   ` (131 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven, Mark Brown,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Geert Uytterhoeven <geert+renesas@glider.be>

[ Upstream commit a73fa3690a1f3014d6677e368dce4e70767a6ba2 ]

spi_test_print_hex_dump() prints buffers holding less than 1024 bytes in
full.  Larger buffers are truncated: only the first 512 and the last 512
bytes are printed, separated by a truncation message.  The latter is
confusing in case the buffer holds exactly 1024 bytes, as all data is
printed anyway.

Fix this by printing buffers holding up to and including 1024 bytes in
full.

Fixes: 84e0c4e5e2c4ef42 ("spi: add loopback test driver to allow for spi_master regression tests")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/37ee1bc90c6554c9347040adabf04188c8f704aa.1746184171.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/spi/spi-loopback-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c
index 31a878d9458d9..7740f94847a88 100644
--- a/drivers/spi/spi-loopback-test.c
+++ b/drivers/spi/spi-loopback-test.c
@@ -420,7 +420,7 @@ MODULE_LICENSE("GPL");
 static void spi_test_print_hex_dump(char *pre, const void *ptr, size_t len)
 {
 	/* limit the hex_dump */
-	if (len < 1024) {
+	if (len <= 1024) {
 		print_hex_dump(KERN_INFO, pre,
 			       DUMP_PREFIX_OFFSET, 16, 1,
 			       ptr, len, 0);
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 026/145] RDMA/core: Fix "KASAN: slab-use-after-free Read in ib_register_device" problem
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 025/145] spi: loopback-test: Do not split 1024-byte hexdumps Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 027/145] Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags Greg Kroah-Hartman
                   ` (130 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, syzbot+e2ce9e275ecc70a30b72,
	Zhu Yanjun, Jason Gunthorpe, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Zhu Yanjun <yanjun.zhu@linux.dev>

[ Upstream commit d0706bfd3ee40923c001c6827b786a309e2a8713 ]

Call Trace:

 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:408 [inline]
 print_report+0xc3/0x670 mm/kasan/report.c:521
 kasan_report+0xe0/0x110 mm/kasan/report.c:634
 strlen+0x93/0xa0 lib/string.c:420
 __fortify_strlen include/linux/fortify-string.h:268 [inline]
 get_kobj_path_length lib/kobject.c:118 [inline]
 kobject_get_path+0x3f/0x2a0 lib/kobject.c:158
 kobject_uevent_env+0x289/0x1870 lib/kobject_uevent.c:545
 ib_register_device drivers/infiniband/core/device.c:1472 [inline]
 ib_register_device+0x8cf/0xe00 drivers/infiniband/core/device.c:1393
 rxe_register_device+0x275/0x320 drivers/infiniband/sw/rxe/rxe_verbs.c:1552
 rxe_net_add+0x8e/0xe0 drivers/infiniband/sw/rxe/rxe_net.c:550
 rxe_newlink+0x70/0x190 drivers/infiniband/sw/rxe/rxe.c:225
 nldev_newlink+0x3a3/0x680 drivers/infiniband/core/nldev.c:1796
 rdma_nl_rcv_msg+0x387/0x6e0 drivers/infiniband/core/netlink.c:195
 rdma_nl_rcv_skb.constprop.0.isra.0+0x2e5/0x450
 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]
 netlink_unicast+0x53a/0x7f0 net/netlink/af_netlink.c:1339
 netlink_sendmsg+0x8d1/0xdd0 net/netlink/af_netlink.c:1883
 sock_sendmsg_nosec net/socket.c:712 [inline]
 __sock_sendmsg net/socket.c:727 [inline]
 ____sys_sendmsg+0xa95/0xc70 net/socket.c:2566
 ___sys_sendmsg+0x134/0x1d0 net/socket.c:2620
 __sys_sendmsg+0x16d/0x220 net/socket.c:2652
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

This problem is similar to the problem that the
commit 1d6a9e7449e2 ("RDMA/core: Fix use-after-free when rename device name")
fixes.

The root cause is: the function ib_device_rename() renames the name with
lock. But in the function kobject_uevent(), this name is accessed without
lock protection at the same time.

The solution is to add the lock protection when this name is accessed in
the function kobject_uevent().

Fixes: 779e0bf47632 ("RDMA/core: Do not indicate device ready when device enablement fails")
Link: https://patch.msgid.link/r/20250506151008.75701-1-yanjun.zhu@linux.dev
Reported-by: syzbot+e2ce9e275ecc70a30b72@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e2ce9e275ecc70a30b72
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/infiniband/core/device.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index ee75b99f84bcc..baf12e3e2a7ea 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1352,6 +1352,9 @@ static void ib_device_notify_register(struct ib_device *device)
 
 	down_read(&devices_rwsem);
 
+	/* Mark for userspace that device is ready */
+	kobject_uevent(&device->dev.kobj, KOBJ_ADD);
+
 	ret = rdma_nl_notify_event(device, 0, RDMA_REGISTER_EVENT);
 	if (ret)
 		goto out;
@@ -1468,10 +1471,9 @@ int ib_register_device(struct ib_device *device, const char *name,
 		return ret;
 	}
 	dev_set_uevent_suppress(&device->dev, false);
-	/* Mark for userspace that device is ready */
-	kobject_uevent(&device->dev.kobj, KOBJ_ADD);
 
 	ib_device_notify_register(device);
+
 	ib_device_put(device);
 
 	return 0;
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 027/145] Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 026/145] RDMA/core: Fix "KASAN: slab-use-after-free Read in ib_register_device" problem Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 028/145] net_sched: Flush gso_skb list too during ->change() Greg Kroah-Hartman
                   ` (129 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Luiz Augusto von Dentz, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

[ Upstream commit 1e2e3044c1bc64a64aa0eaf7c17f7832c26c9775 ]

Device flags could be updated in the meantime while MGMT_OP_ADD_DEVICE
is pending on hci_update_passive_scan_sync so instead of setting the
current_flags as cmd->user_data just do a lookup using
hci_conn_params_lookup and use the latest stored flags.

Fixes: a182d9c84f9c ("Bluetooth: MGMT: Fix Add Device to responding before completing")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/bluetooth/mgmt.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 621c555f639be..181b1e070b82e 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -7540,11 +7540,16 @@ static void add_device_complete(struct hci_dev *hdev, void *data, int err)
 	struct mgmt_cp_add_device *cp = cmd->param;
 
 	if (!err) {
+		struct hci_conn_params *params;
+
+		params = hci_conn_params_lookup(hdev, &cp->addr.bdaddr,
+						le_addr_type(cp->addr.type));
+
 		device_added(cmd->sk, hdev, &cp->addr.bdaddr, cp->addr.type,
 			     cp->action);
 		device_flags_changed(NULL, hdev, &cp->addr.bdaddr,
 				     cp->addr.type, hdev->conn_flags,
-				     PTR_UINT(cmd->user_data));
+				     params ? params->flags : 0);
 	}
 
 	mgmt_cmd_complete(cmd->sk, hdev->id, MGMT_OP_ADD_DEVICE,
@@ -7647,8 +7652,6 @@ static int add_device(struct sock *sk, struct hci_dev *hdev,
 		goto unlock;
 	}
 
-	cmd->user_data = UINT_PTR(current_flags);
-
 	err = hci_cmd_sync_queue(hdev, add_device_sync, cmd,
 				 add_device_complete);
 	if (err < 0) {
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 028/145] net_sched: Flush gso_skb list too during ->change()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 027/145] Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:49 ` [PATCH 6.14 029/145] drm/meson: Use 1000ULL when operating with mode->clock Greg Kroah-Hartman
                   ` (128 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Will, Savy, Cong Wang,
	David S. Miller, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Cong Wang <xiyou.wangcong@gmail.com>

[ Upstream commit 2d3cbfd6d54a2c39ce3244f33f85c595844bd7b8 ]

Previously, when reducing a qdisc's limit via the ->change() operation, only
the main skb queue was trimmed, potentially leaving packets in the gso_skb
list. This could result in NULL pointer dereference when we only check
sch->limit against sch->q.qlen.

This patch introduces a new helper, qdisc_dequeue_internal(), which ensures
both the gso_skb list and the main queue are properly flushed when trimming
excess packets. All relevant qdiscs (codel, fq, fq_codel, fq_pie, hhf, pie)
are updated to use this helper in their ->change() routines.

Fixes: 76e3cc126bb2 ("codel: Controlled Delay AQM")
Fixes: 4b549a2ef4be ("fq_codel: Fair Queue Codel AQM")
Fixes: afe4fd062416 ("pkt_sched: fq: Fair Queue packet scheduler")
Fixes: ec97ecf1ebe4 ("net: sched: add Flow Queue PIE packet scheduler")
Fixes: 10239edf86f1 ("net-qdisc-hhf: Heavy-Hitter Filter (HHF) qdisc")
Fixes: d4b36210c2e6 ("net: pkt_sched: PIE AQM scheme")
Reported-by: Will <willsroot@protonmail.com>
Reported-by: Savy <savy@syst3mfailure.io>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/net/sch_generic.h | 15 +++++++++++++++
 net/sched/sch_codel.c     |  2 +-
 net/sched/sch_fq.c        |  2 +-
 net/sched/sch_fq_codel.c  |  2 +-
 net/sched/sch_fq_pie.c    |  2 +-
 net/sched/sch_hhf.c       |  2 +-
 net/sched/sch_pie.c       |  2 +-
 7 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index d48c657191cd0..1c05fed05f2bc 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -1031,6 +1031,21 @@ static inline struct sk_buff *__qdisc_dequeue_head(struct qdisc_skb_head *qh)
 	return skb;
 }
 
+static inline struct sk_buff *qdisc_dequeue_internal(struct Qdisc *sch, bool direct)
+{
+	struct sk_buff *skb;
+
+	skb = __skb_dequeue(&sch->gso_skb);
+	if (skb) {
+		sch->q.qlen--;
+		return skb;
+	}
+	if (direct)
+		return __qdisc_dequeue_head(&sch->q);
+	else
+		return sch->dequeue(sch);
+}
+
 static inline struct sk_buff *qdisc_dequeue_head(struct Qdisc *sch)
 {
 	struct sk_buff *skb = __qdisc_dequeue_head(&sch->q);
diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c
index 12dd71139da39..c93761040c6e7 100644
--- a/net/sched/sch_codel.c
+++ b/net/sched/sch_codel.c
@@ -144,7 +144,7 @@ static int codel_change(struct Qdisc *sch, struct nlattr *opt,
 
 	qlen = sch->q.qlen;
 	while (sch->q.qlen > sch->limit) {
-		struct sk_buff *skb = __qdisc_dequeue_head(&sch->q);
+		struct sk_buff *skb = qdisc_dequeue_internal(sch, true);
 
 		dropped += qdisc_pkt_len(skb);
 		qdisc_qstats_backlog_dec(sch, skb);
diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index 2ca5332cfcc5c..902ff54706072 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -1136,7 +1136,7 @@ static int fq_change(struct Qdisc *sch, struct nlattr *opt,
 		sch_tree_lock(sch);
 	}
 	while (sch->q.qlen > sch->limit) {
-		struct sk_buff *skb = fq_dequeue(sch);
+		struct sk_buff *skb = qdisc_dequeue_internal(sch, false);
 
 		if (!skb)
 			break;
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 6c9029f71e88d..2a0f3a513bfaa 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -441,7 +441,7 @@ static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt,
 
 	while (sch->q.qlen > sch->limit ||
 	       q->memory_usage > q->memory_limit) {
-		struct sk_buff *skb = fq_codel_dequeue(sch);
+		struct sk_buff *skb = qdisc_dequeue_internal(sch, false);
 
 		q->cstats.drop_len += qdisc_pkt_len(skb);
 		rtnl_kfree_skbs(skb, skb);
diff --git a/net/sched/sch_fq_pie.c b/net/sched/sch_fq_pie.c
index 93c36afbf5762..67f437c170582 100644
--- a/net/sched/sch_fq_pie.c
+++ b/net/sched/sch_fq_pie.c
@@ -366,7 +366,7 @@ static int fq_pie_change(struct Qdisc *sch, struct nlattr *opt,
 
 	/* Drop excess packets if new limit is lower */
 	while (sch->q.qlen > sch->limit) {
-		struct sk_buff *skb = fq_pie_qdisc_dequeue(sch);
+		struct sk_buff *skb = qdisc_dequeue_internal(sch, false);
 
 		len_dropped += qdisc_pkt_len(skb);
 		num_dropped += 1;
diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
index 44d9efe1a96a8..5aa434b467073 100644
--- a/net/sched/sch_hhf.c
+++ b/net/sched/sch_hhf.c
@@ -564,7 +564,7 @@ static int hhf_change(struct Qdisc *sch, struct nlattr *opt,
 	qlen = sch->q.qlen;
 	prev_backlog = sch->qstats.backlog;
 	while (sch->q.qlen > sch->limit) {
-		struct sk_buff *skb = hhf_dequeue(sch);
+		struct sk_buff *skb = qdisc_dequeue_internal(sch, false);
 
 		rtnl_kfree_skbs(skb, skb);
 	}
diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c
index bb1fa9aa530b2..97f71b6dbf5b5 100644
--- a/net/sched/sch_pie.c
+++ b/net/sched/sch_pie.c
@@ -195,7 +195,7 @@ static int pie_change(struct Qdisc *sch, struct nlattr *opt,
 	/* Drop excess packets if new limit is lower */
 	qlen = sch->q.qlen;
 	while (sch->q.qlen > sch->limit) {
-		struct sk_buff *skb = __qdisc_dequeue_head(&sch->q);
+		struct sk_buff *skb = qdisc_dequeue_internal(sch, true);
 
 		dropped += qdisc_pkt_len(skb);
 		qdisc_qstats_backlog_dec(sch, skb);
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 029/145] drm/meson: Use 1000ULL when operating with mode->clock
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 028/145] net_sched: Flush gso_skb list too during ->change() Greg Kroah-Hartman
@ 2025-05-20 13:49 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 030/145] tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing Greg Kroah-Hartman
                   ` (127 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:49 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, I Hsin Cheng, Martin Blumenstingl,
	Neil Armstrong, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: I Hsin Cheng <richard120310@gmail.com>

[ Upstream commit eb0851e14432f3b87c77b704c835ac376deda03a ]

Coverity scan reported the usage of "mode->clock * 1000" may lead to
integer overflow. Use "1000ULL" instead of "1000"
when utilizing it to avoid potential integer overflow issue.

Link: https://scan5.scan.coverity.com/#/project-view/10074/10063?selectedIssue=1646759
Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Fixes: 1017560164b6 ("drm/meson: use unsigned long long / Hz for frequency types")
Link: https://lore.kernel.org/r/20250505184338.678540-1-richard120310@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/meson/meson_encoder_hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.c b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
index ce8cea5d3a56b..c61e6026adfae 100644
--- a/drivers/gpu/drm/meson/meson_encoder_hdmi.c
+++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
@@ -75,7 +75,7 @@ static void meson_encoder_hdmi_set_vclk(struct meson_encoder_hdmi *encoder_hdmi,
 	unsigned long long venc_freq;
 	unsigned long long hdmi_freq;
 
-	vclk_freq = mode->clock * 1000;
+	vclk_freq = mode->clock * 1000ULL;
 
 	/* For 420, pixel clock is half unlike venc clock */
 	if (encoder_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYYVYY8_0_5X24)
@@ -123,7 +123,7 @@ static enum drm_mode_status meson_encoder_hdmi_mode_valid(struct drm_bridge *bri
 	struct meson_encoder_hdmi *encoder_hdmi = bridge_to_meson_encoder_hdmi(bridge);
 	struct meson_drm *priv = encoder_hdmi->priv;
 	bool is_hdmi2_sink = display_info->hdmi.scdc.supported;
-	unsigned long long clock = mode->clock * 1000;
+	unsigned long long clock = mode->clock * 1000ULL;
 	unsigned long long phy_freq;
 	unsigned long long vclk_freq;
 	unsigned long long venc_freq;
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 030/145] tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2025-05-20 13:49 ` [PATCH 6.14 029/145] drm/meson: Use 1000ULL when operating with mode->clock Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 031/145] net: mctp: Dont access ifa_index when missing Greg Kroah-Hartman
                   ` (126 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Hangbin Liu, Stanislav Fomichev,
	Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hangbin Liu <liuhangbin@gmail.com>

[ Upstream commit 45375814eb3f4245956c0c85092a4eee4441d167 ]

Fix a crash in the ethtool YNL implementation when Hardware Clock information
is not present in the response. This ensures graceful handling of devices or
drivers that do not provide this optional field. e.g.

  Traceback (most recent call last):
    File "/net/tools/net/ynl/pyynl/./ethtool.py", line 438, in <module>
      main()
      ~~~~^^
    File "/net/tools/net/ynl/pyynl/./ethtool.py", line 341, in main
      print(f'PTP Hardware Clock: {tsinfo["phc-index"]}')
                                   ~~~~~~^^^^^^^^^^^^^
  KeyError: 'phc-index'

Fixes: f3d07b02b2b8 ("tools: ynl: ethtool testing tool")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250508035414.82974-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/net/ynl/pyynl/ethtool.py | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/tools/net/ynl/pyynl/ethtool.py b/tools/net/ynl/pyynl/ethtool.py
index af7fddd7b085b..cab6b576c8762 100755
--- a/tools/net/ynl/pyynl/ethtool.py
+++ b/tools/net/ynl/pyynl/ethtool.py
@@ -338,16 +338,24 @@ def main():
         print('Capabilities:')
         [print(f'\t{v}') for v in bits_to_dict(tsinfo['timestamping'])]
 
-        print(f'PTP Hardware Clock: {tsinfo["phc-index"]}')
+        print(f'PTP Hardware Clock: {tsinfo.get("phc-index", "none")}')
 
-        print('Hardware Transmit Timestamp Modes:')
-        [print(f'\t{v}') for v in bits_to_dict(tsinfo['tx-types'])]
+        if 'tx-types' in tsinfo:
+            print('Hardware Transmit Timestamp Modes:')
+            [print(f'\t{v}') for v in bits_to_dict(tsinfo['tx-types'])]
+        else:
+            print('Hardware Transmit Timestamp Modes: none')
+
+        if 'rx-filters' in tsinfo:
+            print('Hardware Receive Filter Modes:')
+            [print(f'\t{v}') for v in bits_to_dict(tsinfo['rx-filters'])]
+        else:
+            print('Hardware Receive Filter Modes: none')
 
-        print('Hardware Receive Filter Modes:')
-        [print(f'\t{v}') for v in bits_to_dict(tsinfo['rx-filters'])]
+        if 'stats' in tsinfo and tsinfo['stats']:
+            print('Statistics:')
+            [print(f'\t{k}: {v}') for k, v in tsinfo['stats'].items()]
 
-        print('Statistics:')
-        [print(f'\t{k}: {v}') for k, v in tsinfo['stats'].items()]
         return
 
     print(f'Settings for {args.device}:')
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 031/145] net: mctp: Dont access ifa_index when missing
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 030/145] tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 032/145] tests/ncdevmem: Fix double-free of queue array Greg Kroah-Hartman
                   ` (125 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, syzbot+e76d52dadc089b9d197f,
	syzbot+1065a199625a388fce60, Matt Johnston, Jakub Kicinski,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Matt Johnston <matt@codeconstruct.com.au>

[ Upstream commit f11cf946c0a92c560a890d68e4775723353599e1 ]

In mctp_dump_addrinfo, ifa_index can be used to filter interfaces, but
only when the struct ifaddrmsg is provided. Otherwise it will be
comparing to uninitialised memory - reproducible in the syzkaller case from
dhcpd, or busybox "ip addr show".

The kernel MCTP implementation has always filtered by ifa_index, so
existing userspace programs expecting to dump MCTP addresses must
already be passing a valid ifa_index value (either 0 or a real index).

BUG: KMSAN: uninit-value in mctp_dump_addrinfo+0x208/0xac0 net/mctp/device.c:128
 mctp_dump_addrinfo+0x208/0xac0 net/mctp/device.c:128
 rtnl_dump_all+0x3ec/0x5b0 net/core/rtnetlink.c:4380
 rtnl_dumpit+0xd5/0x2f0 net/core/rtnetlink.c:6824
 netlink_dump+0x97b/0x1690 net/netlink/af_netlink.c:2309

Fixes: 583be982d934 ("mctp: Add device handling and netlink interface")
Reported-by: syzbot+e76d52dadc089b9d197f@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/68135815.050a0220.3a872c.000e.GAE@google.com/
Reported-by: syzbot+1065a199625a388fce60@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/681357d6.050a0220.14dd7d.000d.GAE@google.com/
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250508-mctp-addr-dump-v2-1-c8a53fd2dd66@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/mctp/device.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/net/mctp/device.c b/net/mctp/device.c
index 8e0724c56723d..7c0dcf3df3196 100644
--- a/net/mctp/device.c
+++ b/net/mctp/device.c
@@ -117,11 +117,18 @@ static int mctp_dump_addrinfo(struct sk_buff *skb, struct netlink_callback *cb)
 	struct net_device *dev;
 	struct ifaddrmsg *hdr;
 	struct mctp_dev *mdev;
-	int ifindex, rc;
-
-	hdr = nlmsg_data(cb->nlh);
-	// filter by ifindex if requested
-	ifindex = hdr->ifa_index;
+	int ifindex = 0, rc;
+
+	/* Filter by ifindex if a header is provided */
+	if (cb->nlh->nlmsg_len >= nlmsg_msg_size(sizeof(*hdr))) {
+		hdr = nlmsg_data(cb->nlh);
+		ifindex = hdr->ifa_index;
+	} else {
+		if (cb->strict_check) {
+			NL_SET_ERR_MSG(cb->extack, "mctp: Invalid header for addr dump request");
+			return -EINVAL;
+		}
+	}
 
 	rcu_read_lock();
 	for_each_netdev_dump(net, dev, mcb->ifindex) {
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 032/145] tests/ncdevmem: Fix double-free of queue array
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 031/145] net: mctp: Dont access ifa_index when missing Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 033/145] net: mctp: Ensure keys maintain only one ref to corresponding dev Greg Kroah-Hartman
                   ` (124 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Cosmin Ratiu, Stanislav Fomichev,
	Joe Damato, Mina Almasry, Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Cosmin Ratiu <cratiu@nvidia.com>

[ Upstream commit 97c4e094a4b2edbb4fffeda718f8e806f825a18f ]

netdev_bind_rx takes ownership of the queue array passed as parameter
and frees it, so a queue array buffer cannot be reused across multiple
netdev_bind_rx calls.

This commit fixes that by always passing in a newly created queue array
to all netdev_bind_rx calls in ncdevmem.

Fixes: 85585b4bc8d8 ("selftests: add ncdevmem, netcat for devmem TCP")
Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Joe Damato <jdamato@fastly.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20250508084434.1933069-1-cratiu@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../selftests/drivers/net/hw/ncdevmem.c       | 55 ++++++++-----------
 1 file changed, 22 insertions(+), 33 deletions(-)

diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/drivers/net/hw/ncdevmem.c
index 19a6969643f46..2d8ffe98700ea 100644
--- a/tools/testing/selftests/drivers/net/hw/ncdevmem.c
+++ b/tools/testing/selftests/drivers/net/hw/ncdevmem.c
@@ -432,6 +432,22 @@ static int parse_address(const char *str, int port, struct sockaddr_in6 *sin6)
 	return 0;
 }
 
+static struct netdev_queue_id *create_queues(void)
+{
+	struct netdev_queue_id *queues;
+	size_t i = 0;
+
+	queues = calloc(num_queues, sizeof(*queues));
+	for (i = 0; i < num_queues; i++) {
+		queues[i]._present.type = 1;
+		queues[i]._present.id = 1;
+		queues[i].type = NETDEV_QUEUE_TYPE_RX;
+		queues[i].id = start_queue + i;
+	}
+
+	return queues;
+}
+
 int do_server(struct memory_buffer *mem)
 {
 	char ctrl_data[sizeof(int) * 20000];
@@ -449,7 +465,6 @@ int do_server(struct memory_buffer *mem)
 	char buffer[256];
 	int socket_fd;
 	int client_fd;
-	size_t i = 0;
 	int ret;
 
 	ret = parse_address(server_ip, atoi(port), &server_sin);
@@ -472,16 +487,7 @@ int do_server(struct memory_buffer *mem)
 
 	sleep(1);
 
-	queues = malloc(sizeof(*queues) * num_queues);
-
-	for (i = 0; i < num_queues; i++) {
-		queues[i]._present.type = 1;
-		queues[i]._present.id = 1;
-		queues[i].type = NETDEV_QUEUE_TYPE_RX;
-		queues[i].id = start_queue + i;
-	}
-
-	if (bind_rx_queue(ifindex, mem->fd, queues, num_queues, &ys))
+	if (bind_rx_queue(ifindex, mem->fd, create_queues(), num_queues, &ys))
 		error(1, 0, "Failed to bind\n");
 
 	tmp_mem = malloc(mem->size);
@@ -546,7 +552,6 @@ int do_server(struct memory_buffer *mem)
 			goto cleanup;
 		}
 
-		i++;
 		for (cm = CMSG_FIRSTHDR(&msg); cm; cm = CMSG_NXTHDR(&msg, cm)) {
 			if (cm->cmsg_level != SOL_SOCKET ||
 			    (cm->cmsg_type != SCM_DEVMEM_DMABUF &&
@@ -631,10 +636,8 @@ int do_server(struct memory_buffer *mem)
 
 void run_devmem_tests(void)
 {
-	struct netdev_queue_id *queues;
 	struct memory_buffer *mem;
 	struct ynl_sock *ys;
-	size_t i = 0;
 
 	mem = provider->alloc(getpagesize() * NUM_PAGES);
 
@@ -642,38 +645,24 @@ void run_devmem_tests(void)
 	if (configure_rss())
 		error(1, 0, "rss error\n");
 
-	queues = calloc(num_queues, sizeof(*queues));
-
 	if (configure_headersplit(1))
 		error(1, 0, "Failed to configure header split\n");
 
-	if (!bind_rx_queue(ifindex, mem->fd, queues, num_queues, &ys))
+	if (!bind_rx_queue(ifindex, mem->fd,
+			   calloc(num_queues, sizeof(struct netdev_queue_id)),
+			   num_queues, &ys))
 		error(1, 0, "Binding empty queues array should have failed\n");
 
-	for (i = 0; i < num_queues; i++) {
-		queues[i]._present.type = 1;
-		queues[i]._present.id = 1;
-		queues[i].type = NETDEV_QUEUE_TYPE_RX;
-		queues[i].id = start_queue + i;
-	}
-
 	if (configure_headersplit(0))
 		error(1, 0, "Failed to configure header split\n");
 
-	if (!bind_rx_queue(ifindex, mem->fd, queues, num_queues, &ys))
+	if (!bind_rx_queue(ifindex, mem->fd, create_queues(), num_queues, &ys))
 		error(1, 0, "Configure dmabuf with header split off should have failed\n");
 
 	if (configure_headersplit(1))
 		error(1, 0, "Failed to configure header split\n");
 
-	for (i = 0; i < num_queues; i++) {
-		queues[i]._present.type = 1;
-		queues[i]._present.id = 1;
-		queues[i].type = NETDEV_QUEUE_TYPE_RX;
-		queues[i].id = start_queue + i;
-	}
-
-	if (bind_rx_queue(ifindex, mem->fd, queues, num_queues, &ys))
+	if (bind_rx_queue(ifindex, mem->fd, create_queues(), num_queues, &ys))
 		error(1, 0, "Failed to bind\n");
 
 	/* Deactivating a bound queue should not be legal */
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 033/145] net: mctp: Ensure keys maintain only one ref to corresponding dev
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 032/145] tests/ncdevmem: Fix double-free of queue array Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 034/145] ALSA: seq: Fix delivery of UMP events to group ports Greg Kroah-Hartman
                   ` (123 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Jeremy Kerr, Andrew Jeffery,
	Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Andrew Jeffery <andrew@codeconstruct.com.au>

[ Upstream commit e4f349bd6e58051df698b82f94721f18a02a293d ]

mctp_flow_prepare_output() is called in mctp_route_output(), which
places outbound packets onto a given interface. The packet may represent
a message fragment, in which case we provoke an unbalanced reference
count to the underlying device. This causes trouble if we ever attempt
to remove the interface:

    [   48.702195] usb 1-1: USB disconnect, device number 2
    [   58.883056] unregister_netdevice: waiting for mctpusb0 to become free. Usage count = 2
    [   69.022548] unregister_netdevice: waiting for mctpusb0 to become free. Usage count = 2
    [   79.172568] unregister_netdevice: waiting for mctpusb0 to become free. Usage count = 2
    ...

Predicate the invocation of mctp_dev_set_key() in
mctp_flow_prepare_output() on not already having associated the device
with the key. It's not yet realistic to uphold the property that the key
maintains only one device reference earlier in the transmission sequence
as the route (and therefore the device) may not be known at the time the
key is associated with the socket.

Fixes: 67737c457281 ("mctp: Pass flow data & flow release events to drivers")
Acked-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Link: https://patch.msgid.link/20250508-mctp-dev-refcount-v1-1-d4f965c67bb5@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/mctp/route.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/mctp/route.c b/net/mctp/route.c
index 4c460160914f0..d9c8e5a5f9ce9 100644
--- a/net/mctp/route.c
+++ b/net/mctp/route.c
@@ -313,8 +313,10 @@ static void mctp_flow_prepare_output(struct sk_buff *skb, struct mctp_dev *dev)
 
 	key = flow->key;
 
-	if (WARN_ON(key->dev && key->dev != dev))
+	if (key->dev) {
+		WARN_ON(key->dev != dev);
 		return;
+	}
 
 	mctp_dev_set_key(dev, key);
 }
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 034/145] ALSA: seq: Fix delivery of UMP events to group ports
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 033/145] net: mctp: Ensure keys maintain only one ref to corresponding dev Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 035/145] ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info Greg Kroah-Hartman
                   ` (122 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Takashi Iwai, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

[ Upstream commit ff7b190aef6cccdb6f14d20c5753081fe6420e0b ]

When an event with UMP message is sent to a UMP client, the EP port
receives always no matter where the event is sent to, as it's a
catch-all port.  OTOH, if an event is sent to EP port, and if the
event has a certain UMP Group, it should have been delivered to the
associated UMP Group port, too, but this was ignored, so far.

This patch addresses the behavior.  Now a UMP event sent to the
Endpoint port will be delivered to the subscribers of the UMP group
port the event is associated with.

The patch also does a bit of refactoring to simplify the code about
__deliver_to_subscribers().

Fixes: 177ccf811df4 ("ALSA: seq: Support MIDI 2.0 UMP Endpoint port")
Link: https://patch.msgid.link/20250511134528.6314-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/core/seq/seq_clientmgr.c   | 52 ++++++++++++++++++++------------
 sound/core/seq/seq_ump_convert.c | 18 +++++++++++
 sound/core/seq/seq_ump_convert.h |  1 +
 3 files changed, 52 insertions(+), 19 deletions(-)

diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 706f53e39b53c..0ae01b85bb18c 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -732,15 +732,21 @@ static int snd_seq_deliver_single_event(struct snd_seq_client *client,
  */
 static int __deliver_to_subscribers(struct snd_seq_client *client,
 				    struct snd_seq_event *event,
-				    struct snd_seq_client_port *src_port,
-				    int atomic, int hop)
+				    int port, int atomic, int hop)
 {
+	struct snd_seq_client_port *src_port;
 	struct snd_seq_subscribers *subs;
 	int err, result = 0, num_ev = 0;
 	union __snd_seq_event event_saved;
 	size_t saved_size;
 	struct snd_seq_port_subs_info *grp;
 
+	if (port < 0)
+		return 0;
+	src_port = snd_seq_port_use_ptr(client, port);
+	if (!src_port)
+		return 0;
+
 	/* save original event record */
 	saved_size = snd_seq_event_packet_size(event);
 	memcpy(&event_saved, event, saved_size);
@@ -775,6 +781,7 @@ static int __deliver_to_subscribers(struct snd_seq_client *client,
 		read_unlock(&grp->list_lock);
 	else
 		up_read(&grp->list_mutex);
+	snd_seq_port_unlock(src_port);
 	memcpy(event, &event_saved, saved_size);
 	return (result < 0) ? result : num_ev;
 }
@@ -783,25 +790,32 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
 				  struct snd_seq_event *event,
 				  int atomic, int hop)
 {
-	struct snd_seq_client_port *src_port;
-	int ret = 0, ret2;
-
-	src_port = snd_seq_port_use_ptr(client, event->source.port);
-	if (src_port) {
-		ret = __deliver_to_subscribers(client, event, src_port, atomic, hop);
-		snd_seq_port_unlock(src_port);
-	}
-
-	if (client->ump_endpoint_port < 0 ||
-	    event->source.port == client->ump_endpoint_port)
-		return ret;
+	int ret;
+#if IS_ENABLED(CONFIG_SND_SEQ_UMP)
+	int ret2;
+#endif
 
-	src_port = snd_seq_port_use_ptr(client, client->ump_endpoint_port);
-	if (!src_port)
+	ret = __deliver_to_subscribers(client, event,
+				       event->source.port, atomic, hop);
+#if IS_ENABLED(CONFIG_SND_SEQ_UMP)
+	if (!snd_seq_client_is_ump(client) || client->ump_endpoint_port < 0)
 		return ret;
-	ret2 = __deliver_to_subscribers(client, event, src_port, atomic, hop);
-	snd_seq_port_unlock(src_port);
-	return ret2 < 0 ? ret2 : ret;
+	/* If it's an event from EP port (and with a UMP group),
+	 * deliver to subscribers of the corresponding UMP group port, too.
+	 * Or, if it's from non-EP port, deliver to subscribers of EP port, too.
+	 */
+	if (event->source.port == client->ump_endpoint_port)
+		ret2 = __deliver_to_subscribers(client, event,
+						snd_seq_ump_group_port(event),
+						atomic, hop);
+	else
+		ret2 = __deliver_to_subscribers(client, event,
+						client->ump_endpoint_port,
+						atomic, hop);
+	if (ret2 < 0)
+		return ret2;
+#endif
+	return ret;
 }
 
 /* deliver an event to the destination port(s).
diff --git a/sound/core/seq/seq_ump_convert.c b/sound/core/seq/seq_ump_convert.c
index ff7e558b4d51d..db2f169cae11e 100644
--- a/sound/core/seq/seq_ump_convert.c
+++ b/sound/core/seq/seq_ump_convert.c
@@ -1285,3 +1285,21 @@ int snd_seq_deliver_to_ump(struct snd_seq_client *source,
 	else
 		return cvt_to_ump_midi1(dest, dest_port, event, atomic, hop);
 }
+
+/* return the UMP group-port number of the event;
+ * return -1 if groupless or non-UMP event
+ */
+int snd_seq_ump_group_port(const struct snd_seq_event *event)
+{
+	const struct snd_seq_ump_event *ump_ev =
+		(const struct snd_seq_ump_event *)event;
+	unsigned char type;
+
+	if (!snd_seq_ev_is_ump(event))
+		return -1;
+	type = ump_message_type(ump_ev->ump[0]);
+	if (ump_is_groupless_msg(type))
+		return -1;
+	/* group-port number starts from 1 */
+	return ump_message_group(ump_ev->ump[0]) + 1;
+}
diff --git a/sound/core/seq/seq_ump_convert.h b/sound/core/seq/seq_ump_convert.h
index 6c146d8032804..4abf0a7637d70 100644
--- a/sound/core/seq/seq_ump_convert.h
+++ b/sound/core/seq/seq_ump_convert.h
@@ -18,5 +18,6 @@ int snd_seq_deliver_to_ump(struct snd_seq_client *source,
 			   struct snd_seq_client_port *dest_port,
 			   struct snd_seq_event *event,
 			   int atomic, int hop);
+int snd_seq_ump_group_port(const struct snd_seq_event *event);
 
 #endif /* __SEQ_UMP_CONVERT_H */
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 035/145] ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 034/145] ALSA: seq: Fix delivery of UMP events to group ports Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 036/145] net: cadence: macb: Fix a possible deadlock in macb_halt_tx Greg Kroah-Hartman
                   ` (121 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Takashi Iwai, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

[ Upstream commit dd33993a9721ab1dae38bd37c9f665987d554239 ]

s/devince/device/

It's used only internally, so no any behavior changes.

Fixes: 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing")
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20250511141147.10246-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/gadget/function/f_midi2.c | 2 +-
 include/sound/ump_msg.h               | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/function/f_midi2.c b/drivers/usb/gadget/function/f_midi2.c
index 12e866fb311d6..0a800ba53816a 100644
--- a/drivers/usb/gadget/function/f_midi2.c
+++ b/drivers/usb/gadget/function/f_midi2.c
@@ -475,7 +475,7 @@ static void reply_ump_stream_ep_info(struct f_midi2_ep *ep)
 /* reply a UMP EP device info */
 static void reply_ump_stream_ep_device(struct f_midi2_ep *ep)
 {
-	struct snd_ump_stream_msg_devince_info rep = {
+	struct snd_ump_stream_msg_device_info rep = {
 		.type = UMP_MSG_TYPE_STREAM,
 		.status = UMP_STREAM_MSG_STATUS_DEVICE_INFO,
 		.manufacture_id = ep->info.manufacturer,
diff --git a/include/sound/ump_msg.h b/include/sound/ump_msg.h
index 72f60ddfea753..9556b4755a1ed 100644
--- a/include/sound/ump_msg.h
+++ b/include/sound/ump_msg.h
@@ -604,7 +604,7 @@ struct snd_ump_stream_msg_ep_info {
 } __packed;
 
 /* UMP Stream Message: Device Info Notification (128bit) */
-struct snd_ump_stream_msg_devince_info {
+struct snd_ump_stream_msg_device_info {
 #ifdef __BIG_ENDIAN_BITFIELD
 	/* 0 */
 	u32 type:4;
@@ -754,7 +754,7 @@ struct snd_ump_stream_msg_fb_name {
 union snd_ump_stream_msg {
 	struct snd_ump_stream_msg_ep_discovery ep_discovery;
 	struct snd_ump_stream_msg_ep_info ep_info;
-	struct snd_ump_stream_msg_devince_info device_info;
+	struct snd_ump_stream_msg_device_info device_info;
 	struct snd_ump_stream_msg_stream_cfg stream_cfg;
 	struct snd_ump_stream_msg_fb_discovery fb_discovery;
 	struct snd_ump_stream_msg_fb_info fb_info;
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 036/145] net: cadence: macb: Fix a possible deadlock in macb_halt_tx.
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 035/145] ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 037/145] net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING Greg Kroah-Hartman
                   ` (120 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Mathieu Othacehe, Simon Horman,
	Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mathieu Othacehe <othacehe@gnu.org>

[ Upstream commit c92d6089d8ad7d4d815ebcedee3f3907b539ff1f ]

There is a situation where after THALT is set high, TGO stays high as
well. Because jiffies are never updated, as we are in a context with
interrupts disabled, we never exit that loop and have a deadlock.

That deadlock was noticed on a sama5d4 device that stayed locked for days.

Use retries instead of jiffies so that the timeout really works and we do
not have a deadlock anymore.

Fixes: e86cd53afc590 ("net/macb: better manage tx errors")
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250509121935.16282-1-othacehe@gnu.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/cadence/macb_main.c | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index c1f57d96e63fc..e3cc26472c2f1 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -1002,22 +1002,15 @@ static void macb_update_stats(struct macb *bp)
 
 static int macb_halt_tx(struct macb *bp)
 {
-	unsigned long	halt_time, timeout;
-	u32		status;
+	u32 status;
 
 	macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(THALT));
 
-	timeout = jiffies + usecs_to_jiffies(MACB_HALT_TIMEOUT);
-	do {
-		halt_time = jiffies;
-		status = macb_readl(bp, TSR);
-		if (!(status & MACB_BIT(TGO)))
-			return 0;
-
-		udelay(250);
-	} while (time_before(halt_time, timeout));
-
-	return -ETIMEDOUT;
+	/* Poll TSR until TGO is cleared or timeout. */
+	return read_poll_timeout_atomic(macb_readl, status,
+					!(status & MACB_BIT(TGO)),
+					250, MACB_HALT_TIMEOUT, false,
+					bp, TSR);
 }
 
 static void macb_tx_unmap(struct macb *bp, struct macb_tx_skb *tx_skb, int budget)
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 037/145] net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 036/145] net: cadence: macb: Fix a possible deadlock in macb_halt_tx Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 038/145] nvme-pci: make nvme_pci_npages_prp() __always_inline Greg Kroah-Hartman
                   ` (119 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Vladimir Oltean, Jakub Kicinski,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Vladimir Oltean <vladimir.oltean@nxp.com>

[ Upstream commit 498625a8ab2c8e1c9ab5105744310e8d6952cc01 ]

It has been reported that when under a bridge with stp_state=1, the logs
get spammed with this message:

[  251.734607] fsl_dpaa2_eth dpni.5 eth0: Couldn't decode source port

Further debugging shows the following info associated with packets:
source_port=-1, switch_id=-1, vid=-1, vbid=1

In other words, they are data plane packets which are supposed to be
decoded by dsa_tag_8021q_find_port_by_vbid(), but the latter (correctly)
refuses to do so, because no switch port is currently in
BR_STATE_LEARNING or BR_STATE_FORWARDING - so the packet is effectively
unexpected.

The error goes away after the port progresses to BR_STATE_LEARNING in 15
seconds (the default forward_time of the bridge), because then,
dsa_tag_8021q_find_port_by_vbid() can correctly associate the data plane
packets with a plausible bridge port in a plausible STP state.

Re-reading IEEE 802.1D-1990, I see the following:

"4.4.2 Learning: (...) The Forwarding Process shall discard received
frames."

IEEE 802.1D-2004 further clarifies:

"DISABLED, BLOCKING, LISTENING, and BROKEN all correspond to the
DISCARDING port state. While those dot1dStpPortStates serve to
distinguish reasons for discarding frames, the operation of the
Forwarding and Learning processes is the same for all of them. (...)
LISTENING represents a port that the spanning tree algorithm has
selected to be part of the active topology (computing a Root Port or
Designated Port role) but is temporarily discarding frames to guard
against loops or incorrect learning."

Well, this is not what the driver does - instead it sets
mac[port].ingress = true.

To get rid of the log spam, prevent unexpected data plane packets to
be received by software by discarding them on ingress in the LISTENING
state.

In terms of blame attribution: the prints only date back to commit
d7f9787a763f ("net: dsa: tag_8021q: add support for imprecise RX based
on the VBID"). However, the settings would permit a LISTENING port to
forward to a FORWARDING port, and the standard suggests that's not OK.

Fixes: 640f763f98c2 ("net: dsa: sja1105: Add support for Spanning Tree Protocol")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20250509113816.2221992-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/dsa/sja1105/sja1105_main.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index f8454f3b6f9c5..f674c400f05b2 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -2081,6 +2081,7 @@ static void sja1105_bridge_stp_state_set(struct dsa_switch *ds, int port,
 	switch (state) {
 	case BR_STATE_DISABLED:
 	case BR_STATE_BLOCKING:
+	case BR_STATE_LISTENING:
 		/* From UM10944 description of DRPDTAG (why put this there?):
 		 * "Management traffic flows to the port regardless of the state
 		 * of the INGRESS flag". So BPDUs are still be allowed to pass.
@@ -2090,11 +2091,6 @@ static void sja1105_bridge_stp_state_set(struct dsa_switch *ds, int port,
 		mac[port].egress    = false;
 		mac[port].dyn_learn = false;
 		break;
-	case BR_STATE_LISTENING:
-		mac[port].ingress   = true;
-		mac[port].egress    = false;
-		mac[port].dyn_learn = false;
-		break;
 	case BR_STATE_LEARNING:
 		mac[port].ingress   = true;
 		mac[port].egress    = false;
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 038/145] nvme-pci: make nvme_pci_npages_prp() __always_inline
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 037/145] net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 039/145] nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable Greg Kroah-Hartman
                   ` (118 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, kernel test robot, Kees Cook,
	Christoph Hellwig, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kees Cook <kees@kernel.org>

[ Upstream commit 40696426b8c8c4f13cf6ac52f0470eed144be4b2 ]

The only reason nvme_pci_npages_prp() could be used as a compile-time
known result in BUILD_BUG_ON() is because the compiler was always choosing
to inline the function. Under special circumstances (sanitizer coverage
functions disabled for __init functions on ARCH=um), the compiler decided
to stop inlining it:

   drivers/nvme/host/pci.c: In function 'nvme_init':
   include/linux/compiler_types.h:557:45: error: call to '__compiletime_assert_678' declared with attribute error: BUILD_BUG_ON failed: nvme_pci_npages_prp() > NVME_MAX_NR_ALLOCATIONS
     557 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:538:25: note: in definition of macro '__compiletime_assert'
     538 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:557:9: note: in expansion of macro '_compiletime_assert'
     557 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   drivers/nvme/host/pci.c:3804:9: note: in expansion of macro 'BUILD_BUG_ON'
    3804 |         BUILD_BUG_ON(nvme_pci_npages_prp() > NVME_MAX_NR_ALLOCATIONS);
         |         ^~~~~~~~~~~~

Force it to be __always_inline to make sure it is always available for
use with BUILD_BUG_ON().

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505061846.12FMyRjj-lkp@intel.com/
Fixes: c372cdd1efdf ("nvme-pci: iod npages fits in s8")
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index d49b69565d04c..7fdf7f24d46e6 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -390,7 +390,7 @@ static bool nvme_dbbuf_update_and_check_event(u16 value, __le32 *dbbuf_db,
  * as it only leads to a small amount of wasted memory for the lifetime of
  * the I/O.
  */
-static int nvme_pci_npages_prp(void)
+static __always_inline int nvme_pci_npages_prp(void)
 {
 	unsigned max_bytes = (NVME_MAX_KB_SZ * 1024) + NVME_CTRL_PAGE_SIZE;
 	unsigned nprps = DIV_ROUND_UP(max_bytes, NVME_CTRL_PAGE_SIZE);
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 039/145] nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 038/145] nvme-pci: make nvme_pci_npages_prp() __always_inline Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 040/145] ALSA: sh: SND_AICA should depend on SH_DMA_API Greg Kroah-Hartman
                   ` (117 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Hannes Reinecke, Keith Busch,
	Daniel Wagner, Christoph Hellwig, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Keith Busch <kbusch@kernel.org>

[ Upstream commit 3d8932133dcecbd9bef1559533c1089601006f45 ]

We need to lock this queue for that condition because the timeout work
executes per-namespace and can poll the poll CQ.

Reported-by: Hannes Reinecke <hare@kernel.org>
Closes: https://lore.kernel.org/all/20240902130728.1999-1-hare@kernel.org/
Fixes: a0fa9647a54e ("NVMe: add blk polling support")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nvme/host/pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 7fdf7f24d46e6..00bd21b5c641e 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1205,7 +1205,9 @@ static void nvme_poll_irqdisable(struct nvme_queue *nvmeq)
 	WARN_ON_ONCE(test_bit(NVMEQ_POLLED, &nvmeq->flags));
 
 	disable_irq(pci_irq_vector(pdev, nvmeq->cq_vector));
+	spin_lock(&nvmeq->cq_poll_lock);
 	nvme_poll_cq(nvmeq, NULL);
+	spin_unlock(&nvmeq->cq_poll_lock);
 	enable_irq(pci_irq_vector(pdev, nvmeq->cq_vector));
 }
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 040/145] ALSA: sh: SND_AICA should depend on SH_DMA_API
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 039/145] nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 041/145] net: dsa: b53: prevent standalone from trying to forward to other ports Greg Kroah-Hartman
                   ` (116 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, kernel test robot,
	Geert Uytterhoeven, Takashi Iwai, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Geert Uytterhoeven <geert+renesas@glider.be>

[ Upstream commit 66e48ef6ef506c89ec1b3851c6f9f5f80b5835ff ]

If CONFIG_SH_DMA_API=n:

    WARNING: unmet direct dependencies detected for G2_DMA
      Depends on [n]: SH_DREAMCAST [=y] && SH_DMA_API [=n]
      Selected by [y]:
      - SND_AICA [=y] && SOUND [=y] && SND [=y] && SND_SUPERH [=y] && SH_DREAMCAST [=y]

SND_AICA selects G2_DMA.  As the latter depends on SH_DMA_API, the
former should depend on SH_DMA_API, too.

Fixes: f477a538c14d07f8 ("sh: dma: fix kconfig dependency for G2_DMA")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505131320.PzgTtl9H-lkp@intel.com/
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/b90625f8a9078d0d304bafe862cbe3a3fab40082.1747121335.git.geert+renesas@glider.be
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/sh/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/sh/Kconfig b/sound/sh/Kconfig
index b75fbb3236a7b..f5fa09d740b4c 100644
--- a/sound/sh/Kconfig
+++ b/sound/sh/Kconfig
@@ -14,7 +14,7 @@ if SND_SUPERH
 
 config SND_AICA
 	tristate "Dreamcast Yamaha AICA sound"
-	depends on SH_DREAMCAST
+	depends on SH_DREAMCAST && SH_DMA_API
 	select SND_PCM
 	select G2_DMA
 	help
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 041/145] net: dsa: b53: prevent standalone from trying to forward to other ports
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 040/145] ALSA: sh: SND_AICA should depend on SH_DMA_API Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 042/145] drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp Greg Kroah-Hartman
                   ` (115 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Jonas Gorski, Florian Fainelli,
	Vladimir Oltean, Paolo Abeni, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jonas Gorski <jonas.gorski@gmail.com>

[ Upstream commit 4227ea91e2657f7965e34313448e9d0a2b67712e ]

When bridged ports and standalone ports share a VLAN, e.g. via VLAN
uppers, or untagged traffic with a vlan unaware bridge, the ASIC will
still try to forward traffic to known FDB entries on standalone ports.
But since the port VLAN masks prevent forwarding to bridged ports, this
traffic will be dropped.

This e.g. can be observed in the bridge_vlan_unaware ping tests, where
this breaks pinging with learning on.

Work around this by enabling the simplified EAP mode on switches
supporting it for standalone ports, which causes the ASIC to redirect
traffic of unknown source MAC addresses to the CPU port.

Since standalone ports do not learn, there are no known source MAC
addresses, so effectively this redirects all incoming traffic to the CPU
port.

Fixes: ff39c2d68679 ("net: dsa: b53: Add bridge support")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20250508091424.26870-1-jonas.gorski@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/dsa/b53/b53_common.c | 33 ++++++++++++++++++++++++++++++++
 drivers/net/dsa/b53/b53_regs.h   | 14 ++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index e3b5b450ee932..10484d19eaac5 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -326,6 +326,26 @@ static void b53_get_vlan_entry(struct b53_device *dev, u16 vid,
 	}
 }
 
+static void b53_set_eap_mode(struct b53_device *dev, int port, int mode)
+{
+	u64 eap_conf;
+
+	if (is5325(dev) || is5365(dev) || dev->chip_id == BCM5389_DEVICE_ID)
+		return;
+
+	b53_read64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), &eap_conf);
+
+	if (is63xx(dev)) {
+		eap_conf &= ~EAP_MODE_MASK_63XX;
+		eap_conf |= (u64)mode << EAP_MODE_SHIFT_63XX;
+	} else {
+		eap_conf &= ~EAP_MODE_MASK;
+		eap_conf |= (u64)mode << EAP_MODE_SHIFT;
+	}
+
+	b53_write64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), eap_conf);
+}
+
 static void b53_set_forwarding(struct b53_device *dev, int enable)
 {
 	u8 mgmt;
@@ -586,6 +606,13 @@ int b53_setup_port(struct dsa_switch *ds, int port)
 	b53_port_set_mcast_flood(dev, port, true);
 	b53_port_set_learning(dev, port, false);
 
+	/* Force all traffic to go to the CPU port to prevent the ASIC from
+	 * trying to forward to bridged ports on matching FDB entries, then
+	 * dropping frames because it isn't allowed to forward there.
+	 */
+	if (dsa_is_user_port(ds, port))
+		b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);
+
 	return 0;
 }
 EXPORT_SYMBOL(b53_setup_port);
@@ -2042,6 +2069,9 @@ int b53_br_join(struct dsa_switch *ds, int port, struct dsa_bridge bridge,
 		pvlan |= BIT(i);
 	}
 
+	/* Disable redirection of unknown SA to the CPU port */
+	b53_set_eap_mode(dev, port, EAP_MODE_BASIC);
+
 	/* Configure the local port VLAN control membership to include
 	 * remote ports and update the local port bitmask
 	 */
@@ -2077,6 +2107,9 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
 			pvlan &= ~BIT(i);
 	}
 
+	/* Enable redirection of unknown SA to the CPU port */
+	b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);
+
 	b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan);
 	dev->ports[port].vlan_ctl_mask = pvlan;
 
diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h
index bfbcb66bef662..5f7a0e5c5709d 100644
--- a/drivers/net/dsa/b53/b53_regs.h
+++ b/drivers/net/dsa/b53/b53_regs.h
@@ -50,6 +50,9 @@
 /* Jumbo Frame Registers */
 #define B53_JUMBO_PAGE			0x40
 
+/* EAP Registers */
+#define B53_EAP_PAGE			0x42
+
 /* EEE Control Registers Page */
 #define B53_EEE_PAGE			0x92
 
@@ -480,6 +483,17 @@
 #define   JMS_MIN_SIZE			1518
 #define   JMS_MAX_SIZE			9724
 
+/*************************************************************************
+ * EAP Page Registers
+ *************************************************************************/
+#define B53_PORT_EAP_CONF(i)		(0x20 + 8 * (i))
+#define  EAP_MODE_SHIFT			51
+#define  EAP_MODE_SHIFT_63XX		50
+#define  EAP_MODE_MASK			(0x3ull << EAP_MODE_SHIFT)
+#define  EAP_MODE_MASK_63XX		(0x3ull << EAP_MODE_SHIFT_63XX)
+#define  EAP_MODE_BASIC			0
+#define  EAP_MODE_SIMPLIFIED		3
+
 /*************************************************************************
  * EEE Configuration Page Registers
  *************************************************************************/
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 042/145] drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 041/145] net: dsa: b53: prevent standalone from trying to forward to other ports Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 043/145] vsock/test: Fix occasional failure in SIOCOUTQ tests Greg Kroah-Hartman
                   ` (114 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Melissa Wen, Alex Hung, Alex Deucher,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Melissa Wen <mwen@igalia.com>

[ Upstream commit a3b7e65b6be59e686e163fa1ceb0922f996897c2 ]

Similar to commit 6a057072ddd1 ("drm/amd/display: Fix null check for
pipe_ctx->plane_state in dcn20_program_pipe") that addresses a null
pointer dereference on dcn20_update_dchubp_dpp. This is the same
function hooked for update_dchubp_dpp in dcn401, with the same issue.
Fix possible null pointer deference on dcn401_program_pipe too.

Fixes: 63ab80d9ac0a ("drm/amd/display: DML2.1 Post-Si Cleanup")
Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d8d47f739752227957d8efc0cb894761bfe1d879)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
index 89af3e4afbc25..0d39d193dacfa 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
@@ -2027,9 +2027,9 @@ static void dcn401_program_pipe(
 				dc->res_pool->hubbub, pipe_ctx->plane_res.hubp->inst, pipe_ctx->hubp_regs.det_size);
 	}
 
-	if (pipe_ctx->update_flags.raw ||
-		(pipe_ctx->plane_state && pipe_ctx->plane_state->update_flags.raw) ||
-		pipe_ctx->stream->update_flags.raw)
+	if (pipe_ctx->plane_state && (pipe_ctx->update_flags.raw ||
+	    pipe_ctx->plane_state->update_flags.raw ||
+	    pipe_ctx->stream->update_flags.raw))
 		dc->hwss.update_dchubp_dpp(dc, pipe_ctx, context);
 
 	if (pipe_ctx->plane_state && (pipe_ctx->update_flags.bits.enable ||
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 043/145] vsock/test: Fix occasional failure in SIOCOUTQ tests
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 042/145] drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 044/145] net/mlx5e: Disable MACsec offload for uplink representor profile Greg Kroah-Hartman
                   ` (113 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Konstantin Shkolnyy,
	Stefano Garzarella, Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Konstantin Shkolnyy <kshk@linux.ibm.com>

[ Upstream commit 7fd7ad6f36af36f30a06d165eff3780cb139fa79 ]

These tests:
    "SOCK_STREAM ioctl(SIOCOUTQ) 0 unsent bytes"
    "SOCK_SEQPACKET ioctl(SIOCOUTQ) 0 unsent bytes"
output: "Unexpected 'SIOCOUTQ' value, expected 0, got 64 (CLIENT)".

They test that the SIOCOUTQ ioctl reports 0 unsent bytes after the data
have been received by the other side. However, sometimes there is a delay
in updating this "unsent bytes" counter, and the test fails even though
the counter properly goes to 0 several milliseconds later.

The delay occurs in the kernel because the used buffer notification
callback virtio_vsock_tx_done(), called upon receipt of the data by the
other side, doesn't update the counter itself. It delegates that to
a kernel thread (via vsock->tx_work). Sometimes that thread is delayed
more than the test expects.

Change the test to poll SIOCOUTQ until it returns 0 or a timeout occurs.

Signed-off-by: Konstantin Shkolnyy <kshk@linux.ibm.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Fixes: 18ee44ce97c1 ("test/vsock: add ioctl unsent bytes test")
Link: https://patch.msgid.link/20250507151456.2577061-1-kshk@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/testing/vsock/vsock_test.c | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c
index d0f6d253ac72d..613551132a966 100644
--- a/tools/testing/vsock/vsock_test.c
+++ b/tools/testing/vsock/vsock_test.c
@@ -1264,21 +1264,25 @@ static void test_unsent_bytes_client(const struct test_opts *opts, int type)
 	send_buf(fd, buf, sizeof(buf), 0, sizeof(buf));
 	control_expectln("RECEIVED");
 
-	ret = ioctl(fd, SIOCOUTQ, &sock_bytes_unsent);
-	if (ret < 0) {
-		if (errno == EOPNOTSUPP) {
-			fprintf(stderr, "Test skipped, SIOCOUTQ not supported.\n");
-		} else {
+	/* SIOCOUTQ isn't guaranteed to instantly track sent data. Even though
+	 * the "RECEIVED" message means that the other side has received the
+	 * data, there can be a delay in our kernel before updating the "unsent
+	 * bytes" counter. Repeat SIOCOUTQ until it returns 0.
+	 */
+	timeout_begin(TIMEOUT);
+	do {
+		ret = ioctl(fd, SIOCOUTQ, &sock_bytes_unsent);
+		if (ret < 0) {
+			if (errno == EOPNOTSUPP) {
+				fprintf(stderr, "Test skipped, SIOCOUTQ not supported.\n");
+				break;
+			}
 			perror("ioctl");
 			exit(EXIT_FAILURE);
 		}
-	} else if (ret == 0 && sock_bytes_unsent != 0) {
-		fprintf(stderr,
-			"Unexpected 'SIOCOUTQ' value, expected 0, got %i\n",
-			sock_bytes_unsent);
-		exit(EXIT_FAILURE);
-	}
-
+		timeout_check("SIOCOUTQ");
+	} while (sock_bytes_unsent != 0);
+	timeout_end();
 	close(fd);
 }
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 044/145] net/mlx5e: Disable MACsec offload for uplink representor profile
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 043/145] vsock/test: Fix occasional failure in SIOCOUTQ tests Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 045/145] qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd() Greg Kroah-Hartman
                   ` (112 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Carolina Jubran, Shahar Shitrit,
	Dragos Tatulea, Tariq Toukan, Simon Horman, Jakub Kicinski,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Carolina Jubran <cjubran@nvidia.com>

[ Upstream commit 588431474eb7572e57a927fa8558c9ba2f8af143 ]

MACsec offload is not supported in switchdev mode for uplink
representors. When switching to the uplink representor profile, the
MACsec offload feature must be cleared from the netdevice's features.

If left enabled, attempts to add offloads result in a null pointer
dereference, as the uplink representor does not support MACsec offload
even though the feature bit remains set.

Clear NETIF_F_HW_MACSEC in mlx5e_fix_uplink_rep_features().

Kernel log:

Oops: general protection fault, probably for non-canonical address 0xdffffc000000000f: 0000 [#1] SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000078-0x000000000000007f]
CPU: 29 UID: 0 PID: 4714 Comm: ip Not tainted 6.14.0-rc4_for_upstream_debug_2025_03_02_17_35 #1
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
RIP: 0010:__mutex_lock+0x128/0x1dd0
Code: d0 7c 08 84 d2 0f 85 ad 15 00 00 8b 35 91 5c fe 03 85 f6 75 29 49 8d 7e 60 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 a6 15 00 00 4d 3b 76 60 0f 85 fd 0b 00 00 65 ff
RSP: 0018:ffff888147a4f160 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 000000000000000f RSI: 0000000000000000 RDI: 0000000000000078
RBP: ffff888147a4f2e0 R08: ffffffffa05d2c19 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000018 R15: ffff888152de0000
FS:  00007f855e27d800(0000) GS:ffff88881ee80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004e5768 CR3: 000000013ae7c005 CR4: 0000000000372eb0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ? die_addr+0x3d/0xa0
 ? exc_general_protection+0x144/0x220
 ? asm_exc_general_protection+0x22/0x30
 ? mlx5e_macsec_add_secy+0xf9/0x700 [mlx5_core]
 ? __mutex_lock+0x128/0x1dd0
 ? lockdep_set_lock_cmp_fn+0x190/0x190
 ? mlx5e_macsec_add_secy+0xf9/0x700 [mlx5_core]
 ? mutex_lock_io_nested+0x1ae0/0x1ae0
 ? lock_acquire+0x1c2/0x530
 ? macsec_upd_offload+0x145/0x380
 ? lockdep_hardirqs_on_prepare+0x400/0x400
 ? kasan_save_stack+0x30/0x40
 ? kasan_save_stack+0x20/0x40
 ? kasan_save_track+0x10/0x30
 ? __kasan_kmalloc+0x77/0x90
 ? __kmalloc_noprof+0x249/0x6b0
 ? genl_family_rcv_msg_attrs_parse.constprop.0+0xb5/0x240
 ? mlx5e_macsec_add_secy+0xf9/0x700 [mlx5_core]
 mlx5e_macsec_add_secy+0xf9/0x700 [mlx5_core]
 ? mlx5e_macsec_add_rxsa+0x11a0/0x11a0 [mlx5_core]
 macsec_update_offload+0x26c/0x820
 ? macsec_set_mac_address+0x4b0/0x4b0
 ? lockdep_hardirqs_on_prepare+0x284/0x400
 ? _raw_spin_unlock_irqrestore+0x47/0x50
 macsec_upd_offload+0x2c8/0x380
 ? macsec_update_offload+0x820/0x820
 ? __nla_parse+0x22/0x30
 ? genl_family_rcv_msg_attrs_parse.constprop.0+0x15e/0x240
 genl_family_rcv_msg_doit+0x1cc/0x2a0
 ? genl_family_rcv_msg_attrs_parse.constprop.0+0x240/0x240
 ? cap_capable+0xd4/0x330
 genl_rcv_msg+0x3ea/0x670
 ? genl_family_rcv_msg_dumpit+0x2a0/0x2a0
 ? lockdep_set_lock_cmp_fn+0x190/0x190
 ? macsec_update_offload+0x820/0x820
 netlink_rcv_skb+0x12b/0x390
 ? genl_family_rcv_msg_dumpit+0x2a0/0x2a0
 ? netlink_ack+0xd80/0xd80
 ? rwsem_down_read_slowpath+0xf90/0xf90
 ? netlink_deliver_tap+0xcd/0xac0
 ? netlink_deliver_tap+0x155/0xac0
 ? _copy_from_iter+0x1bb/0x12c0
 genl_rcv+0x24/0x40
 netlink_unicast+0x440/0x700
 ? netlink_attachskb+0x760/0x760
 ? lock_acquire+0x1c2/0x530
 ? __might_fault+0xbb/0x170
 netlink_sendmsg+0x749/0xc10
 ? netlink_unicast+0x700/0x700
 ? __might_fault+0xbb/0x170
 ? netlink_unicast+0x700/0x700
 __sock_sendmsg+0xc5/0x190
 ____sys_sendmsg+0x53f/0x760
 ? import_iovec+0x7/0x10
 ? kernel_sendmsg+0x30/0x30
 ? __copy_msghdr+0x3c0/0x3c0
 ? filter_irq_stacks+0x90/0x90
 ? stack_depot_save_flags+0x28/0xa30
 ___sys_sendmsg+0xeb/0x170
 ? kasan_save_stack+0x30/0x40
 ? copy_msghdr_from_user+0x110/0x110
 ? do_syscall_64+0x6d/0x140
 ? lock_acquire+0x1c2/0x530
 ? __virt_addr_valid+0x116/0x3b0
 ? __virt_addr_valid+0x1da/0x3b0
 ? lock_downgrade+0x680/0x680
 ? __delete_object+0x21/0x50
 __sys_sendmsg+0xf7/0x180
 ? __sys_sendmsg_sock+0x20/0x20
 ? kmem_cache_free+0x14c/0x4e0
 ? __x64_sys_close+0x78/0xd0
 do_syscall_64+0x6d/0x140
 entry_SYSCALL_64_after_hwframe+0x4b/0x53
RIP: 0033:0x7f855e113367
Code: 0e 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10
RSP: 002b:00007ffd15e90c88 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f855e113367
RDX: 0000000000000000 RSI: 00007ffd15e90cf0 RDI: 0000000000000004
RBP: 00007ffd15e90dbc R08: 0000000000000028 R09: 000000000045d100
R10: 00007f855e011dd8 R11: 0000000000000246 R12: 0000000000000019
R13: 0000000067c6b785 R14: 00000000004a1e80 R15: 0000000000000000
 </TASK>
Modules linked in: 8021q garp mrp sch_ingress openvswitch nsh mlx5_ib mlx5_fwctl mlx5_dpll mlx5_core rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib iw_cm ib_cm ib_uverbs ib_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay zram zsmalloc fuse [last unloaded: mlx5_core]
---[ end trace 0000000000000000 ]---

Fixes: 8ff0ac5be144 ("net/mlx5: Add MACsec offload Tx command support")
Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Shahar Shitrit <shshitrit@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/1746958552-561295-1-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 8fcaee381b0e0..01f6a60308cb7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4373,6 +4373,10 @@ static netdev_features_t mlx5e_fix_uplink_rep_features(struct net_device *netdev
 	if (netdev->features & NETIF_F_HW_VLAN_CTAG_FILTER)
 		netdev_warn(netdev, "Disabling HW_VLAN CTAG FILTERING, not supported in switchdev mode\n");
 
+	features &= ~NETIF_F_HW_MACSEC;
+	if (netdev->features & NETIF_F_HW_MACSEC)
+		netdev_warn(netdev, "Disabling HW MACsec offload, not supported in switchdev mode\n");
+
 	return features;
 }
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 045/145] qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 044/145] net/mlx5e: Disable MACsec offload for uplink representor profile Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 046/145] regulator: max20086: fix invalid memory access Greg Kroah-Hartman
                   ` (111 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Abdun Nihaal, Simon Horman,
	Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Abdun Nihaal <abdun.nihaal@gmail.com>

[ Upstream commit 9d8a99c5a7c7f4f7eca2c168a4ec254409670035 ]

In one of the error paths in qlcnic_sriov_channel_cfg_cmd(), the memory
allocated in qlcnic_sriov_alloc_bc_mbx_args() for mailbox arguments is
not freed. Fix that by jumping to the error path that frees them, by
calling qlcnic_free_mbx_args(). This was found using static analysis.

Fixes: f197a7aa6288 ("qlcnic: VF-PF communication channel implementation")
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250512044829.36400-1-abdun.nihaal@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index 28d24d59efb84..d57b976b90409 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -1484,8 +1484,11 @@ static int qlcnic_sriov_channel_cfg_cmd(struct qlcnic_adapter *adapter, u8 cmd_o
 	}
 
 	cmd_op = (cmd.rsp.arg[0] & 0xff);
-	if (cmd.rsp.arg[0] >> 25 == 2)
-		return 2;
+	if (cmd.rsp.arg[0] >> 25 == 2) {
+		ret = 2;
+		goto out;
+	}
+
 	if (cmd_op == QLCNIC_BC_CMD_CHANNEL_INIT)
 		set_bit(QLC_BC_VF_STATE, &vf->state);
 	else
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 046/145] regulator: max20086: fix invalid memory access
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 045/145] qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd() Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 047/145] octeontx2-pf: Fix ethtool support for SDP representors Greg Kroah-Hartman
                   ` (110 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Cosmin Tanislav, Mark Brown,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Cosmin Tanislav <demonsingur@gmail.com>

[ Upstream commit 6b0cd72757c69bc2d45da42b41023e288d02e772 ]

max20086_parse_regulators_dt() calls of_regulator_match() using an
array of struct of_regulator_match allocated on the stack for the
matches argument.

of_regulator_match() calls devm_of_regulator_put_matches(), which calls
devres_alloc() to allocate a struct devm_of_regulator_matches which will
be de-allocated using devm_of_regulator_put_matches().

struct devm_of_regulator_matches is populated with the stack allocated
matches array.

If the device fails to probe, devm_of_regulator_put_matches() will be
called and will try to call of_node_put() on that stack pointer,
generating the following dmesg entries:

max20086 6-0028: Failed to read DEVICE_ID reg: -121
kobject: '\xc0$\xa5\x03' (000000002cebcb7a): is not initialized, yet
kobject_put() is being called.

Followed by a stack trace matching the call flow described above.

Switch to allocating the matches array using devm_kcalloc() to
avoid accessing the stack pointer long after it's out of scope.

This also has the advantage of allowing multiple max20086 to probe
without overriding the data stored inside the global of_regulator_match.

Fixes: bfff546aae50 ("regulator: Add MAX20086-MAX20089 driver")
Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Link: https://patch.msgid.link/20250508064947.2567255-1-demonsingur@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/regulator/max20086-regulator.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/max20086-regulator.c b/drivers/regulator/max20086-regulator.c
index 59eb23d467ec0..198d45f8e8849 100644
--- a/drivers/regulator/max20086-regulator.c
+++ b/drivers/regulator/max20086-regulator.c
@@ -132,7 +132,7 @@ static int max20086_regulators_register(struct max20086 *chip)
 
 static int max20086_parse_regulators_dt(struct max20086 *chip, bool *boot_on)
 {
-	struct of_regulator_match matches[MAX20086_MAX_REGULATORS] = { };
+	struct of_regulator_match *matches;
 	struct device_node *node;
 	unsigned int i;
 	int ret;
@@ -143,6 +143,11 @@ static int max20086_parse_regulators_dt(struct max20086 *chip, bool *boot_on)
 		return -ENODEV;
 	}
 
+	matches = devm_kcalloc(chip->dev, chip->info->num_outputs,
+			       sizeof(*matches), GFP_KERNEL);
+	if (!matches)
+		return -ENOMEM;
+
 	for (i = 0; i < chip->info->num_outputs; ++i)
 		matches[i].name = max20086_output_names[i];
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 047/145] octeontx2-pf: Fix ethtool support for SDP representors
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 046/145] regulator: max20086: fix invalid memory access Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 048/145] io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo() Greg Kroah-Hartman
                   ` (109 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Hariprasad Kelam, Simon Horman,
	David S. Miller, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hariprasad Kelam <hkelam@marvell.com>

[ Upstream commit 314007549d89adebdd1e214a743d7e26edbd075e ]

The hardware supports multiple MAC types, including RPM, SDP, and LBK.
However, features such as link settings and pause frames are only available
on RPM MAC, and not supported on SDP or LBK.

This patch updates the ethtool operations logic accordingly to reflect
this behavior.

Fixes: 2f7f33a09516 ("octeontx2-pf: Add representors for sdp MAC")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
index 2d53dc77ef1ef..b3f616a7f2e96 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
@@ -315,7 +315,7 @@ static void otx2_get_pauseparam(struct net_device *netdev,
 	struct otx2_nic *pfvf = netdev_priv(netdev);
 	struct cgx_pause_frm_cfg *req, *rsp;
 
-	if (is_otx2_lbkvf(pfvf->pdev))
+	if (is_otx2_lbkvf(pfvf->pdev) || is_otx2_sdp_rep(pfvf->pdev))
 		return;
 
 	mutex_lock(&pfvf->mbox.lock);
@@ -347,7 +347,7 @@ static int otx2_set_pauseparam(struct net_device *netdev,
 	if (pause->autoneg)
 		return -EOPNOTSUPP;
 
-	if (is_otx2_lbkvf(pfvf->pdev))
+	if (is_otx2_lbkvf(pfvf->pdev) || is_otx2_sdp_rep(pfvf->pdev))
 		return -EOPNOTSUPP;
 
 	if (pause->rx_pause)
@@ -937,8 +937,8 @@ static u32 otx2_get_link(struct net_device *netdev)
 {
 	struct otx2_nic *pfvf = netdev_priv(netdev);
 
-	/* LBK link is internal and always UP */
-	if (is_otx2_lbkvf(pfvf->pdev))
+	/* LBK and SDP links are internal and always UP */
+	if (is_otx2_lbkvf(pfvf->pdev) || is_otx2_sdp_rep(pfvf->pdev))
 		return 1;
 	return pfvf->linfo.link_up;
 }
@@ -1409,7 +1409,7 @@ static int otx2vf_get_link_ksettings(struct net_device *netdev,
 {
 	struct otx2_nic *pfvf = netdev_priv(netdev);
 
-	if (is_otx2_lbkvf(pfvf->pdev)) {
+	if (is_otx2_lbkvf(pfvf->pdev) || is_otx2_sdp_rep(pfvf->pdev)) {
 		cmd->base.duplex = DUPLEX_FULL;
 		cmd->base.speed = SPEED_100000;
 	} else {
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 048/145] io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 047/145] octeontx2-pf: Fix ethtool support for SDP representors Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 049/145] drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value Greg Kroah-Hartman
                   ` (108 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Jann Horn, Jens Axboe, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jens Axboe <axboe@kernel.dk>

[ Upstream commit d871198ee431d90f5308d53998c1ba1d5db5619a ]

Not everything requires locking in there, which is why the 'has_lock'
variable exists. But enough does that it's a bit unwieldy to manage.
Wrap the whole thing in a ->uring_lock trylock, and just return
with no output if we fail to grab it. The existing trylock() will
already have greatly diminished utility/output for the failure case.

This fixes an issue with reading the SQE fields, if the ring is being
actively resized at the same time.

Reported-by: Jann Horn <jannh@google.com>
Fixes: 79cfe9e59c2a ("io_uring/register: add IORING_REGISTER_RESIZE_RINGS")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 io_uring/fdinfo.c | 48 ++++++++++++++++++++++++-----------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
index f60d0a9d505e2..336aec7ea8c29 100644
--- a/io_uring/fdinfo.c
+++ b/io_uring/fdinfo.c
@@ -86,13 +86,8 @@ static inline void napi_show_fdinfo(struct io_ring_ctx *ctx,
 }
 #endif
 
-/*
- * Caller holds a reference to the file already, we don't need to do
- * anything else to get an extra reference.
- */
-__cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
+static void __io_uring_show_fdinfo(struct io_ring_ctx *ctx, struct seq_file *m)
 {
-	struct io_ring_ctx *ctx = file->private_data;
 	struct io_overflow_cqe *ocqe;
 	struct io_rings *r = ctx->rings;
 	struct rusage sq_usage;
@@ -106,7 +101,6 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
 	unsigned int sq_entries, cq_entries;
 	int sq_pid = -1, sq_cpu = -1;
 	u64 sq_total_time = 0, sq_work_time = 0;
-	bool has_lock;
 	unsigned int i;
 
 	if (ctx->flags & IORING_SETUP_CQE32)
@@ -176,15 +170,7 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
 		seq_printf(m, "\n");
 	}
 
-	/*
-	 * Avoid ABBA deadlock between the seq lock and the io_uring mutex,
-	 * since fdinfo case grabs it in the opposite direction of normal use
-	 * cases. If we fail to get the lock, we just don't iterate any
-	 * structures that could be going away outside the io_uring mutex.
-	 */
-	has_lock = mutex_trylock(&ctx->uring_lock);
-
-	if (has_lock && (ctx->flags & IORING_SETUP_SQPOLL)) {
+	if (ctx->flags & IORING_SETUP_SQPOLL) {
 		struct io_sq_data *sq = ctx->sq_data;
 
 		/*
@@ -206,7 +192,7 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
 	seq_printf(m, "SqTotalTime:\t%llu\n", sq_total_time);
 	seq_printf(m, "SqWorkTime:\t%llu\n", sq_work_time);
 	seq_printf(m, "UserFiles:\t%u\n", ctx->file_table.data.nr);
-	for (i = 0; has_lock && i < ctx->file_table.data.nr; i++) {
+	for (i = 0; i < ctx->file_table.data.nr; i++) {
 		struct file *f = NULL;
 
 		if (ctx->file_table.data.nodes[i])
@@ -218,7 +204,7 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
 		}
 	}
 	seq_printf(m, "UserBufs:\t%u\n", ctx->buf_table.nr);
-	for (i = 0; has_lock && i < ctx->buf_table.nr; i++) {
+	for (i = 0; i < ctx->buf_table.nr; i++) {
 		struct io_mapped_ubuf *buf = NULL;
 
 		if (ctx->buf_table.nodes[i])
@@ -228,7 +214,7 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
 		else
 			seq_printf(m, "%5u: <none>\n", i);
 	}
-	if (has_lock && !xa_empty(&ctx->personalities)) {
+	if (!xa_empty(&ctx->personalities)) {
 		unsigned long index;
 		const struct cred *cred;
 
@@ -238,7 +224,7 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
 	}
 
 	seq_puts(m, "PollList:\n");
-	for (i = 0; has_lock && i < (1U << ctx->cancel_table.hash_bits); i++) {
+	for (i = 0; i < (1U << ctx->cancel_table.hash_bits); i++) {
 		struct io_hash_bucket *hb = &ctx->cancel_table.hbs[i];
 		struct io_kiocb *req;
 
@@ -247,9 +233,6 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
 					task_work_pending(req->tctx->task));
 	}
 
-	if (has_lock)
-		mutex_unlock(&ctx->uring_lock);
-
 	seq_puts(m, "CqOverflowList:\n");
 	spin_lock(&ctx->completion_lock);
 	list_for_each_entry(ocqe, &ctx->cq_overflow_list, list) {
@@ -262,4 +245,23 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
 	spin_unlock(&ctx->completion_lock);
 	napi_show_fdinfo(ctx, m);
 }
+
+/*
+ * Caller holds a reference to the file already, we don't need to do
+ * anything else to get an extra reference.
+ */
+__cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
+{
+	struct io_ring_ctx *ctx = file->private_data;
+
+	/*
+	 * Avoid ABBA deadlock between the seq lock and the io_uring mutex,
+	 * since fdinfo case grabs it in the opposite direction of normal use
+	 * cases.
+	 */
+	if (mutex_trylock(&ctx->uring_lock)) {
+		__io_uring_show_fdinfo(ctx, m);
+		mutex_unlock(&ctx->uring_lock);
+	}
+}
 #endif
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 049/145] drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 048/145] io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo() Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 050/145] netlink: specs: tc: fix a couple of attribute names Greg Kroah-Hartman
                   ` (107 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Umesh Nerlige Ramappa, Matthew Brost,
	Lucas De Marchi, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>

[ Upstream commit 66c8f7b435bddb7d8577ac8a57e175a6cb147227 ]

For determining actual job execution time, save the current value of the
CTX_TIMESTAMP register rather than the value saved in LRC since the
current register value is the closest to the start time of the job.

v2: Define MI_STORE_REGISTER_MEM to fix compile error
v3: Place MI_STORE_REGISTER_MEM sorted by MI_INSTR (Lucas)

Fixes: 65921374c48f ("drm/xe: Emit ctx timestamp copy in ring ops")
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250509161159.2173069-6-umesh.nerlige.ramappa@intel.com
(cherry picked from commit 38b14233e5deff51db8faec287b4acd227152246)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/xe/instructions/xe_mi_commands.h | 4 ++++
 drivers/gpu/drm/xe/xe_lrc.c                      | 2 +-
 drivers/gpu/drm/xe/xe_ring_ops.c                 | 7 ++-----
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/xe/instructions/xe_mi_commands.h b/drivers/gpu/drm/xe/instructions/xe_mi_commands.h
index 10ec2920d31b3..d4033278be9fc 100644
--- a/drivers/gpu/drm/xe/instructions/xe_mi_commands.h
+++ b/drivers/gpu/drm/xe/instructions/xe_mi_commands.h
@@ -47,6 +47,10 @@
 #define   MI_LRI_FORCE_POSTED		REG_BIT(12)
 #define   MI_LRI_LEN(x)			(((x) & 0xff) + 1)
 
+#define MI_STORE_REGISTER_MEM		(__MI_INSTR(0x24) | XE_INSTR_NUM_DW(4))
+#define   MI_SRM_USE_GGTT		REG_BIT(22)
+#define   MI_SRM_ADD_CS_OFFSET		REG_BIT(19)
+
 #define MI_FLUSH_DW			__MI_INSTR(0x26)
 #define   MI_FLUSH_DW_STORE_INDEX	REG_BIT(21)
 #define   MI_INVALIDATE_TLB		REG_BIT(18)
diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index bbb9ffbf63672..2a953c4f7d5dd 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -684,7 +684,7 @@ static inline u32 __xe_lrc_start_seqno_offset(struct xe_lrc *lrc)
 
 static u32 __xe_lrc_ctx_job_timestamp_offset(struct xe_lrc *lrc)
 {
-	/* The start seqno is stored in the driver-defined portion of PPHWSP */
+	/* This is stored in the driver-defined portion of PPHWSP */
 	return xe_lrc_pphwsp_offset(lrc) + LRC_CTX_JOB_TIMESTAMP_OFFSET;
 }
 
diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c
index 8d1fb33d923f4..3493177947680 100644
--- a/drivers/gpu/drm/xe/xe_ring_ops.c
+++ b/drivers/gpu/drm/xe/xe_ring_ops.c
@@ -234,13 +234,10 @@ static u32 get_ppgtt_flag(struct xe_sched_job *job)
 
 static int emit_copy_timestamp(struct xe_lrc *lrc, u32 *dw, int i)
 {
-	dw[i++] = MI_COPY_MEM_MEM | MI_COPY_MEM_MEM_SRC_GGTT |
-		MI_COPY_MEM_MEM_DST_GGTT;
+	dw[i++] = MI_STORE_REGISTER_MEM | MI_SRM_USE_GGTT | MI_SRM_ADD_CS_OFFSET;
+	dw[i++] = RING_CTX_TIMESTAMP(0).addr;
 	dw[i++] = xe_lrc_ctx_job_timestamp_ggtt_addr(lrc);
 	dw[i++] = 0;
-	dw[i++] = xe_lrc_ctx_timestamp_ggtt_addr(lrc);
-	dw[i++] = 0;
-	dw[i++] = MI_NOOP;
 
 	return i;
 }
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 050/145] netlink: specs: tc: fix a couple of attribute names
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 049/145] drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 051/145] netlink: specs: tc: all actions are indexed arrays Greg Kroah-Hartman
                   ` (106 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jakub Kicinski <kuba@kernel.org>

[ Upstream commit a9fb87b8b86918e34ef6bf3316311f41bc1a5b1f ]

Fix up spelling of two attribute names. These are clearly typoes
and will prevent C codegen from working. Let's treat this as
a fix to get the correction into users' hands ASAP, and prevent
anyone depending on the wrong names.

Fixes: a1bcfde83669 ("doc/netlink/specs: Add a spec for tc")
Link: https://patch.msgid.link/20250513221316.841700-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 Documentation/netlink/specs/tc.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/netlink/specs/tc.yaml b/Documentation/netlink/specs/tc.yaml
index aacccea5dfe42..5e1ff04f51f26 100644
--- a/Documentation/netlink/specs/tc.yaml
+++ b/Documentation/netlink/specs/tc.yaml
@@ -2745,7 +2745,7 @@ attribute-sets:
         type: u16
         byte-order: big-endian
       -
-        name: key-l2-tpv3-sid
+        name: key-l2tpv3-sid
         type: u32
         byte-order: big-endian
       -
@@ -3504,7 +3504,7 @@ attribute-sets:
         name: rate64
         type: u64
       -
-        name: prate4
+        name: prate64
         type: u64
       -
         name: burst
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 051/145] netlink: specs: tc: all actions are indexed arrays
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 050/145] netlink: specs: tc: fix a couple of attribute names Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 052/145] octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy Greg Kroah-Hartman
                   ` (105 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jakub Kicinski <kuba@kernel.org>

[ Upstream commit f3dd5fb2fa494dcbdb10f8d27f2deac8ef61a2fc ]

Some TC filters have actions listed as indexed arrays of nests
and some as just nests. They are all indexed arrays, the handling
is common across filters.

Fixes: 2267672a6190 ("doc/netlink/specs: Update the tc spec")
Link: https://patch.msgid.link/20250513221638.842532-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 Documentation/netlink/specs/tc.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/netlink/specs/tc.yaml b/Documentation/netlink/specs/tc.yaml
index 5e1ff04f51f26..953aa837958b3 100644
--- a/Documentation/netlink/specs/tc.yaml
+++ b/Documentation/netlink/specs/tc.yaml
@@ -2017,7 +2017,8 @@ attribute-sets:
     attributes:
       -
         name: act
-        type: nest
+        type: indexed-array
+        sub-type: nest
         nested-attributes: tc-act-attrs
       -
         name: police
@@ -2250,7 +2251,8 @@ attribute-sets:
     attributes:
       -
         name: act
-        type: nest
+        type: indexed-array
+        sub-type: nest
         nested-attributes: tc-act-attrs
       -
         name: police
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 052/145] octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 051/145] netlink: specs: tc: all actions are indexed arrays Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 053/145] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability Greg Kroah-Hartman
                   ` (104 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Subbaraya Sundeep, Simon Horman,
	Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Subbaraya Sundeep <sbhatta@marvell.com>

[ Upstream commit 865ab2461375e3a5a2526f91f9a9f17b8931bc9e ]

MASCEC hardware block has a field called maximum transmit size for
TX secy. Max packet size going out of MCS block has be programmed
taking into account full packet size which has L2 header,SecTag
and ICV. MACSEC offload driver is configuring max transmit size as
macsec interface MTU which is incorrect. Say with 1500 MTU of real
device, macsec interface created on top of real device will have MTU of
1468(1500 - (SecTag + ICV)). This is causing packets from macsec
interface of size greater than or equal to 1468 are not getting
transmitted out because driver programmed max transmit size as 1468
instead of 1514(1500 + ETH_HDR_LEN).

Fixes: c54ffc73601c ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/1747053756-4529-1-git-send-email-sbhatta@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
index f3b9daffaec3c..4c7e0f345cb5b 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
@@ -531,7 +531,8 @@ static int cn10k_mcs_write_tx_secy(struct otx2_nic *pfvf,
 	if (sw_tx_sc->encrypt)
 		sectag_tci |= (MCS_TCI_E | MCS_TCI_C);
 
-	policy = FIELD_PREP(MCS_TX_SECY_PLCY_MTU, secy->netdev->mtu);
+	policy = FIELD_PREP(MCS_TX_SECY_PLCY_MTU,
+			    pfvf->netdev->mtu + OTX2_ETH_HLEN);
 	/* Write SecTag excluding AN bits(1..0) */
 	policy |= FIELD_PREP(MCS_TX_SECY_PLCY_ST_TCI, sectag_tci >> 2);
 	policy |= FIELD_PREP(MCS_TX_SECY_PLCY_ST_OFFSET, tag_offset);
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 053/145] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 052/145] octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 054/145] octeontx2-af: Fix CGX Receive counters Greg Kroah-Hartman
                   ` (103 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Bo-Cun Chen, Daniel Golle,
	Michal Swiatkowski, Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bo-Cun Chen <bc-bocun.chen@mediatek.com>

[ Upstream commit 1bdea6fad6fb985ff13828373c48e337c4e939f9 ]

Since MTK_ESW_BIT is a bit number rather than a bitmap, it causes
MTK_HAS_CAPS to produce incorrect results. This leads to the ETH
driver not declaring MAC capabilities correctly for the MT7988 ESW.

Fixes: 445eb6448ed3 ("net: ethernet: mtk_eth_soc: add basic support for MT7988 SoC")
Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/b8b37f409d1280fad9c4d32521e6207f63cd3213.1747110258.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 341def2bf1d35..22a8b909dd80b 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4683,7 +4683,7 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
 	}
 
 	if (mtk_is_netsys_v3_or_greater(mac->hw) &&
-	    MTK_HAS_CAPS(mac->hw->soc->caps, MTK_ESW_BIT) &&
+	    MTK_HAS_CAPS(mac->hw->soc->caps, MTK_ESW) &&
 	    id == MTK_GMAC1_ID) {
 		mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE |
 						       MAC_SYM_PAUSE |
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 054/145] octeontx2-af: Fix CGX Receive counters
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 053/145] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 055/145] octeontx2-pf: Do not reallocate all ntuple filters Greg Kroah-Hartman
                   ` (102 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Hariprasad Kelam, Jakub Kicinski,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hariprasad Kelam <hkelam@marvell.com>

[ Upstream commit bf449f35e77fd44017abf991fac1f9ab7705bbe0 ]

Each CGX block supports 4 logical MACs (LMACS). Receive
counters CGX_CMR_RX_STAT0-8 are per LMAC and CGX_CMR_RX_STAT9-12
are per CGX.

Due a bug in previous patch, stale Per CGX counters values observed.

Fixes: 66208910e57a ("octeontx2-af: Support to retrieve CGX LMAC stats")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://patch.msgid.link/20250513071554.728922-1-hkelam@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
index 8216f843a7cd5..e43c4608d3ba3 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
@@ -707,6 +707,11 @@ int cgx_get_rx_stats(void *cgxd, int lmac_id, int idx, u64 *rx_stat)
 
 	if (!is_lmac_valid(cgx, lmac_id))
 		return -ENODEV;
+
+	/* pass lmac as 0 for CGX_CMR_RX_STAT9-12 */
+	if (idx >= CGX_RX_STAT_GLOBAL_INDEX)
+		lmac_id = 0;
+
 	*rx_stat =  cgx_read(cgx, lmac_id, CGXX_CMRX_RX_STAT0 + (idx * 8));
 	return 0;
 }
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 055/145] octeontx2-pf: Do not reallocate all ntuple filters
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 054/145] octeontx2-af: Fix CGX Receive counters Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 056/145] wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request Greg Kroah-Hartman
                   ` (101 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Subbaraya Sundeep, Simon Horman,
	Paolo Abeni, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Subbaraya Sundeep <sbhatta@marvell.com>

[ Upstream commit dcb479fde00be9a151c047d0a7c0626b64eb0019 ]

If ntuple filters count is modified followed by
unicast filters count using devlink then the ntuple count
set by user is ignored and all the ntuple filters are
being reallocated. Fix this by storing the ntuple count
set by user. Without this patch, say if user tries
to modify ntuple count as 8 followed by ucast filter count as 4
using devlink commands then ntuple count is being reverted to
default value 16 i.e, not retaining user set value 8.

Fixes: 39c469188b6d ("octeontx2-pf: Add ucast filter count configurability via devlink.")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/1747054357-5850-1-git-send-email-sbhatta@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h  | 1 +
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c | 1 +
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c   | 3 ++-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
index 65814e3dc93f5..7cc12f10e8a15 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
@@ -349,6 +349,7 @@ struct otx2_flow_config {
 	struct list_head	flow_list_tc;
 	u8			ucast_flt_cnt;
 	bool			ntuple;
+	u16			ntuple_cnt;
 };
 
 struct dev_hw_ops {
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c
index 33ec9a7f7c033..e13ae5484c19c 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c
@@ -41,6 +41,7 @@ static int otx2_dl_mcam_count_set(struct devlink *devlink, u32 id,
 	if (!pfvf->flow_cfg)
 		return 0;
 
+	pfvf->flow_cfg->ntuple_cnt = ctx->val.vu16;
 	otx2_alloc_mcam_entries(pfvf, ctx->val.vu16);
 
 	return 0;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
index 47bfd1fb37d4b..64c6d9162ef64 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
@@ -247,7 +247,7 @@ int otx2_mcam_entry_init(struct otx2_nic *pfvf)
 	mutex_unlock(&pfvf->mbox.lock);
 
 	/* Allocate entries for Ntuple filters */
-	count = otx2_alloc_mcam_entries(pfvf, OTX2_DEFAULT_FLOWCOUNT);
+	count = otx2_alloc_mcam_entries(pfvf, flow_cfg->ntuple_cnt);
 	if (count <= 0) {
 		otx2_clear_ntuple_flow_info(pfvf, flow_cfg);
 		return 0;
@@ -307,6 +307,7 @@ int otx2_mcam_flow_init(struct otx2_nic *pf)
 	INIT_LIST_HEAD(&pf->flow_cfg->flow_list_tc);
 
 	pf->flow_cfg->ucast_flt_cnt = OTX2_DEFAULT_UNICAST_FLOWS;
+	pf->flow_cfg->ntuple_cnt = OTX2_DEFAULT_FLOWCOUNT;
 
 	/* Allocate bare minimum number of MCAM entries needed for
 	 * unicast and ntuple filters.
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 056/145] wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 055/145] octeontx2-pf: Do not reallocate all ntuple filters Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 057/145] mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices Greg Kroah-Hartman
                   ` (100 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, syzbot+4bcdddd48bb6f0be0da1,
	Kees Cook, Gustavo A. R. Silva, Johannes Berg, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kees Cook <kees@kernel.org>

[ Upstream commit 82bbe02b2500ef0a62053fe2eb84773fe31c5a0a ]

Make sure that n_channels is set after allocating the
struct cfg80211_registered_device::int_scan_req member. Seen with
syzkaller:

UBSAN: array-index-out-of-bounds in net/mac80211/scan.c:1208:5
index 0 is out of range for type 'struct ieee80211_channel *[] __counted_by(n_channels)' (aka 'struct ieee80211_channel *[]')

This was missed in the initial conversions because I failed to locate
the allocation likely due to the "sizeof(void *)" not matching the
"channels" array type.

Reported-by: syzbot+4bcdddd48bb6f0be0da1@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/lkml/680fd171.050a0220.2b69d1.045e.GAE@google.com/
Fixes: e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by")
Signed-off-by: Kees Cook <kees@kernel.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://patch.msgid.link/20250509184641.work.542-kees@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/mac80211/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 53e5aee468856..2b6249d75a5d4 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1354,10 +1354,12 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	hw->wiphy->software_iftypes |= BIT(NL80211_IFTYPE_MONITOR);
 
 
-	local->int_scan_req = kzalloc(sizeof(*local->int_scan_req) +
-				      sizeof(void *) * channels, GFP_KERNEL);
+	local->int_scan_req = kzalloc(struct_size(local->int_scan_req,
+						  channels, channels),
+				      GFP_KERNEL);
 	if (!local->int_scan_req)
 		return -ENOMEM;
+	local->int_scan_req->n_channels = channels;
 
 	eth_broadcast_addr(local->int_scan_req->bssid);
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 057/145] mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 056/145] wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 058/145] net/tls: fix kernel panic when alloc_page failed Greg Kroah-Hartman
                   ` (99 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Ido Schimmel, Petr Machata,
	Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ido Schimmel <idosch@nvidia.com>

[ Upstream commit 92ec4855034b2c4d13f117558dc73d20581fa9ff ]

The driver only offloads neighbors that are constructed on top of net
devices registered by it or their uppers (which are all Ethernet). The
device supports GRE encapsulation and decapsulation of forwarded
traffic, but the driver will not offload dummy neighbors constructed on
top of GRE net devices as they are not uppers of its net devices:

 # ip link add name gre1 up type gre tos inherit local 192.0.2.1 remote 198.51.100.1
 # ip neigh add 0.0.0.0 lladdr 0.0.0.0 nud noarp dev gre1
 $ ip neigh show dev gre1 nud noarp
 0.0.0.0 lladdr 0.0.0.0 NOARP

(Note that the neighbor is not marked with 'offload')

When the driver is reloaded and the existing configuration is replayed,
the driver does not perform the same check regarding existing neighbors
and offloads the previously added one:

 # devlink dev reload pci/0000:01:00.0
 $ ip neigh show dev gre1 nud noarp
 0.0.0.0 lladdr 0.0.0.0 offload NOARP

If the neighbor is later deleted, the driver will ignore the
notification (given the GRE net device is not its upper) and will
therefore keep referencing freed memory, resulting in a use-after-free
[1] when the net device is deleted:

 # ip neigh del 0.0.0.0 lladdr 0.0.0.0 dev gre1
 # ip link del dev gre1

Fix by skipping neighbor replay if the net device for which the replay
is performed is not our upper.

[1]
BUG: KASAN: slab-use-after-free in mlxsw_sp_neigh_entry_update+0x1ea/0x200
Read of size 8 at addr ffff888155b0e420 by task ip/2282
[...]
Call Trace:
 <TASK>
 dump_stack_lvl+0x6f/0xa0
 print_address_description.constprop.0+0x6f/0x350
 print_report+0x108/0x205
 kasan_report+0xdf/0x110
 mlxsw_sp_neigh_entry_update+0x1ea/0x200
 mlxsw_sp_router_rif_gone_sync+0x2a8/0x440
 mlxsw_sp_rif_destroy+0x1e9/0x750
 mlxsw_sp_netdevice_ipip_ol_event+0x3c9/0xdc0
 mlxsw_sp_router_netdevice_event+0x3ac/0x15e0
 notifier_call_chain+0xca/0x150
 call_netdevice_notifiers_info+0x7f/0x100
 unregister_netdevice_many_notify+0xc8c/0x1d90
 rtnl_dellink+0x34e/0xa50
 rtnetlink_rcv_msg+0x6fb/0xb70
 netlink_rcv_skb+0x131/0x360
 netlink_unicast+0x426/0x710
 netlink_sendmsg+0x75a/0xc20
 __sock_sendmsg+0xc1/0x150
 ____sys_sendmsg+0x5aa/0x7b0
 ___sys_sendmsg+0xfc/0x180
 __sys_sendmsg+0x121/0x1b0
 do_syscall_64+0xbb/0x1d0
 entry_SYSCALL_64_after_hwframe+0x4b/0x53

Fixes: 8fdb09a7674c ("mlxsw: spectrum_router: Replay neighbours when RIF is made")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/c53c02c904fde32dad484657be3b1477884e9ad6.1747225701.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 7d6d859cef3f9..511cd92e0e3e7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -3014,6 +3014,9 @@ static int mlxsw_sp_neigh_rif_made_sync(struct mlxsw_sp *mlxsw_sp,
 		.rif = rif,
 	};
 
+	if (!mlxsw_sp_dev_lower_is_port(mlxsw_sp_rif_dev(rif)))
+		return 0;
+
 	neigh_for_each(&arp_tbl, mlxsw_sp_neigh_rif_made_sync_each, &rms);
 	if (rms.err)
 		goto err_arp;
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 058/145] net/tls: fix kernel panic when alloc_page failed
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (56 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 057/145] mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 059/145] tsnep: fix timestamping with a stacked DSA driver Greg Kroah-Hartman
                   ` (98 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Pengtao He, Jakub Kicinski,
	Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Pengtao He <hept.hept.hept@gmail.com>

[ Upstream commit 491deb9b8c4ad12fe51d554a69b8165b9ef9429f ]

We cannot set frag_list to NULL pointer when alloc_page failed.
It will be used in tls_strp_check_queue_ok when the next time
tls_strp_read_sock is called.

This is because we don't reset full_len in tls_strp_flush_anchor_copy()
so the recv path will try to continue handling the partial record
on the next call but we dettached the rcvq from the frag list.
Alternative fix would be to reset full_len.

Unable to handle kernel NULL pointer dereference
at virtual address 0000000000000028
 Call trace:
 tls_strp_check_rcv+0x128/0x27c
 tls_strp_data_ready+0x34/0x44
 tls_data_ready+0x3c/0x1f0
 tcp_data_ready+0x9c/0xe4
 tcp_data_queue+0xf6c/0x12d0
 tcp_rcv_established+0x52c/0x798

Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser")
Signed-off-by: Pengtao He <hept.hept.hept@gmail.com>
Link: https://patch.msgid.link/20250514132013.17274-1-hept.hept.hept@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/tls/tls_strp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/tls/tls_strp.c b/net/tls/tls_strp.c
index 77e33e1e340e3..65b0da6fdf6a7 100644
--- a/net/tls/tls_strp.c
+++ b/net/tls/tls_strp.c
@@ -396,7 +396,6 @@ static int tls_strp_read_copy(struct tls_strparser *strp, bool qshort)
 		return 0;
 
 	shinfo = skb_shinfo(strp->anchor);
-	shinfo->frag_list = NULL;
 
 	/* If we don't know the length go max plus page for cipher overhead */
 	need_spc = strp->stm.full_len ?: TLS_MAX_PAYLOAD_SIZE + PAGE_SIZE;
@@ -412,6 +411,8 @@ static int tls_strp_read_copy(struct tls_strparser *strp, bool qshort)
 				   page, 0, 0);
 	}
 
+	shinfo->frag_list = NULL;
+
 	strp->copy_mode = 1;
 	strp->stm.offset = 0;
 
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 059/145] tsnep: fix timestamping with a stacked DSA driver
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (57 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 058/145] net/tls: fix kernel panic when alloc_page failed Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 060/145] ublk: fix dead loop when canceling io command Greg Kroah-Hartman
                   ` (97 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Vladimir Oltean, Gerhard Engleder,
	Jakub Kicinski, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gerhard Engleder <gerhard@engleder-embedded.com>

[ Upstream commit b3ca9eef6646576ad506a96d941d87a69f66732a ]

This driver is susceptible to a form of the bug explained in commit
c26a2c2ddc01 ("gianfar: Fix TX timestamping with a stacked DSA driver")
and in Documentation/networking/timestamping.rst section "Other caveats
for MAC drivers", specifically it timestamps any skb which has
SKBTX_HW_TSTAMP, and does not consider if timestamping has been enabled
in adapter->hwtstamp_config.tx_type.

Evaluate the proper TX timestamping condition only once on the TX
path (in tsnep_xmit_frame_ring()) and store the result in an additional
TX entry flag. Evaluate the new TX entry flag in the TX confirmation path
(in tsnep_tx_poll()).

This way SKBTX_IN_PROGRESS is set by the driver as required, but never
evaluated. SKBTX_IN_PROGRESS shall not be evaluated as it can be set
by a stacked DSA driver and evaluating it would lead to unwanted
timestamps.

Fixes: 403f69bbdbad ("tsnep: Add TSN endpoint Ethernet MAC driver")
Suggested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20250514195657.25874-1-gerhard@engleder-embedded.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/engleder/tsnep_main.c | 30 ++++++++++++++--------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
index 0d030cb0b21c7..63aeb400051c4 100644
--- a/drivers/net/ethernet/engleder/tsnep_main.c
+++ b/drivers/net/ethernet/engleder/tsnep_main.c
@@ -67,6 +67,8 @@
 #define TSNEP_TX_TYPE_XDP_NDO_MAP_PAGE	(TSNEP_TX_TYPE_XDP_NDO | TSNEP_TX_TYPE_MAP_PAGE)
 #define TSNEP_TX_TYPE_XDP		(TSNEP_TX_TYPE_XDP_TX | TSNEP_TX_TYPE_XDP_NDO)
 #define TSNEP_TX_TYPE_XSK		BIT(12)
+#define TSNEP_TX_TYPE_TSTAMP		BIT(13)
+#define TSNEP_TX_TYPE_SKB_TSTAMP	(TSNEP_TX_TYPE_SKB | TSNEP_TX_TYPE_TSTAMP)
 
 #define TSNEP_XDP_TX		BIT(0)
 #define TSNEP_XDP_REDIRECT	BIT(1)
@@ -387,8 +389,7 @@ static void tsnep_tx_activate(struct tsnep_tx *tx, int index, int length,
 	if (entry->skb) {
 		entry->properties = length & TSNEP_DESC_LENGTH_MASK;
 		entry->properties |= TSNEP_DESC_INTERRUPT_FLAG;
-		if ((entry->type & TSNEP_TX_TYPE_SKB) &&
-		    (skb_shinfo(entry->skb)->tx_flags & SKBTX_IN_PROGRESS))
+		if ((entry->type & TSNEP_TX_TYPE_SKB_TSTAMP) == TSNEP_TX_TYPE_SKB_TSTAMP)
 			entry->properties |= TSNEP_DESC_EXTENDED_WRITEBACK_FLAG;
 
 		/* toggle user flag to prevent false acknowledge
@@ -480,7 +481,8 @@ static int tsnep_tx_map_frag(skb_frag_t *frag, struct tsnep_tx_entry *entry,
 	return mapped;
 }
 
-static int tsnep_tx_map(struct sk_buff *skb, struct tsnep_tx *tx, int count)
+static int tsnep_tx_map(struct sk_buff *skb, struct tsnep_tx *tx, int count,
+			bool do_tstamp)
 {
 	struct device *dmadev = tx->adapter->dmadev;
 	struct tsnep_tx_entry *entry;
@@ -506,6 +508,9 @@ static int tsnep_tx_map(struct sk_buff *skb, struct tsnep_tx *tx, int count)
 				entry->type = TSNEP_TX_TYPE_SKB_INLINE;
 				mapped = 0;
 			}
+
+			if (do_tstamp)
+				entry->type |= TSNEP_TX_TYPE_TSTAMP;
 		} else {
 			skb_frag_t *frag = &skb_shinfo(skb)->frags[i - 1];
 
@@ -559,11 +564,12 @@ static int tsnep_tx_unmap(struct tsnep_tx *tx, int index, int count)
 static netdev_tx_t tsnep_xmit_frame_ring(struct sk_buff *skb,
 					 struct tsnep_tx *tx)
 {
-	int count = 1;
 	struct tsnep_tx_entry *entry;
+	bool do_tstamp = false;
+	int count = 1;
 	int length;
-	int i;
 	int retval;
+	int i;
 
 	if (skb_shinfo(skb)->nr_frags > 0)
 		count += skb_shinfo(skb)->nr_frags;
@@ -580,7 +586,13 @@ static netdev_tx_t tsnep_xmit_frame_ring(struct sk_buff *skb,
 	entry = &tx->entry[tx->write];
 	entry->skb = skb;
 
-	retval = tsnep_tx_map(skb, tx, count);
+	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
+	    tx->adapter->hwtstamp_config.tx_type == HWTSTAMP_TX_ON) {
+		skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
+		do_tstamp = true;
+	}
+
+	retval = tsnep_tx_map(skb, tx, count, do_tstamp);
 	if (retval < 0) {
 		tsnep_tx_unmap(tx, tx->write, count);
 		dev_kfree_skb_any(entry->skb);
@@ -592,9 +604,6 @@ static netdev_tx_t tsnep_xmit_frame_ring(struct sk_buff *skb,
 	}
 	length = retval;
 
-	if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
-		skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
-
 	for (i = 0; i < count; i++)
 		tsnep_tx_activate(tx, (tx->write + i) & TSNEP_RING_MASK, length,
 				  i == count - 1);
@@ -845,8 +854,7 @@ static bool tsnep_tx_poll(struct tsnep_tx *tx, int napi_budget)
 
 		length = tsnep_tx_unmap(tx, tx->read, count);
 
-		if ((entry->type & TSNEP_TX_TYPE_SKB) &&
-		    (skb_shinfo(entry->skb)->tx_flags & SKBTX_IN_PROGRESS) &&
+		if (((entry->type & TSNEP_TX_TYPE_SKB_TSTAMP) == TSNEP_TX_TYPE_SKB_TSTAMP) &&
 		    (__le32_to_cpu(entry->desc_wb->properties) &
 		     TSNEP_DESC_EXTENDED_WRITEBACK_FLAG)) {
 			struct skb_shared_hwtstamps hwtstamps;
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 060/145] ublk: fix dead loop when canceling io command
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (58 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 059/145] tsnep: fix timestamping with a stacked DSA driver Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 061/145] NFSv4/pnfs: Reset the layout state after a layoutreturn Greg Kroah-Hartman
                   ` (96 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Shinichiro Kawasaki, Ming Lei,
	Jens Axboe, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ming Lei <ming.lei@redhat.com>

[ Upstream commit dd24f87f65c957f30e605e44961d2fd53a44c780 ]

Commit:

f40139fde527 ("ublk: fix race between io_uring_cmd_complete_in_task and
		ublk_cancel_cmd")

adds a request state check in ublk_cancel_cmd(), and if the request is
started, skips canceling this uring_cmd.

However, the current uring_cmd may be in ACTIVE state, without block
request coming to the uring command. Meantime, if the cached request in
tag_set.tags[tag] has been delivered to ublk server and reycycled, then
this uring_cmd can't be canceled.

ublk requests are aborted in ublk char device release handler, which
depends on canceling all ACTIVE uring_cmd. So it causes a dead loop.

Fix this issue by not taking a stale request into account when canceling
uring_cmd in ublk_cancel_cmd().

Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Closes: https://lore.kernel.org/linux-block/mruqwpf4tqenkbtgezv5oxwq7ngyq24jzeyqy4ixzvivatbbxv@4oh2wzz4e6qn/
Fixes: f40139fde527 ("ublk: fix race between io_uring_cmd_complete_in_task and ublk_cancel_cmd")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250515162601.77346-1-ming.lei@redhat.com
[axboe: rewording of commit message]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/block/ublk_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 348c4feb7a2df..7bbfc20f116a4 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -1677,7 +1677,7 @@ static void ublk_cancel_cmd(struct ublk_queue *ubq, unsigned tag,
 	 * that ublk_dispatch_req() is always called
 	 */
 	req = blk_mq_tag_to_rq(ub->tag_set.tags[ubq->q_id], tag);
-	if (req && blk_mq_request_started(req))
+	if (req && blk_mq_request_started(req) && req->tag == tag)
 		return;
 
 	spin_lock(&ubq->cancel_lock);
-- 
2.39.5




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 061/145] NFSv4/pnfs: Reset the layout state after a layoutreturn
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (59 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 060/145] ublk: fix dead loop when canceling io command Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 062/145] dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted" Greg Kroah-Hartman
                   ` (95 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Trond Myklebust, Sasha Levin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Trond Myklebust <trond.myklebust@hammerspace.com>

[ Upstream commit 6d6d7f91cc8c111d40416ac9240a3bb9396c5235 ]

If there are still layout segments in the layout plh_return_lsegs list
after a layout return, we should be resetting the state to ensure they
eventually get returned as well.

Fixes: 68f744797edd ("pNFS: Do not free layout segments that are marked for return")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/nfs/pnfs.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -745,6 +745,14 @@ pnfs_mark_matching_lsegs_invalid(struct
 	return remaining;
 }
 
+static void pnfs_reset_return_info(struct pnfs_layout_hdr *lo)
+{
+	struct pnfs_layout_segment *lseg;
+
+	list_for_each_entry(lseg, &lo->plh_return_segs, pls_list)
+		pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0);
+}
+
 static void
 pnfs_free_returned_lsegs(struct pnfs_layout_hdr *lo,
 		struct list_head *free_me,
@@ -1292,6 +1300,7 @@ void pnfs_layoutreturn_free_lsegs(struct
 		pnfs_mark_matching_lsegs_invalid(lo, &freeme, range, seq);
 		pnfs_free_returned_lsegs(lo, &freeme, range, seq);
 		pnfs_set_layout_stateid(lo, stateid, NULL, true);
+		pnfs_reset_return_info(lo);
 	} else
 		pnfs_mark_layout_stateid_invalid(lo, &freeme);
 out_unlock:



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 062/145] dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted"
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (60 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 061/145] NFSv4/pnfs: Reset the layout state after a layoutreturn Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 063/145] Revert "kbuild, rust: use -fremap-path-prefix to make paths relative" Greg Kroah-Hartman
                   ` (94 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Nathan Lynch, Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nathan Lynch <nathan.lynch@amd.com>

commit df180e65305f8c1e020d54bfc2132349fd693de1 upstream.

Several issues with this change:

* The analysis is flawed and it's unclear what problem is being
  fixed. There is no difference between wait_event_freezable_timeout()
  and wait_event_timeout() with respect to device interrupts. And of
  course "the interrupt notifying the finish of an operation happens
  during wait_event_freezable_timeout()" -- that's how it's supposed
  to work.

* The link at the "Closes:" tag appears to be an unrelated
  use-after-free in idxd.

* It introduces a regression: dmatest threads are meant to be
  freezable and this change breaks that.

See discussion here:
https://lore.kernel.org/dmaengine/878qpa13fe.fsf@AUSNATLYNCH.amd.com/

Fixes: e87ca16e9911 ("dmaengine: dmatest: Fix dmatest waiting less when interrupted")
Signed-off-by: Nathan Lynch <nathan.lynch@amd.com>
Link: https://lore.kernel.org/r/20250403-dmaengine-dmatest-revert-waiting-less-v1-1-8227c5a3d7c8@amd.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/dmatest.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -841,9 +841,9 @@ static int dmatest_func(void *data)
 		} else {
 			dma_async_issue_pending(chan);
 
-			wait_event_timeout(thread->done_wait,
-					   done->done,
-					   msecs_to_jiffies(params->timeout));
+			wait_event_freezable_timeout(thread->done_wait,
+					done->done,
+					msecs_to_jiffies(params->timeout));
 
 			status = dma_async_is_tx_complete(chan, cookie, NULL,
 							  NULL);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 063/145] Revert "kbuild, rust: use -fremap-path-prefix to make paths relative"
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (61 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 062/145] dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted" Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 064/145] sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator Greg Kroah-Hartman
                   ` (93 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Thomas Weißschuh, Miguel Ojeda,
	Masahiro Yamada

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Weißschuh <linux@weissschuh.net>

commit 8cf5b3f836147d8d4e7c6eb4c01945b97dab8297 upstream.

This reverts commit dbdffaf50ff9cee3259a7cef8a7bd9e0f0ba9f13.

--remap-path-prefix breaks the ability of debuggers to find the source
file corresponding to object files. As there is no simple or uniform
way to specify the source directory explicitly, this breaks developers
workflows.

Revert the unconditional usage of --remap-path-prefix, equivalent to the
same change for -ffile-prefix-map in KBUILD_CPPFLAGS.

Fixes: dbdffaf50ff9 ("kbuild, rust: use -fremap-path-prefix to make paths relative")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 Makefile |    1 -
 1 file changed, 1 deletion(-)

--- a/Makefile
+++ b/Makefile
@@ -1070,7 +1070,6 @@ KBUILD_CFLAGS += -fno-builtin-wcslen
 # change __FILE__ to the relative path to the source directory
 ifdef building_out_of_srctree
 KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srcroot)/=)
-KBUILD_RUSTFLAGS += --remap-path-prefix=$(srcroot)/=
 endif
 
 # include additional Makefiles when needed



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 064/145] sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (62 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 063/145] Revert "kbuild, rust: use -fremap-path-prefix to make paths relative" Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 065/145] udf: Make sure i_lenExtents is uptodate on inode eviction Greg Kroah-Hartman
                   ` (92 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Tejun Heo, Andrea Righi

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tejun Heo <tj@kernel.org>

commit 428dc9fc0873989d73918d4a9cc22745b7bbc799 upstream.

BPF programs may call next() and destroy() on BPF iterators even after new()
returns an error value (e.g. bpf_for_each() macro ignores error returns from
new()). bpf_iter_scx_dsq_new() could leave the iterator in an uninitialized
state after an error return causing bpf_iter_scx_dsq_next() to dereference
garbage data. Make bpf_iter_scx_dsq_new() always clear $kit->dsq so that
next() and destroy() become noops.

Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 650ba21b131e ("sched_ext: Implement DSQ iterator")
Cc: stable@vger.kernel.org # v6.12+
Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/sched/ext.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -7173,6 +7173,12 @@ __bpf_kfunc int bpf_iter_scx_dsq_new(str
 	BUILD_BUG_ON(__alignof__(struct bpf_iter_scx_dsq_kern) !=
 		     __alignof__(struct bpf_iter_scx_dsq));
 
+	/*
+	 * next() and destroy() will be called regardless of the return value.
+	 * Always clear $kit->dsq.
+	 */
+	kit->dsq = NULL;
+
 	if (flags & ~__SCX_DSQ_ITER_USER_FLAGS)
 		return -EINVAL;
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 065/145] udf: Make sure i_lenExtents is uptodate on inode eviction
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (63 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 064/145] sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 066/145] fs/eventpoll: fix endless busy loop after timeout has expired Greg Kroah-Hartman
                   ` (91 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Jan Kara

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jan Kara <jack@suse.cz>

commit 55dd5b4db3bf04cf077a8d1712f6295d4517c337 upstream.

UDF maintains total length of all extents in i_lenExtents. Generally we
keep extent lengths (and thus i_lenExtents) block aligned because it
makes the file appending logic simpler. However the standard mandates
that the inode size must match the length of all extents and thus we
trim the last extent when closing the file. To catch possible bugs we
also verify that i_lenExtents matches i_size when evicting inode from
memory. Commit b405c1e58b73 ("udf: refactor udf_next_aext() to handle
error") however broke the code updating i_lenExtents and thus
udf_evict_inode() ended up spewing lots of errors about incorrectly
sized extents although the extents were actually sized properly. Fix the
updating of i_lenExtents to silence the errors.

Fixes: b405c1e58b73 ("udf: refactor udf_next_aext() to handle error")
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/udf/truncate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/udf/truncate.c
+++ b/fs/udf/truncate.c
@@ -115,7 +115,7 @@ void udf_truncate_tail_extent(struct ino
 	}
 	/* This inode entry is in-memory only and thus we don't have to mark
 	 * the inode dirty */
-	if (ret == 0)
+	if (ret >= 0)
 		iinfo->i_lenExtents = inode->i_size;
 	brelse(epos.bh);
 }



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 066/145] fs/eventpoll: fix endless busy loop after timeout has expired
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (64 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 065/145] udf: Make sure i_lenExtents is uptodate on inode eviction Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 067/145] HID: bpf: abort dispatch if device destroyed Greg Kroah-Hartman
                   ` (90 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Joe Damato, Max Kellermann, Jan Kara,
	Christian Brauner

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Max Kellermann <max.kellermann@ionos.com>

commit d9ec73301099ec5975505e1c3effbe768bab9490 upstream.

After commit 0a65bc27bd64 ("eventpoll: Set epoll timeout if it's in
the future"), the following program would immediately enter a busy
loop in the kernel:

```
int main() {
  int e = epoll_create1(0);
  struct epoll_event event = {.events = EPOLLIN};
  epoll_ctl(e, EPOLL_CTL_ADD, 0, &event);
  const struct timespec timeout = {.tv_nsec = 1};
  epoll_pwait2(e, &event, 1, &timeout, 0);
}
```

This happens because the given (non-zero) timeout of 1 nanosecond
usually expires before ep_poll() is entered and then
ep_schedule_timeout() returns false, but `timed_out` is never set
because the code line that sets it is skipped.  This quickly turns
into a soft lockup, RCU stalls and deadlocks, inflicting severe
headaches to the whole system.

When the timeout has expired, we don't need to schedule a hrtimer, but
we should set the `timed_out` variable.  Therefore, I suggest moving
the ep_schedule_timeout() check into the `timed_out` expression
instead of skipping it.

brauner: Note that there was an earlier fix by Joe Damato in response to
my bug report in [1].

Fixes: 0a65bc27bd64 ("eventpoll: Set epoll timeout if it's in the future")
Cc: Joe Damato <jdamato@fastly.com>
Cc: stable@vger.kernel.org
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Link: https://lore.kernel.org/20250429153419.94723-1-jdamato@fastly.com [1]
Link: https://lore.kernel.org/20250429185827.3564438-1-max.kellermann@ionos.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/eventpoll.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -2111,9 +2111,10 @@ static int ep_poll(struct eventpoll *ep,
 
 		write_unlock_irq(&ep->lock);
 
-		if (!eavail && ep_schedule_timeout(to))
-			timed_out = !schedule_hrtimeout_range(to, slack,
-							      HRTIMER_MODE_ABS);
+		if (!eavail)
+			timed_out = !ep_schedule_timeout(to) ||
+				!schedule_hrtimeout_range(to, slack,
+							  HRTIMER_MODE_ABS);
 		__set_current_state(TASK_RUNNING);
 
 		/*



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 067/145] HID: bpf: abort dispatch if device destroyed
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (65 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 066/145] fs/eventpoll: fix endless busy loop after timeout has expired Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 068/145] HID: amd_sfh: Fix SRA sensor when its the only sensor Greg Kroah-Hartman
                   ` (89 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Rong Zhang, Petr Tesarik,
	Benjamin Tissoires

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Rong Zhang <i@rong.moe>

commit 578e1b96fad7402ff7e9c7648c8f1ad0225147c8 upstream.

The current HID bpf implementation assumes no output report/request will
go through it after hid_bpf_destroy_device() has been called. This leads
to a bug that unplugging certain types of HID devices causes a cleaned-
up SRCU to be accessed. The bug was previously a hidden failure until a
recent x86 percpu change [1] made it access not-present pages.

The bug will be triggered if the conditions below are met:

A) a device under the driver has some LEDs on
B) hid_ll_driver->request() is uninplemented (e.g., logitech-djreceiver)

If condition A is met, hidinput_led_worker() is always scheduled *after*
hid_bpf_destroy_device().

hid_destroy_device
` hid_bpf_destroy_device
  ` cleanup_srcu_struct(&hdev->bpf.srcu)
` hid_remove_device
  ` ...
    ` led_classdev_unregister
      ` led_trigger_set(led_cdev, NULL)
        ` led_set_brightness(led_cdev, LED_OFF)
          ` ...
            ` input_inject_event
              ` input_event_dispose
                ` hidinput_input_event
                  ` schedule_work(&hid->led_work) [hidinput_led_worker]

This is fine when condition B is not met, where hidinput_led_worker()
calls hid_ll_driver->request(). This is the case for most HID drivers,
which implement it or use the generic one from usbhid. The driver itself
or an underlying driver will then abort processing the request.

Otherwise, hidinput_led_worker() tries hid_hw_output_report() and leads
to the bug.

hidinput_led_worker
` hid_hw_output_report
  ` dispatch_hid_bpf_output_report
    ` srcu_read_lock(&hdev->bpf.srcu)
    ` srcu_read_unlock(&hdev->bpf.srcu, idx)

The bug has existed since the introduction [2] of
dispatch_hid_bpf_output_report(). However, the same bug also exists in
dispatch_hid_bpf_raw_requests(), and I've reproduced (no visible effect
because of the lack of [1], but confirmed bpf.destroyed == 1) the bug
against the commit (i.e., the Fixes:) introducing the function. This is
because hidinput_led_worker() falls back to hid_hw_raw_request() when
hid_ll_driver->output_report() is uninplemented (e.g., logitech-
djreceiver).

hidinput_led_worker
` hid_hw_output_report: -ENOSYS
` hid_hw_raw_request
  ` dispatch_hid_bpf_raw_requests
    ` srcu_read_lock(&hdev->bpf.srcu)
    ` srcu_read_unlock(&hdev->bpf.srcu, idx)

Fix the issue by returning early in the two mentioned functions if
hid_bpf has been marked as destroyed. Though
dispatch_hid_bpf_device_event() handles input events, and there is no
evidence that it may be called after the destruction, the same check, as
a safety net, is also added to it to maintain the consistency among all
dispatch functions.

The impact of the bug on other architectures is unclear. Even if it acts
as a hidden failure, this is still dangerous because it corrupts
whatever is on the address calculated by SRCU. Thus, CC'ing the stable
list.

[1]: commit 9d7de2aa8b41 ("x86/percpu/64: Use relative percpu offsets")
[2]: commit 9286675a2aed ("HID: bpf: add HID-BPF hooks for
hid_hw_output_report")

Closes: https://lore.kernel.org/all/20250506145548.GGaBoi9Jzp3aeJizTR@fat_crate.local/
Fixes: 8bd0488b5ea5 ("HID: bpf: add HID-BPF hooks for hid_hw_raw_requests")
Cc: stable@vger.kernel.org
Signed-off-by: Rong Zhang <i@rong.moe>
Tested-by: Petr Tesarik <petr@tesarici.cz>
Link: https://patch.msgid.link/20250512152420.87441-1-i@rong.moe
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/hid/bpf/hid_bpf_dispatch.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/drivers/hid/bpf/hid_bpf_dispatch.c
+++ b/drivers/hid/bpf/hid_bpf_dispatch.c
@@ -38,6 +38,9 @@ dispatch_hid_bpf_device_event(struct hid
 	struct hid_bpf_ops *e;
 	int ret;
 
+	if (unlikely(hdev->bpf.destroyed))
+		return ERR_PTR(-ENODEV);
+
 	if (type >= HID_REPORT_TYPES)
 		return ERR_PTR(-EINVAL);
 
@@ -93,6 +96,9 @@ int dispatch_hid_bpf_raw_requests(struct
 	struct hid_bpf_ops *e;
 	int ret, idx;
 
+	if (unlikely(hdev->bpf.destroyed))
+		return -ENODEV;
+
 	if (rtype >= HID_REPORT_TYPES)
 		return -EINVAL;
 
@@ -130,6 +136,9 @@ int dispatch_hid_bpf_output_report(struc
 	struct hid_bpf_ops *e;
 	int ret, idx;
 
+	if (unlikely(hdev->bpf.destroyed))
+		return -ENODEV;
+
 	idx = srcu_read_lock(&hdev->bpf.srcu);
 	list_for_each_entry_srcu(e, &hdev->bpf.prog_list, list,
 				 srcu_read_lock_held(&hdev->bpf.srcu)) {



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 068/145] HID: amd_sfh: Fix SRA sensor when its the only sensor
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (66 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 067/145] HID: bpf: abort dispatch if device destroyed Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 069/145] LoongArch: Prevent cond_resched() occurring within kernel-fpu Greg Kroah-Hartman
                   ` (88 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Yijun Shen, Yijun Shen,
	Mario Limonciello, Basavaraj Natikar, Jiri Kosina

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mario Limonciello <mario.limonciello@amd.com>

commit 0cc2effbc8f522af6b9d871cd27678e6aed9d56c upstream.

On systems that only have an SRA sensor connected to SFH the sensor
doesn't get enabled due to a bad optimization condition of breaking
the sensor walk loop.

This optimization is unnecessary in the first place because if there
is only one device then the loop only runs once. Drop the condition
and explicitly mark sensor as enabled.

Reported-by: Yijun Shen <Yijun.Shen@dell.com>
Tested-By: Yijun Shen <Yijun_Shen@Dell.com>
Fixes: d1c444b47100d ("HID: amd_sfh: Add support to export device operating states")
Cc: stable@vger.kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
+++ b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
@@ -134,9 +134,6 @@ static int amd_sfh1_1_hid_client_init(st
 	for (i = 0; i < cl_data->num_hid_devices; i++) {
 		cl_data->sensor_sts[i] = SENSOR_DISABLED;
 
-		if (cl_data->num_hid_devices == 1 && cl_data->sensor_idx[0] == SRA_IDX)
-			break;
-
 		if (cl_data->sensor_idx[i] == SRA_IDX) {
 			info.sensor_idx = cl_data->sensor_idx[i];
 			writel(0, privdata->mmio + amd_get_p2c_val(privdata, 0));
@@ -145,8 +142,10 @@ static int amd_sfh1_1_hid_client_init(st
 				(privdata, cl_data->sensor_idx[i], ENABLE_SENSOR);
 
 			cl_data->sensor_sts[i] = (status == 0) ? SENSOR_ENABLED : SENSOR_DISABLED;
-			if (cl_data->sensor_sts[i] == SENSOR_ENABLED)
+			if (cl_data->sensor_sts[i] == SENSOR_ENABLED) {
+				cl_data->is_any_sensor_enabled = true;
 				privdata->dev_en.is_sra_present = true;
+			}
 			continue;
 		}
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 069/145] LoongArch: Prevent cond_resched() occurring within kernel-fpu
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (67 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 068/145] HID: amd_sfh: Fix SRA sensor when its the only sensor Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 070/145] LoongArch: Move __arch_cpu_idle() to .cpuidle.text section Greg Kroah-Hartman
                   ` (87 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Tianyang Zhang, Huacai Chen

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tianyang Zhang <zhangtianyang@loongson.cn>

commit 2468b0e3d5659dfde77f081f266e1111a981efb8 upstream.

When CONFIG_PREEMPT_COUNT is not configured (i.e. CONFIG_PREEMPT_NONE/
CONFIG_PREEMPT_VOLUNTARY), preempt_disable() / preempt_enable() merely
acts as a barrier(). However, in these cases cond_resched() can still
trigger a context switch and modify the CSR.EUEN, resulting in do_fpu()
exception being activated within the kernel-fpu critical sections, as
demonstrated in the following path:

dcn32_calculate_wm_and_dlg()
    DC_FP_START()
	dcn32_calculate_wm_and_dlg_fpu()
	    dcn32_find_dummy_latency_index_for_fw_based_mclk_switch()
		dcn32_internal_validate_bw()
		    dcn32_enable_phantom_stream()
			dc_create_stream_for_sink()
			   kzalloc(GFP_KERNEL)
				__kmem_cache_alloc_node()
				    __cond_resched()
    DC_FP_END()

This patch is similar to commit d02198550423a0b (x86/fpu: Improve crypto
performance by making kernel-mode FPU reliably usable in softirqs).  It
uses local_bh_disable() instead of preempt_disable() for non-RT kernels
so it can avoid the cond_resched() issue, and also extend the kernel-fpu
application scenarios to the softirq context.

Cc: stable@vger.kernel.org
Signed-off-by: Tianyang Zhang <zhangtianyang@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/loongarch/kernel/kfpu.c |   22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

--- a/arch/loongarch/kernel/kfpu.c
+++ b/arch/loongarch/kernel/kfpu.c
@@ -18,11 +18,28 @@ static unsigned int euen_mask = CSR_EUEN
 static DEFINE_PER_CPU(bool, in_kernel_fpu);
 static DEFINE_PER_CPU(unsigned int, euen_current);
 
+static inline void fpregs_lock(void)
+{
+	if (IS_ENABLED(CONFIG_PREEMPT_RT))
+		preempt_disable();
+	else
+		local_bh_disable();
+}
+
+static inline void fpregs_unlock(void)
+{
+	if (IS_ENABLED(CONFIG_PREEMPT_RT))
+		preempt_enable();
+	else
+		local_bh_enable();
+}
+
 void kernel_fpu_begin(void)
 {
 	unsigned int *euen_curr;
 
-	preempt_disable();
+	if (!irqs_disabled())
+		fpregs_lock();
 
 	WARN_ON(this_cpu_read(in_kernel_fpu));
 
@@ -73,7 +90,8 @@ void kernel_fpu_end(void)
 
 	this_cpu_write(in_kernel_fpu, false);
 
-	preempt_enable();
+	if (!irqs_disabled())
+		fpregs_unlock();
 }
 EXPORT_SYMBOL_GPL(kernel_fpu_end);
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 070/145] LoongArch: Move __arch_cpu_idle() to .cpuidle.text section
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (68 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 069/145] LoongArch: Prevent cond_resched() occurring within kernel-fpu Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 071/145] LoongArch: Save and restore CSR.CNTC for hibernation Greg Kroah-Hartman
                   ` (86 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Huacai Chen

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Huacai Chen <chenhuacai@loongson.cn>

commit 3e245b7b74c3a2ead5fa4bad27cc275284c75189 upstream.

Now arch_cpu_idle() is annotated with __cpuidle which means it is in
the .cpuidle.text section, but __arch_cpu_idle() isn't. Thus, fix the
missing .cpuidle.text section assignment for __arch_cpu_idle() in order
to correct backtracing with nmi_backtrace().

The principle is similar to the commit 97c8580e85cf81c ("MIPS: Annotate
cpu_wait implementations with __cpuidle")

Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/loongarch/kernel/genex.S |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/arch/loongarch/kernel/genex.S
+++ b/arch/loongarch/kernel/genex.S
@@ -16,6 +16,7 @@
 #include <asm/stackframe.h>
 #include <asm/thread_info.h>
 
+	.section .cpuidle.text, "ax"
 	.align	5
 SYM_FUNC_START(__arch_cpu_idle)
 	/* start of idle interrupt region */
@@ -31,14 +32,16 @@ SYM_FUNC_START(__arch_cpu_idle)
 	 */
 	idle	0
 	/* end of idle interrupt region */
-1:	jr	ra
+idle_exit:
+	jr	ra
 SYM_FUNC_END(__arch_cpu_idle)
+	.previous
 
 SYM_CODE_START(handle_vint)
 	UNWIND_HINT_UNDEFINED
 	BACKUP_T0T1
 	SAVE_ALL
-	la_abs	t1, 1b
+	la_abs	t1, idle_exit
 	LONG_L	t0, sp, PT_ERA
 	/* 3 instructions idle interrupt region */
 	ori	t0, t0, 0b1100



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 071/145] LoongArch: Save and restore CSR.CNTC for hibernation
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (69 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 070/145] LoongArch: Move __arch_cpu_idle() to .cpuidle.text section Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 072/145] LoongArch: Fix MAX_REG_OFFSET calculation Greg Kroah-Hartman
                   ` (85 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Xianglai Li, Huacai Chen

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Huacai Chen <chenhuacai@loongson.cn>

commit ceb9155d058a11242aa0572875c44e9713b1a2be upstream.

Save and restore CSR.CNTC for hibernation which is similar to suspend.

For host this is unnecessary because sched clock is ensured continuous,
but for kvm guest sched clock isn't enough because rdtime.d should also
be continuous.

Host::rdtime.d = Host::CSR.CNTC + counter
Guest::rdtime.d = Host::CSR.CNTC + Host::CSR.GCNTC + Guest::CSR.CNTC + counter

so,

Guest::rdtime.d = Host::rdtime.d + Host::CSR.GCNTC + Guest::CSR.CNTC

To ensure Guest::rdtime.d continuous, Host::rdtime.d should be at first
continuous, while Host::CSR.GCNTC / Guest::CSR.CNTC is maintained by KVM.

Cc: stable@vger.kernel.org
Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/loongarch/kernel/time.c     |    2 +-
 arch/loongarch/power/hibernate.c |    3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

--- a/arch/loongarch/kernel/time.c
+++ b/arch/loongarch/kernel/time.c
@@ -111,7 +111,7 @@ static unsigned long __init get_loops_pe
 	return lpj;
 }
 
-static long init_offset __nosavedata;
+static long init_offset;
 
 void save_counter(void)
 {
--- a/arch/loongarch/power/hibernate.c
+++ b/arch/loongarch/power/hibernate.c
@@ -2,6 +2,7 @@
 #include <asm/fpu.h>
 #include <asm/loongson.h>
 #include <asm/sections.h>
+#include <asm/time.h>
 #include <asm/tlbflush.h>
 #include <linux/suspend.h>
 
@@ -14,6 +15,7 @@ struct pt_regs saved_regs;
 
 void save_processor_state(void)
 {
+	save_counter();
 	saved_crmd = csr_read32(LOONGARCH_CSR_CRMD);
 	saved_prmd = csr_read32(LOONGARCH_CSR_PRMD);
 	saved_euen = csr_read32(LOONGARCH_CSR_EUEN);
@@ -26,6 +28,7 @@ void save_processor_state(void)
 
 void restore_processor_state(void)
 {
+	sync_counter();
 	csr_write32(saved_crmd, LOONGARCH_CSR_CRMD);
 	csr_write32(saved_prmd, LOONGARCH_CSR_PRMD);
 	csr_write32(saved_euen, LOONGARCH_CSR_EUEN);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 072/145] LoongArch: Fix MAX_REG_OFFSET calculation
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (70 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 071/145] LoongArch: Save and restore CSR.CNTC for hibernation Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 073/145] LoongArch: uprobes: Remove user_{en,dis}able_single_step() Greg Kroah-Hartman
                   ` (84 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Huacai Chen

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Huacai Chen <chenhuacai@loongson.cn>

commit 90436d234230e9a950ccd87831108b688b27a234 upstream.

Fix MAX_REG_OFFSET calculation, make it point to the last register
in 'struct pt_regs' and not to the marker itself, which could allow
regs_get_register() to return an invalid offset.

Cc: stable@vger.kernel.org
Fixes: 803b0fc5c3f2baa6e5 ("LoongArch: Add process management")
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/loongarch/include/asm/ptrace.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/loongarch/include/asm/ptrace.h
+++ b/arch/loongarch/include/asm/ptrace.h
@@ -55,7 +55,7 @@ static inline void instruction_pointer_s
 
 /* Query offset/name of register from its name/offset */
 extern int regs_query_register_offset(const char *name);
-#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last))
+#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last) - sizeof(unsigned long))
 
 /**
  * regs_get_register() - get register value from its offset



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 073/145] LoongArch: uprobes: Remove user_{en,dis}able_single_step()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (71 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 072/145] LoongArch: Fix MAX_REG_OFFSET calculation Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 074/145] LoongArch: uprobes: Remove redundant code about resume_era Greg Kroah-Hartman
                   ` (83 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Tiezhu Yang, Huacai Chen

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tiezhu Yang <yangtiezhu@loongson.cn>

commit 0b326b2371f94e798137cc1a3c5c2eef2bc69061 upstream.

When executing the "perf probe" and "perf stat" test cases about some
cryptographic algorithm, the output shows that "Trace/breakpoint trap".
This is because it uses the software singlestep breakpoint for uprobes
on LoongArch, and no need to use the hardware singlestep. So just remove
the related function call to user_{en,dis}able_single_step() for uprobes
on LoongArch.

How to reproduce:

Please make sure CONFIG_UPROBE_EVENTS is set and openssl supports sm2
algorithm, then execute the following command.

cd tools/perf && make
./perf probe -x /usr/lib64/libcrypto.so BN_mod_mul_montgomery
./perf stat -e probe_libcrypto:BN_mod_mul_montgomery openssl speed sm2

Cc: stable@vger.kernel.org
Fixes: 19bc6cb64092 ("LoongArch: Add uprobes support")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/loongarch/kernel/uprobes.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/arch/loongarch/kernel/uprobes.c
+++ b/arch/loongarch/kernel/uprobes.c
@@ -42,7 +42,6 @@ int arch_uprobe_pre_xol(struct arch_upro
 	utask->autask.saved_trap_nr = current->thread.trap_nr;
 	current->thread.trap_nr = UPROBE_TRAP_NR;
 	instruction_pointer_set(regs, utask->xol_vaddr);
-	user_enable_single_step(current);
 
 	return 0;
 }
@@ -59,8 +58,6 @@ int arch_uprobe_post_xol(struct arch_upr
 	else
 		instruction_pointer_set(regs, utask->vaddr + LOONGARCH_INSN_SIZE);
 
-	user_disable_single_step(current);
-
 	return 0;
 }
 
@@ -70,7 +67,6 @@ void arch_uprobe_abort_xol(struct arch_u
 
 	current->thread.trap_nr = utask->autask.saved_trap_nr;
 	instruction_pointer_set(regs, utask->vaddr);
-	user_disable_single_step(current);
 }
 
 bool arch_uprobe_xol_was_trapped(struct task_struct *t)



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 074/145] LoongArch: uprobes: Remove redundant code about resume_era
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (72 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 073/145] LoongArch: uprobes: Remove user_{en,dis}able_single_step() Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 075/145] btrfs: fix discard worker infinite loop after disabling discard Greg Kroah-Hartman
                   ` (82 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Tiezhu Yang, Huacai Chen

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tiezhu Yang <yangtiezhu@loongson.cn>

commit 12614f794274f63fbdfe76771b2b332077d63848 upstream.

arch_uprobe_skip_sstep() returns true if instruction was emulated, that
is to say, there is no need to single step for the emulated instructions.
regs->csr_era will point to the destination address directly after the
exception, so the resume_era related code is redundant, just remove them.

Cc: stable@vger.kernel.org
Fixes: 19bc6cb64092 ("LoongArch: Add uprobes support")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/loongarch/include/asm/uprobes.h |    1 -
 arch/loongarch/kernel/uprobes.c      |    7 +------
 2 files changed, 1 insertion(+), 7 deletions(-)

--- a/arch/loongarch/include/asm/uprobes.h
+++ b/arch/loongarch/include/asm/uprobes.h
@@ -15,7 +15,6 @@ typedef u32 uprobe_opcode_t;
 #define UPROBE_XOLBP_INSN	__emit_break(BRK_UPROBE_XOLBP)
 
 struct arch_uprobe {
-	unsigned long	resume_era;
 	u32	insn[2];
 	u32	ixol[2];
 	bool	simulate;
--- a/arch/loongarch/kernel/uprobes.c
+++ b/arch/loongarch/kernel/uprobes.c
@@ -52,11 +52,7 @@ int arch_uprobe_post_xol(struct arch_upr
 
 	WARN_ON_ONCE(current->thread.trap_nr != UPROBE_TRAP_NR);
 	current->thread.trap_nr = utask->autask.saved_trap_nr;
-
-	if (auprobe->simulate)
-		instruction_pointer_set(regs, auprobe->resume_era);
-	else
-		instruction_pointer_set(regs, utask->vaddr + LOONGARCH_INSN_SIZE);
+	instruction_pointer_set(regs, utask->vaddr + LOONGARCH_INSN_SIZE);
 
 	return 0;
 }
@@ -86,7 +82,6 @@ bool arch_uprobe_skip_sstep(struct arch_
 
 	insn.word = auprobe->insn[0];
 	arch_simulate_insn(insn, regs);
-	auprobe->resume_era = regs->csr_era;
 
 	return true;
 }



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 075/145] btrfs: fix discard worker infinite loop after disabling discard
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (73 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 074/145] LoongArch: uprobes: Remove redundant code about resume_era Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 076/145] btrfs: fix folio leak in submit_one_async_extent() Greg Kroah-Hartman
                   ` (81 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Boris Burkov, Daniel Vacek,
	Filipe Manana, David Sterba

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Filipe Manana <fdmanana@suse.com>

commit 54db6d1bdd71fa90172a2a6aca3308bbf7fa7eb5 upstream.

If the discard worker is running and there's currently only one block
group, that block group is a data block group, it's in the unused block
groups discard list and is being used (it got an extent allocated from it
after becoming unused), the worker can end up in an infinite loop if a
transaction abort happens or the async discard is disabled (during remount
or unmount for example).

This happens like this:

1) Task A, the discard worker, is at peek_discard_list() and
   find_next_block_group() returns block group X;

2) Block group X is in the unused block groups discard list (its discard
   index is BTRFS_DISCARD_INDEX_UNUSED) since at some point in the past
   it become an unused block group and was added to that list, but then
   later it got an extent allocated from it, so its ->used counter is not
   zero anymore;

3) The current transaction is aborted by task B and we end up at
   __btrfs_handle_fs_error() in the transaction abort path, where we call
   btrfs_discard_stop(), which clears BTRFS_FS_DISCARD_RUNNING from
   fs_info, and then at __btrfs_handle_fs_error() we set the fs to RO mode
   (setting SB_RDONLY in the super block's s_flags field);

4) Task A calls __add_to_discard_list() with the goal of moving the block
   group from the unused block groups discard list into another discard
   list, but at __add_to_discard_list() we end up doing nothing because
   btrfs_run_discard_work() returns false, since the super block has
   SB_RDONLY set in its flags and BTRFS_FS_DISCARD_RUNNING is not set
   anymore in fs_info->flags. So block group X remains in the unused block
   groups discard list;

5) Task A then does a goto into the 'again' label, calls
   find_next_block_group() again we gets block group X again. Then it
   repeats the previous steps over and over since there are not other
   block groups in the discard lists and block group X is never moved
   out of the unused block groups discard list since
   btrfs_run_discard_work() keeps returning false and therefore
   __add_to_discard_list() doesn't move block group X out of that discard
   list.

When this happens we can get a soft lockup report like this:

  [71.957] watchdog: BUG: soft lockup - CPU#0 stuck for 27s! [kworker/u4:3:97]
  [71.957] Modules linked in: xfs af_packet rfkill (...)
  [71.957] CPU: 0 UID: 0 PID: 97 Comm: kworker/u4:3 Tainted: G        W          6.14.2-1-default #1 openSUSE Tumbleweed 968795ef2b1407352128b466fe887416c33af6fa
  [71.957] Tainted: [W]=WARN
  [71.957] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014
  [71.957] Workqueue: btrfs_discard btrfs_discard_workfn [btrfs]
  [71.957] RIP: 0010:btrfs_discard_workfn+0xc4/0x400 [btrfs]
  [71.957] Code: c1 01 48 83 (...)
  [71.957] RSP: 0018:ffffafaec03efe08 EFLAGS: 00000246
  [71.957] RAX: ffff897045500000 RBX: ffff8970413ed8d0 RCX: 0000000000000000
  [71.957] RDX: 0000000000000001 RSI: ffff8970413ed8d0 RDI: 0000000a8f1272ad
  [71.957] RBP: 0000000a9d61c60e R08: ffff897045500140 R09: 8080808080808080
  [71.957] R10: ffff897040276800 R11: fefefefefefefeff R12: ffff8970413ed860
  [71.957] R13: ffff897045500000 R14: ffff8970413ed868 R15: 0000000000000000
  [71.957] FS:  0000000000000000(0000) GS:ffff89707bc00000(0000) knlGS:0000000000000000
  [71.957] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  [71.957] CR2: 00005605bcc8d2f0 CR3: 000000010376a001 CR4: 0000000000770ef0
  [71.957] PKRU: 55555554
  [71.957] Call Trace:
  [71.957]  <TASK>
  [71.957]  process_one_work+0x17e/0x330
  [71.957]  worker_thread+0x2ce/0x3f0
  [71.957]  ? __pfx_worker_thread+0x10/0x10
  [71.957]  kthread+0xef/0x220
  [71.957]  ? __pfx_kthread+0x10/0x10
  [71.957]  ret_from_fork+0x34/0x50
  [71.957]  ? __pfx_kthread+0x10/0x10
  [71.957]  ret_from_fork_asm+0x1a/0x30
  [71.957]  </TASK>
  [71.957] Kernel panic - not syncing: softlockup: hung tasks
  [71.987] CPU: 0 UID: 0 PID: 97 Comm: kworker/u4:3 Tainted: G        W    L     6.14.2-1-default #1 openSUSE Tumbleweed 968795ef2b1407352128b466fe887416c33af6fa
  [71.989] Tainted: [W]=WARN, [L]=SOFTLOCKUP
  [71.989] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014
  [71.991] Workqueue: btrfs_discard btrfs_discard_workfn [btrfs]
  [71.992] Call Trace:
  [71.993]  <IRQ>
  [71.994]  dump_stack_lvl+0x5a/0x80
  [71.994]  panic+0x10b/0x2da
  [71.995]  watchdog_timer_fn.cold+0x9a/0xa1
  [71.996]  ? __pfx_watchdog_timer_fn+0x10/0x10
  [71.997]  __hrtimer_run_queues+0x132/0x2a0
  [71.997]  hrtimer_interrupt+0xff/0x230
  [71.998]  __sysvec_apic_timer_interrupt+0x55/0x100
  [71.999]  sysvec_apic_timer_interrupt+0x6c/0x90
  [72.000]  </IRQ>
  [72.000]  <TASK>
  [72.001]  asm_sysvec_apic_timer_interrupt+0x1a/0x20
  [72.002] RIP: 0010:btrfs_discard_workfn+0xc4/0x400 [btrfs]
  [72.002] Code: c1 01 48 83 (...)
  [72.005] RSP: 0018:ffffafaec03efe08 EFLAGS: 00000246
  [72.006] RAX: ffff897045500000 RBX: ffff8970413ed8d0 RCX: 0000000000000000
  [72.006] RDX: 0000000000000001 RSI: ffff8970413ed8d0 RDI: 0000000a8f1272ad
  [72.007] RBP: 0000000a9d61c60e R08: ffff897045500140 R09: 8080808080808080
  [72.008] R10: ffff897040276800 R11: fefefefefefefeff R12: ffff8970413ed860
  [72.009] R13: ffff897045500000 R14: ffff8970413ed868 R15: 0000000000000000
  [72.010]  ? btrfs_discard_workfn+0x51/0x400 [btrfs 23b01089228eb964071fb7ca156eee8cd3bf996f]
  [72.011]  process_one_work+0x17e/0x330
  [72.012]  worker_thread+0x2ce/0x3f0
  [72.013]  ? __pfx_worker_thread+0x10/0x10
  [72.014]  kthread+0xef/0x220
  [72.014]  ? __pfx_kthread+0x10/0x10
  [72.015]  ret_from_fork+0x34/0x50
  [72.015]  ? __pfx_kthread+0x10/0x10
  [72.016]  ret_from_fork_asm+0x1a/0x30
  [72.017]  </TASK>
  [72.017] Kernel Offset: 0x15000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
  [72.019] Rebooting in 90 seconds..

So fix this by making sure we move a block group out of the unused block
groups discard list when calling __add_to_discard_list().

Fixes: 2bee7eb8bb81 ("btrfs: discard one region at a time in async discard")
Link: https://bugzilla.suse.com/show_bug.cgi?id=1242012
CC: stable@vger.kernel.org # 5.10+
Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Daniel Vacek <neelx@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/btrfs/discard.c |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

--- a/fs/btrfs/discard.c
+++ b/fs/btrfs/discard.c
@@ -94,8 +94,6 @@ static void __add_to_discard_list(struct
 				  struct btrfs_block_group *block_group)
 {
 	lockdep_assert_held(&discard_ctl->lock);
-	if (!btrfs_run_discard_work(discard_ctl))
-		return;
 
 	if (list_empty(&block_group->discard_list) ||
 	    block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED) {
@@ -118,6 +116,9 @@ static void add_to_discard_list(struct b
 	if (!btrfs_is_block_group_data_only(block_group))
 		return;
 
+	if (!btrfs_run_discard_work(discard_ctl))
+		return;
+
 	spin_lock(&discard_ctl->lock);
 	__add_to_discard_list(discard_ctl, block_group);
 	spin_unlock(&discard_ctl->lock);
@@ -250,6 +251,18 @@ again:
 		    block_group->used != 0) {
 			if (btrfs_is_block_group_data_only(block_group)) {
 				__add_to_discard_list(discard_ctl, block_group);
+				/*
+				 * The block group must have been moved to other
+				 * discard list even if discard was disabled in
+				 * the meantime or a transaction abort happened,
+				 * otherwise we can end up in an infinite loop,
+				 * always jumping into the 'again' label and
+				 * keep getting this block group over and over
+				 * in case there are no other block groups in
+				 * the discard lists.
+				 */
+				ASSERT(block_group->discard_index !=
+				       BTRFS_DISCARD_INDEX_UNUSED);
 			} else {
 				list_del_init(&block_group->discard_list);
 				btrfs_put_block_group(block_group);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 076/145] btrfs: fix folio leak in submit_one_async_extent()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (74 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 075/145] btrfs: fix discard worker infinite loop after disabling discard Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 077/145] btrfs: add back warning for mount option commit values exceeding 300 Greg Kroah-Hartman
                   ` (80 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Filipe Manana, Boris Burkov,
	David Sterba, Josef Bacik

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Boris Burkov <boris@bur.io>

commit a0fd1c6098633f9a95fc2f636383546c82b704c3 upstream.

If btrfs_reserve_extent() fails while submitting an async_extent for a
compressed write, then we fail to call free_async_extent_pages() on the
async_extent and leak its folios. A likely cause for such a failure
would be btrfs_reserve_extent() failing to find a large enough
contiguous free extent for the compressed extent.

I was able to reproduce this by:

1. mount with compress-force=zstd:3
2. fallocating most of a filesystem to a big file
3. fragmenting the remaining free space
4. trying to copy in a file which zstd would generate large compressed
   extents for (vmlinux worked well for this)

Step 4. hits the memory leak and can be repeated ad nauseam to
eventually exhaust the system memory.

Fix this by detecting the case where we fallback to uncompressed
submission for a compressed async_extent and ensuring that we call
free_async_extent_pages().

Fixes: 131a821a243f ("btrfs: fallback if compressed IO fails for ENOSPC")
CC: stable@vger.kernel.org # 6.1+
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Co-developed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/btrfs/inode.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1116,6 +1116,7 @@ static void submit_one_async_extent(stru
 	struct extent_state *cached = NULL;
 	struct extent_map *em;
 	int ret = 0;
+	bool free_pages = false;
 	u64 start = async_extent->start;
 	u64 end = async_extent->start + async_extent->ram_size - 1;
 
@@ -1136,7 +1137,10 @@ static void submit_one_async_extent(stru
 	}
 
 	if (async_extent->compress_type == BTRFS_COMPRESS_NONE) {
+		ASSERT(!async_extent->folios);
+		ASSERT(async_extent->nr_folios == 0);
 		submit_uncompressed_range(inode, async_extent, locked_folio);
+		free_pages = true;
 		goto done;
 	}
 
@@ -1152,6 +1156,7 @@ static void submit_one_async_extent(stru
 		 * fall back to uncompressed.
 		 */
 		submit_uncompressed_range(inode, async_extent, locked_folio);
+		free_pages = true;
 		goto done;
 	}
 
@@ -1193,6 +1198,8 @@ static void submit_one_async_extent(stru
 done:
 	if (async_chunk->blkcg_css)
 		kthread_associate_blkcg(NULL);
+	if (free_pages)
+		free_async_extent_pages(async_extent);
 	kfree(async_extent);
 	return;
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 077/145] btrfs: add back warning for mount option commit values exceeding 300
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (75 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 076/145] btrfs: fix folio leak in submit_one_async_extent() Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 078/145] Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor" Greg Kroah-Hartman
                   ` (79 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Qu Wenruo, Anand Jain,
	Kyoji Ogasawara, David Sterba

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kyoji Ogasawara <sawara04.o@gmail.com>

commit 4ce2affc6ef9f84b4aebbf18bd5c57397b6024eb upstream.

The Btrfs documentation states that if the commit value is greater than
300 a warning should be issued. The warning was accidentally lost in the
new mount API update.

Fixes: 6941823cc878 ("btrfs: remove old mount API code")
CC: stable@vger.kernel.org # 6.12+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Kyoji Ogasawara <sawara04.o@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/btrfs/fs.h    |    1 +
 fs/btrfs/super.c |    4 ++++
 2 files changed, 5 insertions(+)

--- a/fs/btrfs/fs.h
+++ b/fs/btrfs/fs.h
@@ -285,6 +285,7 @@ enum {
 #define BTRFS_FEATURE_INCOMPAT_SAFE_CLEAR		0ULL
 
 #define BTRFS_DEFAULT_COMMIT_INTERVAL	(30)
+#define BTRFS_WARNING_COMMIT_INTERVAL	(300)
 #define BTRFS_DEFAULT_MAX_INLINE	(2048)
 
 struct btrfs_dev_replace {
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -569,6 +569,10 @@ static int btrfs_parse_param(struct fs_c
 		break;
 	case Opt_commit_interval:
 		ctx->commit_interval = result.uint_32;
+		if (ctx->commit_interval > BTRFS_WARNING_COMMIT_INTERVAL) {
+			btrfs_warn(NULL, "excessive commit interval %u, use with care",
+				   ctx->commit_interval);
+		}
 		if (ctx->commit_interval == 0)
 			ctx->commit_interval = BTRFS_DEFAULT_COMMIT_INTERVAL;
 		break;



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 078/145] Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor"
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (76 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 077/145] btrfs: add back warning for mount option commit values exceeding 300 Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 079/145] drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc() Greg Kroah-Hartman
                   ` (78 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Michel Dänzer, Melissa Wen,
	Alex Hung, Alex Deucher

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Melissa Wen <mwen@igalia.com>

commit fe14c0f096f58d2569e587e9f4b05d772272bbb4 upstream.

This reverts commit 272e6aab14bbf98d7a06b2b1cd6308a02d4a10a1.

Applying degamma curve to the cursor by default breaks Linux userspace
expectation.

On Linux, AMD display manager enables cursor degamma ROM just for
implict sRGB on HW versions where degamma is split into two blocks:
degamma ROM for pre-defined TFs and `gamma correction` for user/custom
curves, and degamma ROM settings doesn't apply to cursor plane.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1513
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2803
Reported-by: Michel Dänzer <michel.daenzer@mailbox.org>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4144
Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit f6a305d4748801a6c799ae9375b2ecff3aed094b)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c
+++ b/drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c
@@ -120,10 +120,11 @@ void dpp401_set_cursor_attributes(
 	enum dc_cursor_color_format color_format = cursor_attributes->color_format;
 	int cur_rom_en = 0;
 
-	// DCN4 should always do Cursor degamma for Cursor Color modes
 	if (color_format == CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA ||
 		color_format == CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA) {
-		cur_rom_en = 1;
+		if (cursor_attributes->attribute_flags.bits.ENABLE_CURSOR_DEGAMMA) {
+			cur_rom_en = 1;
+		}
 	}
 
 	REG_UPDATE_3(CURSOR0_CONTROL,



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 079/145] drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (77 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 078/145] Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor" Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 080/145] drm/amdgpu: read back register after written for VCN v4.0.5 Greg Kroah-Hartman
                   ` (77 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Fabio Estevam, Thomas Zimmermann,
	Javier Martinez Canillas

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Fabio Estevam <festevam@denx.de>

commit 9c1798259b9420f38f1fa1b83e3d864c3eb1a83e upstream.

Since commit 559358282e5b ("drm/fb-helper: Don't use the preferred depth
for the BPP default"), RGB565 displays such as the CFAF240320X no longer
render correctly: colors are distorted and the content is shown twice
horizontally.

This regression is due to the fbdev emulation layer defaulting to 32 bits
per pixel, whereas the display expects 16 bpp (RGB565). As a result, the
framebuffer data is incorrectly interpreted by the panel.

Fix the issue by calling drm_client_setup_with_fourcc() with a format
explicitly selected based on the display's bits-per-pixel value. For 16
bpp, use DRM_FORMAT_RGB565; for other values, fall back to the previous
behavior. This ensures that the allocated framebuffer format matches the
hardware expectations, avoiding color and layout corruption.

Tested on a CFAF240320X display with an RGB565 configuration, confirming
correct colors and layout after applying this patch.

Cc: stable@vger.kernel.org
Fixes: 559358282e5b ("drm/fb-helper: Don't use the preferred depth for the BPP default")
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250417103458.2496790-1-festevam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/tiny/panel-mipi-dbi.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/tiny/panel-mipi-dbi.c
+++ b/drivers/gpu/drm/tiny/panel-mipi-dbi.c
@@ -390,7 +390,10 @@ static int panel_mipi_dbi_spi_probe(stru
 
 	spi_set_drvdata(spi, drm);
 
-	drm_client_setup(drm, NULL);
+	if (bpp == 16)
+		drm_client_setup_with_fourcc(drm, DRM_FORMAT_RGB565);
+	else
+		drm_client_setup_with_fourcc(drm, DRM_FORMAT_RGB888);
 
 	return 0;
 }



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 080/145] drm/amdgpu: read back register after written for VCN v4.0.5
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (78 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 079/145] drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc() Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 081/145] drm/amdgpu: fix incorrect MALL size for GFX1151 Greg Kroah-Hartman
                   ` (76 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, David (Ming Qiang) Wu,
	Mario Limonciello, Alex Deucher, Ruijing Dong

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: David (Ming Qiang) Wu <David.Wu3@amd.com>

commit ee7360fc27d6045510f8fe459b5649b2af27811a upstream.

On VCN v4.0.5 there is a race condition where the WPTR is not
updated after starting from idle when doorbell is used. Adding
register read-back after written at function end is to ensure
all register writes are done before they can be used.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12528
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 07c9db090b86e5211188e1b351303fbc673378cf)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
@@ -983,6 +983,10 @@ static int vcn_v4_0_5_start_dpg_mode(str
 			ring->doorbell_index << VCN_RB1_DB_CTRL__OFFSET__SHIFT |
 			VCN_RB1_DB_CTRL__EN_MASK);
 
+	/* Keeping one read-back to ensure all register writes are done, otherwise
+	 * it may introduce race conditions */
+	RREG32_SOC15(VCN, inst_idx, regVCN_RB1_DB_CTRL);
+
 	return 0;
 }
 
@@ -1169,6 +1173,10 @@ static int vcn_v4_0_5_start(struct amdgp
 		fw_shared->sq.queue_mode &= ~(FW_QUEUE_RING_RESET | FW_QUEUE_DPG_HOLD_OFF);
 	}
 
+	/* Keeping one read-back to ensure all register writes are done, otherwise
+	 * it may introduce race conditions */
+	RREG32_SOC15(VCN, i, regVCN_RB_ENABLE);
+
 	return 0;
 }
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 081/145] drm/amdgpu: fix incorrect MALL size for GFX1151
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (79 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 080/145] drm/amdgpu: read back register after written for VCN v4.0.5 Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 082/145] drm/amdgpu: csa unmap use uninterruptible lock Greg Kroah-Hartman
                   ` (75 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Tim Huang, Alex Deucher, Yifan Zhang

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tim Huang <tim.huang@amd.com>

commit 2d73b0845ab3963856e857b810600e5594bc29f4 upstream.

On GFX1151, the reported MALL cache size reflects only
half of its actual size; this adjustment corrects the discrepancy.

Signed-off-by: Tim Huang <tim.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 0a5c060b593ad152318f89e5564bfdfcff8a6ac0)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -750,6 +750,18 @@ static int gmc_v11_0_sw_init(struct amdg
 	adev->gmc.vram_type = vram_type;
 	adev->gmc.vram_vendor = vram_vendor;
 
+	/* The mall_size is already calculated as mall_size_per_umc * num_umc.
+	 * However, for gfx1151, which features a 2-to-1 UMC mapping,
+	 * the result must be multiplied by 2 to determine the actual mall size.
+	 */
+	switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
+	case IP_VERSION(11, 5, 1):
+		adev->gmc.mall_size *= 2;
+		break;
+	default:
+		break;
+	}
+
 	switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
 	case IP_VERSION(11, 0, 0):
 	case IP_VERSION(11, 0, 1):



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 082/145] drm/amdgpu: csa unmap use uninterruptible lock
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (80 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 081/145] drm/amdgpu: fix incorrect MALL size for GFX1151 Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 083/145] drm/amd/display: Correct the reply value when AUX write incomplete Greg Kroah-Hartman
                   ` (74 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Philip Yang, Christian König,
	Alex Deucher

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Philip Yang <Philip.Yang@amd.com>

commit a0fa7873f2f869087b1e7793f7fac3713a1e3afe upstream.

After process exit to unmap csa and free GPU vm, if signal is accepted
and then waiting to take vm lock is interrupted and return, it causes
memory leaking and below warning backtrace.

Change to use uninterruptible wait lock fix the issue.

WARNING: CPU: 69 PID: 167800 at amd/amdgpu/amdgpu_kms.c:1525
 amdgpu_driver_postclose_kms+0x294/0x2a0 [amdgpu]
 Call Trace:
  <TASK>
  drm_file_free.part.0+0x1da/0x230 [drm]
  drm_close_helper.isra.0+0x65/0x70 [drm]
  drm_release+0x6a/0x120 [drm]
  amdgpu_drm_release+0x51/0x60 [amdgpu]
  __fput+0x9f/0x280
  ____fput+0xe/0x20
  task_work_run+0x67/0xa0
  do_exit+0x217/0x3c0
  do_group_exit+0x3b/0xb0
  get_signal+0x14a/0x8d0
  arch_do_signal_or_restart+0xde/0x100
  exit_to_user_mode_loop+0xc1/0x1a0
  exit_to_user_mode_prepare+0xf4/0x100
  syscall_exit_to_user_mode+0x17/0x40
  do_syscall_64+0x69/0xc0

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7dbbfb3c171a6f63b01165958629c9c26abf38ab)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
@@ -109,7 +109,7 @@ int amdgpu_unmap_static_csa(struct amdgp
 	struct drm_exec exec;
 	int r;
 
-	drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT, 0);
+	drm_exec_init(&exec, 0, 0);
 	drm_exec_until_all_locked(&exec) {
 		r = amdgpu_vm_lock_pd(vm, &exec, 0);
 		if (likely(!r))



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 083/145] drm/amd/display: Correct the reply value when AUX write incomplete
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (81 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 082/145] drm/amdgpu: csa unmap use uninterruptible lock Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 084/145] drm/amd/display: Avoid flooding unnecessary info messages Greg Kroah-Hartman
                   ` (73 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Mario Limonciello, Alex Deucher,
	Ray Wu, Wayne Lin, Daniel Wheeler

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wayne Lin <Wayne.Lin@amd.com>

commit d433981385c62c72080e26f1c00a961d18b233be upstream.

[Why]
Now forcing aux->transfer to return 0 when incomplete AUX write is
inappropriate. It should return bytes have been transferred.

[How]
aux->transfer is asked not to change original msg except reply field of
drm_dp_aux_msg structure. Copy the msg->buffer when it's write request,
and overwrite the first byte when sink reply 1 byte indicating partially
written byte number. Then we can return the correct value without
changing the original msg.

Fixes: 3637e457eb00 ("drm/amd/display: Fix wrong handling for AUX_DEFER case")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7ac37f0dcd2e0b729fa7b5513908dc8ab802b540)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c           |    3 ++-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c |   10 ++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -12621,7 +12621,8 @@ int amdgpu_dm_process_dmub_aux_transfer_
 		/* The reply is stored in the top nibble of the command. */
 		payload->reply[0] = (adev->dm.dmub_notify->aux_reply.command >> 4) & 0xF;
 
-	if (!payload->write && p_notify->aux_reply.length)
+	/*write req may receive a byte indicating partially written number as well*/
+	if (p_notify->aux_reply.length)
 		memcpy(payload->data, p_notify->aux_reply.data,
 				p_notify->aux_reply.length);
 
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -62,6 +62,7 @@ static ssize_t dm_dp_aux_transfer(struct
 	enum aux_return_code_type operation_result;
 	struct amdgpu_device *adev;
 	struct ddc_service *ddc;
+	uint8_t copy[16];
 
 	if (WARN_ON(msg->size > 16))
 		return -E2BIG;
@@ -77,6 +78,11 @@ static ssize_t dm_dp_aux_transfer(struct
 			(msg->request & DP_AUX_I2C_WRITE_STATUS_UPDATE) != 0;
 	payload.defer_delay = 0;
 
+	if (payload.write) {
+		memcpy(copy, msg->buffer, msg->size);
+		payload.data = copy;
+	}
+
 	result = dc_link_aux_transfer_raw(TO_DM_AUX(aux)->ddc_service, &payload,
 				      &operation_result);
 
@@ -100,9 +106,9 @@ static ssize_t dm_dp_aux_transfer(struct
 	 */
 	if (payload.write && result >= 0) {
 		if (result) {
-			/*one byte indicating partially written bytes. Force 0 to retry*/
+			/*one byte indicating partially written bytes*/
 			drm_info(adev_to_drm(adev), "amdgpu: AUX partially written\n");
-			result = 0;
+			result = payload.data[0];
 		} else if (!payload.reply[0])
 			/*I2C_ACK|AUX_ACK*/
 			result = msg->size;



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 084/145] drm/amd/display: Avoid flooding unnecessary info messages
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (82 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 083/145] drm/amd/display: Correct the reply value when AUX write incomplete Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 085/145] MAINTAINERS: Update Alexey Makhalovs email address Greg Kroah-Hartman
                   ` (72 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Mario Limonciello, Alex Deucher,
	Wayne Lin

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wayne Lin <Wayne.Lin@amd.com>

commit d33724ffb743d3d2698bd969e29253ae0cff9739 upstream.

It's expected that we'll encounter temporary exceptions
during aux transactions. Adjust logging from drm_info to
drm_dbg_dp to prevent flooding with unnecessary log messages.

Fixes: 3637e457eb00 ("drm/amd/display: Fix wrong handling for AUX_DEFER case")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20250513032026.838036-1-Wayne.Lin@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 9a9c3e1fe5256da14a0a307dff0478f90c55fc8c)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -107,7 +107,7 @@ static ssize_t dm_dp_aux_transfer(struct
 	if (payload.write && result >= 0) {
 		if (result) {
 			/*one byte indicating partially written bytes*/
-			drm_info(adev_to_drm(adev), "amdgpu: AUX partially written\n");
+			drm_dbg_dp(adev_to_drm(adev), "amdgpu: AUX partially written\n");
 			result = payload.data[0];
 		} else if (!payload.reply[0])
 			/*I2C_ACK|AUX_ACK*/
@@ -133,11 +133,11 @@ static ssize_t dm_dp_aux_transfer(struct
 			break;
 		}
 
-		drm_info(adev_to_drm(adev), "amdgpu: DP AUX transfer fail:%d\n", operation_result);
+		drm_dbg_dp(adev_to_drm(adev), "amdgpu: DP AUX transfer fail:%d\n", operation_result);
 	}
 
 	if (payload.reply[0])
-		drm_info(adev_to_drm(adev), "amdgpu: AUX reply command not ACK: 0x%02x.",
+		drm_dbg_dp(adev_to_drm(adev), "amdgpu: AUX reply command not ACK: 0x%02x.",
 			payload.reply[0]);
 
 	return result;



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 085/145] MAINTAINERS: Update Alexey Makhalovs email address
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (83 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 084/145] drm/amd/display: Avoid flooding unnecessary info messages Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 086/145] gpio: pca953x: fix IRQ storm on system wake up Greg Kroah-Hartman
                   ` (71 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Konstantin Ryabitsev, Juergen Gross,
	Alexey Makhalov, Borislav Petkov (AMD)

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alexey Makhalov <alexey.makhalov@broadcom.com>

commit 386cd3dcfd63491619b4034b818737fc0219e128 upstream.

Fix a typo in an email address.

Closes: https://lore.kernel.org/all/20240925-rational-succinct-vulture-cca9fb@lemur/T/
Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Reported-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Alexey Makhalov <alexey.makhalov@broadcom.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/20250318004031.2703923-1-alexey.makhalov@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 MAINTAINERS |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17954,7 +17954,7 @@ F:	include/uapi/linux/ppdev.h
 PARAVIRT_OPS INTERFACE
 M:	Juergen Gross <jgross@suse.com>
 R:	Ajay Kaher <ajay.kaher@broadcom.com>
-R:	Alexey Makhalov <alexey.amakhalov@broadcom.com>
+R:	Alexey Makhalov <alexey.makhalov@broadcom.com>
 R:	Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
 L:	virtualization@lists.linux.dev
 L:	x86@kernel.org
@@ -25350,7 +25350,7 @@ F:	drivers/misc/vmw_balloon.c
 
 VMWARE HYPERVISOR INTERFACE
 M:	Ajay Kaher <ajay.kaher@broadcom.com>
-M:	Alexey Makhalov <alexey.amakhalov@broadcom.com>
+M:	Alexey Makhalov <alexey.makhalov@broadcom.com>
 R:	Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
 L:	virtualization@lists.linux.dev
 L:	x86@kernel.org
@@ -25378,7 +25378,7 @@ F:	drivers/scsi/vmw_pvscsi.h
 VMWARE VIRTUAL PTP CLOCK DRIVER
 M:	Nick Shi <nick.shi@broadcom.com>
 R:	Ajay Kaher <ajay.kaher@broadcom.com>
-R:	Alexey Makhalov <alexey.amakhalov@broadcom.com>
+R:	Alexey Makhalov <alexey.makhalov@broadcom.com>
 R:	Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
 L:	netdev@vger.kernel.org
 S:	Supported



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 086/145] gpio: pca953x: fix IRQ storm on system wake up
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (84 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 085/145] MAINTAINERS: Update Alexey Makhalovs email address Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 087/145] ACPI: PPTT: Fix processor subtable walk Greg Kroah-Hartman
                   ` (70 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Emanuele Ghidoli, Francesco Dolcini,
	Andy Shevchenko, Geert Uytterhoeven, Bartosz Golaszewski

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>

commit 3e38f946062b4845961ab86b726651b4457b2af8 upstream.

If an input changes state during wake-up and is used as an interrupt
source, the IRQ handler reads the volatile input register to clear the
interrupt mask and deassert the IRQ line. However, the IRQ handler is
triggered before access to the register is granted, causing the read
operation to fail.

As a result, the IRQ handler enters a loop, repeatedly printing the
"failed reading register" message, until `pca953x_resume()` is eventually
called, which restores the driver context and enables access to
registers.

Fix by disabling the IRQ line before entering suspend mode, and
re-enabling it after the driver context is restored in `pca953x_resume()`.

An IRQ can be disabled with disable_irq() and still wake the system as
long as the IRQ has wake enabled, so the wake-up functionality is
preserved.

Fixes: b76574300504 ("gpio: pca953x: Restore registers after suspend/resume cycle")
Cc: stable@vger.kernel.org
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20250512095441.31645-1-francesco@dolcini.it
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpio/gpio-pca953x.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -1203,6 +1203,8 @@ static int pca953x_restore_context(struc
 
 	guard(mutex)(&chip->i2c_lock);
 
+	if (chip->client->irq > 0)
+		enable_irq(chip->client->irq);
 	regcache_cache_only(chip->regmap, false);
 	regcache_mark_dirty(chip->regmap);
 	ret = pca953x_regcache_sync(chip);
@@ -1215,6 +1217,10 @@ static int pca953x_restore_context(struc
 static void pca953x_save_context(struct pca953x_chip *chip)
 {
 	guard(mutex)(&chip->i2c_lock);
+
+	/* Disable IRQ to prevent early triggering while regmap "cache only" is on */
+	if (chip->client->irq > 0)
+		disable_irq(chip->client->irq);
 	regcache_cache_only(chip->regmap, true);
 }
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 087/145] ACPI: PPTT: Fix processor subtable walk
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (85 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 086/145] gpio: pca953x: fix IRQ storm on system wake up Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 088/145] ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2() Greg Kroah-Hartman
                   ` (69 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Maximilian Heyne, Yicong Yang,
	Jeremy Linton, Sudeep Holla, Rafael J. Wysocki

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jeremy Linton <jeremy.linton@arm.com>

commit adfab6b39202481bb43286fff94def4953793fdb upstream.

The original PPTT code had a bug where the processor subtable length
was not correctly validated when encountering a truncated
acpi_pptt_processor node.

Commit 7ab4f0e37a0f4 ("ACPI PPTT: Fix coding mistakes in a couple of
sizeof() calls") attempted to fix this by validating the size is as
large as the acpi_pptt_processor node structure. This introduced a
regression where the last processor node in the PPTT table is ignored
if it doesn't contain any private resources. That results errors like:

  ACPI PPTT: PPTT table found, but unable to locate core XX (XX)
  ACPI: SPE must be homogeneous

Furthermore, it fails in a common case where the node length isn't
equal to the acpi_pptt_processor structure size, leaving the original
bug in a modified form.

Correct the regression by adjusting the loop termination conditions as
suggested by the bug reporters. An additional check performed after
the subtable node type is detected, validates the acpi_pptt_processor
node is fully contained in the PPTT table. Repeating the check in
acpi_pptt_leaf_node() is largely redundant as the node is already
known to be fully contained in the table.

The case where a final truncated node's parent property is accepted,
but the node itself is rejected should not be considered a bug.

Fixes: 7ab4f0e37a0f4 ("ACPI PPTT: Fix coding mistakes in a couple of sizeof() calls")
Reported-by: Maximilian Heyne <mheyne@amazon.de>
Closes: https://lore.kernel.org/linux-acpi/20250506-draco-taped-15f475cd@mheyne-amazon/
Reported-by: Yicong Yang <yangyicong@hisilicon.com>
Closes: https://lore.kernel.org/linux-acpi/20250507035124.28071-1-yangyicong@huawei.com/
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Tested-by: Yicong Yang <yangyicong@hisilicon.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Maximilian Heyne <mheyne@amazon.de>
Cc: All applicable <stable@vger.kernel.org> # 7ab4f0e37a0f4: ACPI PPTT: Fix coding mistakes ...
Link: https://patch.msgid.link/20250508023025.1301030-1-jeremy.linton@arm.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/acpi/pptt.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--- a/drivers/acpi/pptt.c
+++ b/drivers/acpi/pptt.c
@@ -231,16 +231,18 @@ static int acpi_pptt_leaf_node(struct ac
 			     sizeof(struct acpi_table_pptt));
 	proc_sz = sizeof(struct acpi_pptt_processor);
 
-	while ((unsigned long)entry + proc_sz < table_end) {
+	/* ignore subtable types that are smaller than a processor node */
+	while ((unsigned long)entry + proc_sz <= table_end) {
 		cpu_node = (struct acpi_pptt_processor *)entry;
+
 		if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
 		    cpu_node->parent == node_entry)
 			return 0;
 		if (entry->length == 0)
 			return 0;
+
 		entry = ACPI_ADD_PTR(struct acpi_subtable_header, entry,
 				     entry->length);
-
 	}
 	return 1;
 }
@@ -273,15 +275,18 @@ static struct acpi_pptt_processor *acpi_
 	proc_sz = sizeof(struct acpi_pptt_processor);
 
 	/* find the processor structure associated with this cpuid */
-	while ((unsigned long)entry + proc_sz < table_end) {
+	while ((unsigned long)entry + proc_sz <= table_end) {
 		cpu_node = (struct acpi_pptt_processor *)entry;
 
 		if (entry->length == 0) {
 			pr_warn("Invalid zero length subtable\n");
 			break;
 		}
+		/* entry->length may not equal proc_sz, revalidate the processor structure length */
 		if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
 		    acpi_cpu_id == cpu_node->acpi_processor_id &&
+		    (unsigned long)entry + entry->length <= table_end &&
+		    entry->length == proc_sz + cpu_node->number_of_priv_resources * sizeof(u32) &&
 		     acpi_pptt_leaf_node(table_hdr, cpu_node)) {
 			return (struct acpi_pptt_processor *)entry;
 		}



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 088/145] ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (86 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 087/145] ACPI: PPTT: Fix processor subtable walk Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:50 ` [PATCH 6.14 089/145] ALSA: usb-audio: Add sample rate quirk for Audioengine D1 Greg Kroah-Hartman
                   ` (68 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Wentao Liang, Takashi Iwai

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wentao Liang <vulab@iscas.ac.cn>

commit 9e000f1b7f31684cc5927e034360b87ac7919593 upstream.

The function snd_es1968_capture_open() calls the function
snd_pcm_hw_constraint_pow2(), but does not check its return
value. A proper implementation can be found in snd_cx25821_pcm_open().

Add error handling for snd_pcm_hw_constraint_pow2() and propagate its
error code.

Fixes: b942cf815b57 ("[ALSA] es1968 - Fix stuttering capture")
Cc: stable@vger.kernel.org # v2.6.22
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20250514092444.331-1-vulab@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 sound/pci/es1968.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -1561,7 +1561,7 @@ static int snd_es1968_capture_open(struc
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct es1968 *chip = snd_pcm_substream_chip(substream);
 	struct esschan *es;
-	int apu1, apu2;
+	int err, apu1, apu2;
 
 	apu1 = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_CAPTURE);
 	if (apu1 < 0)
@@ -1605,7 +1605,9 @@ static int snd_es1968_capture_open(struc
 	runtime->hw = snd_es1968_capture;
 	runtime->hw.buffer_bytes_max = runtime->hw.period_bytes_max =
 		calc_available_memory_size(chip) - 1024; /* keep MIXBUF size */
-	snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES);
+	err = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES);
+	if (err < 0)
+		return err;
 
 	spin_lock_irq(&chip->substream_lock);
 	list_add(&es->list, &chip->substream_list);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 089/145] ALSA: usb-audio: Add sample rate quirk for Audioengine D1
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (87 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 088/145] ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2() Greg Kroah-Hartman
@ 2025-05-20 13:50 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 090/145] ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera Greg Kroah-Hartman
                   ` (67 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:50 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Christian Heusel, Takashi Iwai

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Christian Heusel <christian@heusel.eu>

commit 2b24eb060c2bb9ef79e1d3bcf633ba1bc95215d6 upstream.

A user reported on the Arch Linux Forums that their device is emitting
the following message in the kernel journal, which is fixed by adding
the quirk as submitted in this patch:

    > kernel: usb 1-2: current rate 8436480 is different from the runtime rate 48000

There also is an entry for this product line added long time ago.
Their specific device has the following ID:

    $ lsusb | grep Audio
    Bus 001 Device 002: ID 1101:0003 EasyPass Industrial Co., Ltd Audioengine D1

Link: https://bbs.archlinux.org/viewtopic.php?id=305494
Fixes: 93f9d1a4ac593 ("ALSA: usb-audio: Apply sample rate quirk for Audioengine D1")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Heusel <christian@heusel.eu>
Link: https://patch.msgid.link/20250512-audioengine-quirk-addition-v1-1-4c370af6eff7@heusel.eu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 sound/usb/quirks.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2248,6 +2248,8 @@ static const struct usb_audio_quirk_flag
 		   QUIRK_FLAG_FIXED_RATE),
 	DEVICE_FLG(0x0fd9, 0x0008, /* Hauppauge HVR-950Q */
 		   QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
+	DEVICE_FLG(0x1101, 0x0003, /* Audioengine D1 */
+		   QUIRK_FLAG_GET_SAMPLE_RATE),
 	DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */
 		   QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
 	DEVICE_FLG(0x1395, 0x740a, /* Sennheiser DECT */



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 090/145] ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (88 preceding siblings ...)
  2025-05-20 13:50 ` [PATCH 6.14 089/145] ALSA: usb-audio: Add sample rate quirk for Audioengine D1 Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 091/145] dma-buf: insert memory barrier before updating num_fences Greg Kroah-Hartman
                   ` (66 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Nicolas Chauvet, Takashi Iwai

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nicolas Chauvet <kwizart@gmail.com>

commit 7b9938a14460e8ec7649ca2e80ac0aae9815bf02 upstream.

Microdia JP001 does not support reading the sample rate which leads to
many lines of "cannot get freq at ep 0x84".
This patch adds the USB ID to quirks.c and avoids those error messages.

usb 7-4: New USB device found, idVendor=0c45, idProduct=636b, bcdDevice= 1.00
usb 7-4: New USB device strings: Mfr=2, Product=1, SerialNumber=3
usb 7-4: Product: JP001
usb 7-4: Manufacturer: JP001
usb 7-4: SerialNumber: JP001
usb 7-4: 3:1: cannot get freq at ep 0x84

Cc: <stable@vger.kernel.org>
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
Link: https://patch.msgid.link/20250515102132.73062-1-kwizart@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 sound/usb/quirks.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2240,6 +2240,8 @@ static const struct usb_audio_quirk_flag
 		   QUIRK_FLAG_CTL_MSG_DELAY_1M),
 	DEVICE_FLG(0x0c45, 0x6340, /* Sonix HD USB Camera */
 		   QUIRK_FLAG_GET_SAMPLE_RATE),
+	DEVICE_FLG(0x0c45, 0x636b, /* Microdia JP001 USB Camera */
+		   QUIRK_FLAG_GET_SAMPLE_RATE),
 	DEVICE_FLG(0x0d8c, 0x0014, /* USB Audio Device */
 		   QUIRK_FLAG_CTL_MSG_DELAY_1M),
 	DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 091/145] dma-buf: insert memory barrier before updating num_fences
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (89 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 090/145] ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 092/145] arm64: dts: amlogic: dreambox: fix missing clkc_audio node Greg Kroah-Hartman
                   ` (65 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Hyejeong Choi, Christian König

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hyejeong Choi <hjeong.choi@samsung.com>

commit 72c7d62583ebce7baeb61acce6057c361f73be4a upstream.

smp_store_mb() inserts memory barrier after storing operation.
It is different with what the comment is originally aiming so Null
pointer dereference can be happened if memory update is reordered.

Signed-off-by: Hyejeong Choi <hjeong.choi@samsung.com>
Fixes: a590d0fdbaa5 ("dma-buf: Update reservation shared_count after adding the new fence")
CC: stable@vger.kernel.org
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250513020638.GA2329653@au1-maretx-p37.eng.sarc.samsung.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma-buf/dma-resv.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/dma-buf/dma-resv.c
+++ b/drivers/dma-buf/dma-resv.c
@@ -320,8 +320,9 @@ void dma_resv_add_fence(struct dma_resv
 	count++;
 
 	dma_resv_list_set(fobj, i, fence, usage);
-	/* pointer update must be visible before we extend the num_fences */
-	smp_store_mb(fobj->num_fences, count);
+	/* fence update must be visible before we extend the num_fences */
+	smp_wmb();
+	fobj->num_fences = count;
 }
 EXPORT_SYMBOL(dma_resv_add_fence);
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 092/145] arm64: dts: amlogic: dreambox: fix missing clkc_audio node
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (90 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 091/145] dma-buf: insert memory barrier before updating num_fences Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 093/145] arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down Greg Kroah-Hartman
                   ` (64 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Emanuel Strobel, Christian Hewitt,
	Martin Blumenstingl, Neil Armstrong

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Christian Hewitt <christianshewitt@gmail.com>

commit 0f67578587bb9e5a8eecfcdf6b8a501b5bd90526 upstream.

Add the clkc_audio node to fix audio support on Dreambox One/Two.

Fixes: 83a6f4c62cb1 ("arm64: dts: meson: add initial support for Dreambox One/Two")
CC: stable@vger.kernel.org
Suggested-by: Emanuel Strobel <emanuel.strobel@yahoo.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20250503084443.3704866-1-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi
@@ -116,6 +116,10 @@
 	status = "okay";
 };
 
+&clkc_audio {
+	status = "okay";
+};
+
 &frddr_a {
 	status = "okay";
 };



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 093/145] arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (91 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 092/145] arm64: dts: amlogic: dreambox: fix missing clkc_audio node Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 094/145] arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi Greg Kroah-Hartman
                   ` (63 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Sam Edwards, Dragan Simic,
	Heiko Stuebner, stable

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sam Edwards <cfsworks@gmail.com>

commit fdc7bd909a5f38793468e9cf9b6a9063d96c6234 upstream.

The RK3588 thermal sensor driver only receives interrupts when a
higher-temperature threshold is crossed; it cannot notify when the
sensor cools back off. As a result, the driver must poll for temperature
changes to detect when the conditions for a thermal trip are no longer
met. However, it only does so if the DT enables polling.

Before this patch, the RK1 DT did not enable polling, causing the fan to
continue running at the speed corresponding to the highest temperature
reached.

Follow suit with similar RK3588 boards by setting a polling-delay of
1000ms, enabling the driver to detect when the sensor cools back off,
allowing the fan speed to decrease as appropriate.

Fixes: 7c8ec5e6b9d6 ("arm64: dts: rockchip: Enable automatic fan control on Turing RK1")
Cc: stable@kernel.org # v6.13+
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/20250329165017.3885-1-CFSworks@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
index 711ac4f2c7cb..60ad272982ad 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
@@ -214,6 +214,8 @@ rgmii_phy: ethernet-phy@1 {
 };
 
 &package_thermal {
+	polling-delay = <1000>;
+
 	trips {
 		package_active1: trip-active1 {
 			temperature = <45000>;
-- 
2.49.0




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 094/145] arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (92 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 093/145] arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 095/145] hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages Greg Kroah-Hartman
                   ` (62 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Heiko Stuebner, Alexey Charkov,
	Quentin Schulz, Dragan Simic

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dragan Simic <dsimic@manjaro.org>

commit e0bd7ecf6b2dc71215af699dffbf14bf0bc3d978 upstream.

The differences in the vendor-approved CPU and GPU OPPs for the standard
Rockchip RK3588 variant [1] and the industrial Rockchip RK3588J variant [2]
come from the latter, presumably, supporting an extended temperature range
that's usually associated with industrial applications, despite the two SoC
variant datasheets specifying the same upper limit for the allowed ambient
temperature for both variants.  However, the lower temperature limit is
specified much lower for the RK3588J variant. [1][2]

To be on the safe side and to ensure maximum longevity of the RK3588J SoCs,
only the CPU and GPU OPPs that are declared by the vendor to be always safe
for this SoC variant may be provided.  As explained by the vendor [3] and
according to the RK3588J datasheet, [2] higher-frequency/higher-voltage
CPU and GPU OPPs can be used as well, but at the risk of reducing the SoC
lifetime expectancy.  Presumably, using the higher OPPs may be safe only
when not enjoying the assumed extended temperature range that the RK3588J,
as an SoC variant targeted specifically at higher-temperature, industrial
applications, is made (or binned) for.

Anyone able to keep their RK3588J-based board outside the above-presumed
extended temperature range at all times, and willing to take the associated
risk of possibly reducing the SoC lifetime expectancy, is free to apply
a DT overlay that adds the higher CPU and GPU OPPs.

With all this and the downstream RK3588(J) DT definitions [4][5] in mind,
let's delete the RK3588J CPU and GPU OPPs that are not considered belonging
to the normal operation mode for this SoC variant.  To quote the RK3588J
datasheet [2], "normal mode means the chipset works under safety voltage
and frequency;  for the industrial environment, highly recommend to keep in
normal mode, the lifetime is reasonably guaranteed", while "overdrive mode
brings higher frequency, and the voltage will increase accordingly;  under
the overdrive mode for a long time, the chipset may shorten the lifetime,
especially in high-temperature condition".

To sum the RK3588J datasheet [2] and the vendor-provided DTs up, [4][5]
the maximum allowed CPU core, GPU and NPU frequencies are as follows:

   IP core    | Normal mode | Overdrive mode
  ------------+-------------+----------------
   Cortex-A55 |   1,296 MHz |      1,704 MHz
   Cortex-A76 |   1,608 MHz |      2,016 MHz
   GPU        |     700 MHz |        850 MHz
   NPU        |     800 MHz |        950 MHz

Unfortunately, when it comes to the actual voltages for the RK3588J CPU and
GPU OPPs, there's a discrepancy between the RK3588J datasheet [2] and the
downstream kernel code. [4][5]  The RK3588J datasheet states that "the max.
working voltage of CPU/GPU/NPU is 0.75 V under the normal mode", while the
downstream kernel code actually allows voltage ranges that go up to 0.95 V,
which is still within the voltage range allowed by the datasheet.  However,
the RK3588J datasheet also tells us to "strictly refer to the software
configuration of SDK and the hardware reference design", so let's embrace
the voltage ranges provided by the downstream kernel code, which also
prevents the undesirable theoretical outcome of ending up with no usable
OPPs on a particular board, as a result of the board's voltage regulator(s)
being unable to deliver the exact voltages, for whatever reason.

The above-described voltage ranges for the RK3588J CPU OPPs remain taken
from the downstream kernel code [4][5] by picking the highest, worst-bin
values, which ensure that all RK3588J bins will work reliably.  Yes, with
some power inevitably wasted as unnecessarily generated heat, but the
reliability is paramount, together with the longevity.  This deficiency
may be revisited separately at some point in the future.

The provided RK3588J CPU OPPs follow the slightly debatable "provide only
the highest-frequency OPP from the same-voltage group" approach that's been
established earlier, [6] as a result of the "same-voltage, lower-frequency"
OPPs being considered inefficient from the IPA governor's standpoint, which
may also be revisited separately at some point in the future.

[1] https://wiki.friendlyelec.com/wiki/images/e/ee/Rockchip_RK3588_Datasheet_V1.6-20231016.pdf
[2] https://wmsc.lcsc.com/wmsc/upload/file/pdf/v2/lcsc/2403201054_Rockchip-RK3588J_C22364189.pdf
[3] https://lore.kernel.org/linux-rockchip/e55125ed-64fb-455e-b1e4-cebe2cf006e4@cherry.de/T/#u
[4] https://raw.githubusercontent.com/rockchip-linux/kernel/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
[5] https://raw.githubusercontent.com/rockchip-linux/kernel/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3588j.dtsi
[6] https://lore.kernel.org/all/20240229-rk-dts-additions-v3-5-6afe8473a631@gmail.com/

Fixes: 667885a68658 ("arm64: dts: rockchip: Add OPP data for CPU cores on RK3588j")
Fixes: a7b2070505a2 ("arm64: dts: rockchip: Split GPU OPPs of RK3588 and RK3588j")
Cc: stable@vger.kernel.org
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Alexey Charkov <alchark@gmail.com>
Helped-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/eeec0d30d79b019d111b3f0aa2456e69896b2caa.1742813866.git.dsimic@manjaro.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/boot/dts/rockchip/rk3588j.dtsi |   53 +++++++++---------------------
 1 file changed, 17 insertions(+), 36 deletions(-)

--- a/arch/arm64/boot/dts/rockchip/rk3588j.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588j.dtsi
@@ -11,20 +11,15 @@
 		compatible = "operating-points-v2";
 		opp-shared;
 
-		opp-1416000000 {
-			opp-hz = /bits/ 64 <1416000000>;
+		opp-1200000000 {
+			opp-hz = /bits/ 64 <1200000000>;
 			opp-microvolt = <750000 750000 950000>;
 			clock-latency-ns = <40000>;
 			opp-suspend;
 		};
-		opp-1608000000 {
-			opp-hz = /bits/ 64 <1608000000>;
-			opp-microvolt = <887500 887500 950000>;
-			clock-latency-ns = <40000>;
-		};
-		opp-1704000000 {
-			opp-hz = /bits/ 64 <1704000000>;
-			opp-microvolt = <937500 937500 950000>;
+		opp-1296000000 {
+			opp-hz = /bits/ 64 <1296000000>;
+			opp-microvolt = <775000 775000 950000>;
 			clock-latency-ns = <40000>;
 		};
 	};
@@ -33,9 +28,14 @@
 		compatible = "operating-points-v2";
 		opp-shared;
 
+		opp-1200000000{
+			opp-hz = /bits/ 64 <1200000000>;
+			opp-microvolt = <750000 750000 950000>;
+			clock-latency-ns = <40000>;
+		};
 		opp-1416000000 {
 			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <750000 750000 950000>;
+			opp-microvolt = <762500 762500 950000>;
 			clock-latency-ns = <40000>;
 		};
 		opp-1608000000 {
@@ -43,25 +43,20 @@
 			opp-microvolt = <787500 787500 950000>;
 			clock-latency-ns = <40000>;
 		};
-		opp-1800000000 {
-			opp-hz = /bits/ 64 <1800000000>;
-			opp-microvolt = <875000 875000 950000>;
-			clock-latency-ns = <40000>;
-		};
-		opp-2016000000 {
-			opp-hz = /bits/ 64 <2016000000>;
-			opp-microvolt = <950000 950000 950000>;
-			clock-latency-ns = <40000>;
-		};
 	};
 
 	cluster2_opp_table: opp-table-cluster2 {
 		compatible = "operating-points-v2";
 		opp-shared;
 
+		opp-1200000000{
+			opp-hz = /bits/ 64 <1200000000>;
+			opp-microvolt = <750000 750000 950000>;
+			clock-latency-ns = <40000>;
+		};
 		opp-1416000000 {
 			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <750000 750000 950000>;
+			opp-microvolt = <762500 762500 950000>;
 			clock-latency-ns = <40000>;
 		};
 		opp-1608000000 {
@@ -69,16 +64,6 @@
 			opp-microvolt = <787500 787500 950000>;
 			clock-latency-ns = <40000>;
 		};
-		opp-1800000000 {
-			opp-hz = /bits/ 64 <1800000000>;
-			opp-microvolt = <875000 875000 950000>;
-			clock-latency-ns = <40000>;
-		};
-		opp-2016000000 {
-			opp-hz = /bits/ 64 <2016000000>;
-			opp-microvolt = <950000 950000 950000>;
-			clock-latency-ns = <40000>;
-		};
 	};
 
 	gpu_opp_table: opp-table {
@@ -104,10 +89,6 @@
 			opp-hz = /bits/ 64 <700000000>;
 			opp-microvolt = <750000 750000 850000>;
 		};
-		opp-850000000 {
-			opp-hz = /bits/ 64 <800000000>;
-			opp-microvolt = <787500 787500 850000>;
-		};
 	};
 };
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 095/145] hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (93 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 094/145] arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 096/145] hv_netvsc: Preserve contiguous PFN grouping in the page buffer array Greg Kroah-Hartman
                   ` (61 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Michael Kelley, Jakub Kicinski

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Michael Kelley <mhklinux@outlook.com>

commit 4f98616b855cb0e3b5917918bb07b44728eb96ea upstream.

netvsc currently uses vmbus_sendpacket_pagebuffer() to send VMBus
messages. This function creates a series of GPA ranges, each of which
contains a single PFN. However, if the rndis header in the VMBus
message crosses a page boundary, the netvsc protocol with the host
requires that both PFNs for the rndis header must be in a single "GPA
range" data structure, which isn't possible with
vmbus_sendpacket_pagebuffer(). As the first step in fixing this, add a
new function netvsc_build_mpb_array() to build a VMBus message with
multiple GPA ranges, each of which may contain multiple PFNs. Use
vmbus_sendpacket_mpb_desc() to send this VMBus message to the host.

There's no functional change since higher levels of netvsc don't
maintain or propagate knowledge of contiguous PFNs. Based on its
input, netvsc_build_mpb_array() still produces a separate GPA range
for each PFN and the behavior is the same as with
vmbus_sendpacket_pagebuffer(). But the groundwork is laid for a
subsequent patch to provide the necessary grouping.

Cc: <stable@vger.kernel.org> # 6.1.x
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Link: https://patch.msgid.link/20250513000604.1396-3-mhklinux@outlook.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/hyperv/netvsc.c |   50 +++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 45 insertions(+), 5 deletions(-)

--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -1055,6 +1055,42 @@ static int netvsc_dma_map(struct hv_devi
 	return 0;
 }
 
+/* Build an "array" of mpb entries describing the data to be transferred
+ * over VMBus. After the desc header fields, each "array" entry is variable
+ * size, and each entry starts after the end of the previous entry. The
+ * "offset" and "len" fields for each entry imply the size of the entry.
+ *
+ * The pfns are in HV_HYP_PAGE_SIZE, because all communication with Hyper-V
+ * uses that granularity, even if the system page size of the guest is larger.
+ * Each entry in the input "pb" array must describe a contiguous range of
+ * guest physical memory so that the pfns are sequential if the range crosses
+ * a page boundary. The offset field must be < HV_HYP_PAGE_SIZE.
+ */
+static inline void netvsc_build_mpb_array(struct hv_page_buffer *pb,
+				u32 page_buffer_count,
+				struct vmbus_packet_mpb_array *desc,
+				u32 *desc_size)
+{
+	struct hv_mpb_array *mpb_entry = &desc->range;
+	int i, j;
+
+	for (i = 0; i < page_buffer_count; i++) {
+		u32 offset = pb[i].offset;
+		u32 len = pb[i].len;
+
+		mpb_entry->offset = offset;
+		mpb_entry->len = len;
+
+		for (j = 0; j < HVPFN_UP(offset + len); j++)
+			mpb_entry->pfn_array[j] = pb[i].pfn + j;
+
+		mpb_entry = (struct hv_mpb_array *)&mpb_entry->pfn_array[j];
+	}
+
+	desc->rangecount = page_buffer_count;
+	*desc_size = (char *)mpb_entry - (char *)desc;
+}
+
 static inline int netvsc_send_pkt(
 	struct hv_device *device,
 	struct hv_netvsc_packet *packet,
@@ -1097,6 +1133,9 @@ static inline int netvsc_send_pkt(
 
 	packet->dma_range = NULL;
 	if (packet->page_buf_cnt) {
+		struct vmbus_channel_packet_page_buffer desc;
+		u32 desc_size;
+
 		if (packet->cp_partial)
 			pb += packet->rmsg_pgcnt;
 
@@ -1106,11 +1145,12 @@ static inline int netvsc_send_pkt(
 			goto exit;
 		}
 
-		ret = vmbus_sendpacket_pagebuffer(out_channel,
-						  pb, packet->page_buf_cnt,
-						  &nvmsg, sizeof(nvmsg),
-						  req_id);
-
+		netvsc_build_mpb_array(pb, packet->page_buf_cnt,
+				(struct vmbus_packet_mpb_array *)&desc,
+				 &desc_size);
+		ret = vmbus_sendpacket_mpb_desc(out_channel,
+				(struct vmbus_packet_mpb_array *)&desc,
+				desc_size, &nvmsg, sizeof(nvmsg), req_id);
 		if (ret)
 			netvsc_dma_unmap(ndev_ctx->device_ctx, packet);
 	} else {



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 096/145] hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (94 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 095/145] hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 097/145] hv_netvsc: Remove rmsg_pgcnt Greg Kroah-Hartman
                   ` (60 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Michael Kelley, Jakub Kicinski

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Michael Kelley <mhklinux@outlook.com>

commit 41a6328b2c55276f89ea3812069fd7521e348bbf upstream.

Starting with commit dca5161f9bd0 ("hv_netvsc: Check status in
SEND_RNDIS_PKT completion message") in the 6.3 kernel, the Linux
driver for Hyper-V synthetic networking (netvsc) occasionally reports
"nvsp_rndis_pkt_complete error status: 2".[1] This error indicates
that Hyper-V has rejected a network packet transmit request from the
guest, and the outgoing network packet is dropped. Higher level
network protocols presumably recover and resend the packet so there is
no functional error, but performance is slightly impacted. Commit
dca5161f9bd0 is not the cause of the error -- it only added reporting
of an error that was already happening without any notice. The error
has presumably been present since the netvsc driver was originally
introduced into Linux.

The root cause of the problem is that the netvsc driver in Linux may
send an incorrectly formatted VMBus message to Hyper-V when
transmitting the network packet. The incorrect formatting occurs when
the rndis header of the VMBus message crosses a page boundary due to
how the Linux skb head memory is aligned. In such a case, two PFNs are
required to describe the location of the rndis header, even though
they are contiguous in guest physical address (GPA) space. Hyper-V
requires that two rndis header PFNs be in a single "GPA range" data
struture, but current netvsc code puts each PFN in its own GPA range,
which Hyper-V rejects as an error.

The incorrect formatting occurs only for larger packets that netvsc
must transmit via a VMBus "GPA Direct" message. There's no problem
when netvsc transmits a smaller packet by copying it into a pre-
allocated send buffer slot because the pre-allocated slots don't have
page crossing issues.

After commit 14ad6ed30a10 ("net: allow small head cache usage with
large MAX_SKB_FRAGS values") in the 6.14-rc4 kernel, the error occurs
much more frequently in VMs with 16 or more vCPUs. It may occur every
few seconds, or even more frequently, in an ssh session that outputs a
lot of text. Commit 14ad6ed30a10 subtly changes how skb head memory is
allocated, making it much more likely that the rndis header will cross
a page boundary when the vCPU count is 16 or more. The changes in
commit 14ad6ed30a10 are perfectly valid -- they just had the side
effect of making the netvsc bug more prominent.

Current code in init_page_array() creates a separate page buffer array
entry for each PFN required to identify the data to be transmitted.
Contiguous PFNs get separate entries in the page buffer array, and any
information about contiguity is lost.

Fix the core issue by having init_page_array() construct the page
buffer array to represent contiguous ranges rather than individual
pages. When these ranges are subsequently passed to
netvsc_build_mpb_array(), it can build GPA ranges that contain
multiple PFNs, as required to avoid the error "nvsp_rndis_pkt_complete
error status: 2". If instead the network packet is sent by copying
into a pre-allocated send buffer slot, the copy proceeds using the
contiguous ranges rather than individual pages, but the result of the
copying is the same. Also fix rndis_filter_send_request() to construct
a contiguous range, since it has its own page buffer array.

This change has a side benefit in CoCo VMs in that netvsc_dma_map()
calls dma_map_single() on each contiguous range instead of on each
page. This results in fewer calls to dma_map_single() but on larger
chunks of memory, which should reduce contention on the swiotlb.

Since the page buffer array now contains one entry for each contiguous
range instead of for each individual page, the number of entries in
the array can be reduced, saving 208 bytes of stack space in
netvsc_xmit() when MAX_SKG_FRAGS has the default value of 17.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=217503

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217503
Cc: <stable@vger.kernel.org> # 6.1.x
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Link: https://patch.msgid.link/20250513000604.1396-4-mhklinux@outlook.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/hyperv/hyperv_net.h   |   12 +++++++
 drivers/net/hyperv/netvsc_drv.c   |   65 +++++++++-----------------------------
 drivers/net/hyperv/rndis_filter.c |   24 ++------------
 3 files changed, 33 insertions(+), 68 deletions(-)

--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -893,6 +893,18 @@ struct nvsp_message {
 				 sizeof(struct nvsp_message))
 #define NETVSC_MIN_IN_MSG_SIZE sizeof(struct vmpacket_descriptor)
 
+/* Maximum # of contiguous data ranges that can make up a trasmitted packet.
+ * Typically it's the max SKB fragments plus 2 for the rndis packet and the
+ * linear portion of the SKB. But if MAX_SKB_FRAGS is large, the value may
+ * need to be limited to MAX_PAGE_BUFFER_COUNT, which is the max # of entries
+ * in a GPA direct packet sent to netvsp over VMBus.
+ */
+#if MAX_SKB_FRAGS + 2 < MAX_PAGE_BUFFER_COUNT
+#define MAX_DATA_RANGES (MAX_SKB_FRAGS + 2)
+#else
+#define MAX_DATA_RANGES MAX_PAGE_BUFFER_COUNT
+#endif
+
 /* Estimated requestor size:
  * out_ring_size/min_out_msg_size + in_ring_size/min_in_msg_size
  */
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -325,43 +325,10 @@ static u16 netvsc_select_queue(struct ne
 	return txq;
 }
 
-static u32 fill_pg_buf(unsigned long hvpfn, u32 offset, u32 len,
-		       struct hv_page_buffer *pb)
-{
-	int j = 0;
-
-	hvpfn += offset >> HV_HYP_PAGE_SHIFT;
-	offset = offset & ~HV_HYP_PAGE_MASK;
-
-	while (len > 0) {
-		unsigned long bytes;
-
-		bytes = HV_HYP_PAGE_SIZE - offset;
-		if (bytes > len)
-			bytes = len;
-		pb[j].pfn = hvpfn;
-		pb[j].offset = offset;
-		pb[j].len = bytes;
-
-		offset += bytes;
-		len -= bytes;
-
-		if (offset == HV_HYP_PAGE_SIZE && len) {
-			hvpfn++;
-			offset = 0;
-			j++;
-		}
-	}
-
-	return j + 1;
-}
-
 static u32 init_page_array(void *hdr, u32 len, struct sk_buff *skb,
 			   struct hv_netvsc_packet *packet,
 			   struct hv_page_buffer *pb)
 {
-	u32 slots_used = 0;
-	char *data = skb->data;
 	int frags = skb_shinfo(skb)->nr_frags;
 	int i;
 
@@ -370,28 +337,28 @@ static u32 init_page_array(void *hdr, u3
 	 * 2. skb linear data
 	 * 3. skb fragment data
 	 */
-	slots_used += fill_pg_buf(virt_to_hvpfn(hdr),
-				  offset_in_hvpage(hdr),
-				  len,
-				  &pb[slots_used]);
 
+	pb[0].offset = offset_in_hvpage(hdr);
+	pb[0].len = len;
+	pb[0].pfn = virt_to_hvpfn(hdr);
 	packet->rmsg_size = len;
-	packet->rmsg_pgcnt = slots_used;
+	packet->rmsg_pgcnt = 1;
 
-	slots_used += fill_pg_buf(virt_to_hvpfn(data),
-				  offset_in_hvpage(data),
-				  skb_headlen(skb),
-				  &pb[slots_used]);
+	pb[1].offset = offset_in_hvpage(skb->data);
+	pb[1].len = skb_headlen(skb);
+	pb[1].pfn = virt_to_hvpfn(skb->data);
 
 	for (i = 0; i < frags; i++) {
 		skb_frag_t *frag = skb_shinfo(skb)->frags + i;
-
-		slots_used += fill_pg_buf(page_to_hvpfn(skb_frag_page(frag)),
-					  skb_frag_off(frag),
-					  skb_frag_size(frag),
-					  &pb[slots_used]);
+		struct hv_page_buffer *cur_pb = &pb[i + 2];
+		u64 pfn = page_to_hvpfn(skb_frag_page(frag));
+		u32 offset = skb_frag_off(frag);
+
+		cur_pb->offset = offset_in_hvpage(offset);
+		cur_pb->len = skb_frag_size(frag);
+		cur_pb->pfn = pfn + (offset >> HV_HYP_PAGE_SHIFT);
 	}
-	return slots_used;
+	return frags + 2;
 }
 
 static int count_skb_frag_slots(struct sk_buff *skb)
@@ -482,7 +449,7 @@ static int netvsc_xmit(struct sk_buff *s
 	struct net_device *vf_netdev;
 	u32 rndis_msg_size;
 	u32 hash;
-	struct hv_page_buffer pb[MAX_PAGE_BUFFER_COUNT];
+	struct hv_page_buffer pb[MAX_DATA_RANGES];
 
 	/* If VF is present and up then redirect packets to it.
 	 * Skip the VF if it is marked down or has no carrier.
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -225,8 +225,7 @@ static int rndis_filter_send_request(str
 				  struct rndis_request *req)
 {
 	struct hv_netvsc_packet *packet;
-	struct hv_page_buffer page_buf[2];
-	struct hv_page_buffer *pb = page_buf;
+	struct hv_page_buffer pb;
 	int ret;
 
 	/* Setup the packet to send it */
@@ -235,27 +234,14 @@ static int rndis_filter_send_request(str
 	packet->total_data_buflen = req->request_msg.msg_len;
 	packet->page_buf_cnt = 1;
 
-	pb[0].pfn = virt_to_phys(&req->request_msg) >>
-					HV_HYP_PAGE_SHIFT;
-	pb[0].len = req->request_msg.msg_len;
-	pb[0].offset = offset_in_hvpage(&req->request_msg);
-
-	/* Add one page_buf when request_msg crossing page boundary */
-	if (pb[0].offset + pb[0].len > HV_HYP_PAGE_SIZE) {
-		packet->page_buf_cnt++;
-		pb[0].len = HV_HYP_PAGE_SIZE -
-			pb[0].offset;
-		pb[1].pfn = virt_to_phys((void *)&req->request_msg
-			+ pb[0].len) >> HV_HYP_PAGE_SHIFT;
-		pb[1].offset = 0;
-		pb[1].len = req->request_msg.msg_len -
-			pb[0].len;
-	}
+	pb.pfn = virt_to_phys(&req->request_msg) >> HV_HYP_PAGE_SHIFT;
+	pb.len = req->request_msg.msg_len;
+	pb.offset = offset_in_hvpage(&req->request_msg);
 
 	trace_rndis_send(dev->ndev, 0, &req->request_msg);
 
 	rcu_read_lock_bh();
-	ret = netvsc_send(dev->ndev, packet, NULL, pb, NULL, false);
+	ret = netvsc_send(dev->ndev, packet, NULL, &pb, NULL, false);
 	rcu_read_unlock_bh();
 
 	return ret;



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 097/145] hv_netvsc: Remove rmsg_pgcnt
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (95 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 096/145] hv_netvsc: Preserve contiguous PFN grouping in the page buffer array Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 098/145] Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges Greg Kroah-Hartman
                   ` (59 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Michael Kelley, Jakub Kicinski

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Michael Kelley <mhklinux@outlook.com>

commit 5bbc644bbf4e97a05bc0cb052189004588ff8a09 upstream.

init_page_array() now always creates a single page buffer array entry
for the rndis message, even if the rndis message crosses a page
boundary. As such, the number of page buffer array entries used for
the rndis message must no longer be tracked -- it is always just 1.
Remove the rmsg_pgcnt field and use "1" where the value is needed.

Cc: <stable@vger.kernel.org> # 6.1.x
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Link: https://patch.msgid.link/20250513000604.1396-5-mhklinux@outlook.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/hyperv/hyperv_net.h |    1 -
 drivers/net/hyperv/netvsc.c     |    7 +++----
 drivers/net/hyperv/netvsc_drv.c |    1 -
 3 files changed, 3 insertions(+), 6 deletions(-)

--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -158,7 +158,6 @@ struct hv_netvsc_packet {
 	u8 cp_partial; /* partial copy into send buffer */
 
 	u8 rmsg_size; /* RNDIS header and PPI size */
-	u8 rmsg_pgcnt; /* page count of RNDIS header and PPI */
 	u8 page_buf_cnt;
 
 	u16 q_idx;
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -953,8 +953,7 @@ static void netvsc_copy_to_send_buf(stru
 		     + pend_size;
 	int i;
 	u32 padding = 0;
-	u32 page_count = packet->cp_partial ? packet->rmsg_pgcnt :
-		packet->page_buf_cnt;
+	u32 page_count = packet->cp_partial ? 1 : packet->page_buf_cnt;
 	u32 remain;
 
 	/* Add padding */
@@ -1137,7 +1136,7 @@ static inline int netvsc_send_pkt(
 		u32 desc_size;
 
 		if (packet->cp_partial)
-			pb += packet->rmsg_pgcnt;
+			pb++;
 
 		ret = netvsc_dma_map(ndev_ctx->device_ctx, packet, pb);
 		if (ret) {
@@ -1299,7 +1298,7 @@ int netvsc_send(struct net_device *ndev,
 		packet->send_buf_index = section_index;
 
 		if (packet->cp_partial) {
-			packet->page_buf_cnt -= packet->rmsg_pgcnt;
+			packet->page_buf_cnt--;
 			packet->total_data_buflen = msd_len + packet->rmsg_size;
 		} else {
 			packet->page_buf_cnt = 0;
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -342,7 +342,6 @@ static u32 init_page_array(void *hdr, u3
 	pb[0].len = len;
 	pb[0].pfn = virt_to_hvpfn(hdr);
 	packet->rmsg_size = len;
-	packet->rmsg_pgcnt = 1;
 
 	pb[1].offset = offset_in_hvpage(skb->data);
 	pb[1].len = skb_headlen(skb);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 098/145] Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (96 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 097/145] hv_netvsc: Remove rmsg_pgcnt Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 099/145] Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer() Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Michael Kelley, Jakub Kicinski

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Michael Kelley <mhklinux@outlook.com>

commit 380b75d3078626aadd0817de61f3143f5db6e393 upstream.

vmbus_sendpacket_mpb_desc() is currently used only by the storvsc driver
and is hardcoded to create a single GPA range. To allow it to also be
used by the netvsc driver to create multiple GPA ranges, no longer
hardcode as having a single GPA range. Allow the calling driver to
specify the rangecount in the supplied descriptor.

Update the storvsc driver to reflect this new approach.

Cc: <stable@vger.kernel.org> # 6.1.x
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Link: https://patch.msgid.link/20250513000604.1396-2-mhklinux@outlook.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/hv/channel.c       |    6 +++---
 drivers/scsi/storvsc_drv.c |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -1136,9 +1136,10 @@ int vmbus_sendpacket_pagebuffer(struct v
 EXPORT_SYMBOL_GPL(vmbus_sendpacket_pagebuffer);
 
 /*
- * vmbus_sendpacket_multipagebuffer - Send a multi-page buffer packet
+ * vmbus_sendpacket_mpb_desc - Send one or more multi-page buffer packets
  * using a GPADL Direct packet type.
- * The buffer includes the vmbus descriptor.
+ * The desc argument must include space for the VMBus descriptor. The
+ * rangecount field must already be set.
  */
 int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
 			      struct vmbus_packet_mpb_array *desc,
@@ -1160,7 +1161,6 @@ int vmbus_sendpacket_mpb_desc(struct vmb
 	desc->length8 = (u16)(packetlen_aligned >> 3);
 	desc->transactionid = VMBUS_RQST_ERROR; /* will be updated in hv_ringbuffer_write() */
 	desc->reserved = 0;
-	desc->rangecount = 1;
 
 	bufferlist[0].iov_base = desc;
 	bufferlist[0].iov_len = desc_size;
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1819,6 +1819,7 @@ static int storvsc_queuecommand(struct S
 				return SCSI_MLQUEUE_DEVICE_BUSY;
 		}
 
+		payload->rangecount = 1;
 		payload->range.len = length;
 		payload->range.offset = offset_in_hvpg;
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 099/145] Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (97 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 098/145] Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 100/145] kbuild: Disable -Wdefault-const-init-unsafe Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Michael Kelley, Jakub Kicinski

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Michael Kelley <mhklinux@outlook.com>

commit 45a442fe369e6c4e0b4aa9f63b31c3f2f9e2090e upstream.

With the netvsc driver changed to use vmbus_sendpacket_mpb_desc()
instead of vmbus_sendpacket_pagebuffer(), the latter has no remaining
callers. Remove it.

Cc: <stable@vger.kernel.org> # 6.1.x
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Link: https://patch.msgid.link/20250513000604.1396-6-mhklinux@outlook.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/hv/channel.c   |   59 -------------------------------------------------
 include/linux/hyperv.h |    7 -----
 2 files changed, 66 deletions(-)

--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -1077,65 +1077,6 @@ int vmbus_sendpacket(struct vmbus_channe
 EXPORT_SYMBOL(vmbus_sendpacket);
 
 /*
- * vmbus_sendpacket_pagebuffer - Send a range of single-page buffer
- * packets using a GPADL Direct packet type. This interface allows you
- * to control notifying the host. This will be useful for sending
- * batched data. Also the sender can control the send flags
- * explicitly.
- */
-int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
-				struct hv_page_buffer pagebuffers[],
-				u32 pagecount, void *buffer, u32 bufferlen,
-				u64 requestid)
-{
-	int i;
-	struct vmbus_channel_packet_page_buffer desc;
-	u32 descsize;
-	u32 packetlen;
-	u32 packetlen_aligned;
-	struct kvec bufferlist[3];
-	u64 aligned_data = 0;
-
-	if (pagecount > MAX_PAGE_BUFFER_COUNT)
-		return -EINVAL;
-
-	/*
-	 * Adjust the size down since vmbus_channel_packet_page_buffer is the
-	 * largest size we support
-	 */
-	descsize = sizeof(struct vmbus_channel_packet_page_buffer) -
-			  ((MAX_PAGE_BUFFER_COUNT - pagecount) *
-			  sizeof(struct hv_page_buffer));
-	packetlen = descsize + bufferlen;
-	packetlen_aligned = ALIGN(packetlen, sizeof(u64));
-
-	/* Setup the descriptor */
-	desc.type = VM_PKT_DATA_USING_GPA_DIRECT;
-	desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
-	desc.dataoffset8 = descsize >> 3; /* in 8-bytes granularity */
-	desc.length8 = (u16)(packetlen_aligned >> 3);
-	desc.transactionid = VMBUS_RQST_ERROR; /* will be updated in hv_ringbuffer_write() */
-	desc.reserved = 0;
-	desc.rangecount = pagecount;
-
-	for (i = 0; i < pagecount; i++) {
-		desc.range[i].len = pagebuffers[i].len;
-		desc.range[i].offset = pagebuffers[i].offset;
-		desc.range[i].pfn	 = pagebuffers[i].pfn;
-	}
-
-	bufferlist[0].iov_base = &desc;
-	bufferlist[0].iov_len = descsize;
-	bufferlist[1].iov_base = buffer;
-	bufferlist[1].iov_len = bufferlen;
-	bufferlist[2].iov_base = &aligned_data;
-	bufferlist[2].iov_len = (packetlen_aligned - packetlen);
-
-	return hv_ringbuffer_write(channel, bufferlist, 3, requestid, NULL);
-}
-EXPORT_SYMBOL_GPL(vmbus_sendpacket_pagebuffer);
-
-/*
  * vmbus_sendpacket_mpb_desc - Send one or more multi-page buffer packets
  * using a GPADL Direct packet type.
  * The desc argument must include space for the VMBus descriptor. The
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1223,13 +1223,6 @@ extern int vmbus_sendpacket(struct vmbus
 				  enum vmbus_packet_type type,
 				  u32 flags);
 
-extern int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
-					    struct hv_page_buffer pagebuffers[],
-					    u32 pagecount,
-					    void *buffer,
-					    u32 bufferlen,
-					    u64 requestid);
-
 extern int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
 				     struct vmbus_packet_mpb_array *mpb,
 				     u32 desc_size,



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 100/145] kbuild: Disable -Wdefault-const-init-unsafe
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (98 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 099/145] Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer() Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 101/145] i2c: designware: Fix an error handling path in i2c_dw_pci_probe() Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Linux Kernel Functional Testing,
	Marcus Seyfarth, Nathan Chancellor, Masahiro Yamada

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nathan Chancellor <nathan@kernel.org>

commit d0afcfeb9e3810ec89d1ffde1a0e36621bb75dca upstream.

A new on by default warning in clang [1] aims to flags instances where
const variables without static or thread local storage or const members
in aggregate types are not initialized because it can lead to an
indeterminate value. This is quite noisy for the kernel due to
instances originating from header files such as:

  drivers/gpu/drm/i915/gt/intel_ring.h:62:2: error: default initialization of an object of type 'typeof (ring->size)' (aka 'const unsigned int') leaves the object uninitialized [-Werror,-Wdefault-const-init-var-unsafe]
     62 |         typecheck(typeof(ring->size), next);
        |         ^
  include/linux/typecheck.h:10:9: note: expanded from macro 'typecheck'
     10 | ({      type __dummy; \
        |              ^

  include/net/ip.h:478:14: error: default initialization of an object of type 'typeof (rt->dst.expires)' (aka 'const unsigned long') leaves the object uninitialized [-Werror,-Wdefault-const-init-var-unsafe]
    478 |                 if (mtu && time_before(jiffies, rt->dst.expires))
        |                            ^
  include/linux/jiffies.h:138:26: note: expanded from macro 'time_before'
    138 | #define time_before(a,b)        time_after(b,a)
        |                                 ^
  include/linux/jiffies.h:128:3: note: expanded from macro 'time_after'
    128 |         (typecheck(unsigned long, a) && \
        |          ^
  include/linux/typecheck.h:11:12: note: expanded from macro 'typecheck'
     11 |         typeof(x) __dummy2; \
        |                   ^

  include/linux/list.h:409:27: warning: default initialization of an object of type 'union (unnamed union at include/linux/list.h:409:27)' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe]
    409 |         struct list_head *next = smp_load_acquire(&head->next);
        |                                  ^
  include/asm-generic/barrier.h:176:29: note: expanded from macro 'smp_load_acquire'
    176 | #define smp_load_acquire(p) __smp_load_acquire(p)
        |                             ^
  arch/arm64/include/asm/barrier.h:164:59: note: expanded from macro '__smp_load_acquire'
    164 |         union { __unqual_scalar_typeof(*p) __val; char __c[1]; } __u;   \
        |                                                                  ^
  include/linux/list.h:409:27: note: member '__val' declared 'const' here

  crypto/scatterwalk.c:66:22: error: default initialization of an object of type 'struct scatter_walk' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
     66 |         struct scatter_walk walk;
        |                             ^
  include/crypto/algapi.h:112:15: note: member 'addr' declared 'const' here
    112 |                 void *const addr;
        |                             ^

  fs/hugetlbfs/inode.c:733:24: error: default initialization of an object of type 'struct vm_area_struct' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
    733 |         struct vm_area_struct pseudo_vma;
        |                               ^
  include/linux/mm_types.h:803:20: note: member 'vm_flags' declared 'const' here
    803 |                 const vm_flags_t vm_flags;
        |                                  ^

Silencing the instances from typecheck.h is difficult because '= {}' is
not available in older but supported compilers and '= {0}' would cause
warnings about a literal 0 being treated as NULL. While it might be
possible to come up with a local hack to silence the warning for
clang-21+, it may not be worth it since -Wuninitialized will still
trigger if an uninitialized const variable is actually used.

In all audited cases of the "field" variant of the warning, the members
are either not used in the particular call path, modified through other
means such as memset() / memcpy() because the containing object is not
const, or are within a union with other non-const members.

Since this warning does not appear to have a high signal to noise ratio,
just disable it.

Cc: stable@vger.kernel.org
Link: https://github.com/llvm/llvm-project/commit/576161cb6069e2c7656a8ef530727a0f4aefff30 [1]
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/CA+G9fYuNjKcxFKS_MKPRuga32XbndkLGcY-PVuoSwzv6VWbY=w@mail.gmail.com/
Reported-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Closes: https://github.com/ClangBuiltLinux/linux/issues/2088
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 scripts/Makefile.extrawarn |   12 ++++++++++++
 1 file changed, 12 insertions(+)

--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -36,6 +36,18 @@ KBUILD_CFLAGS += -Wno-gnu
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111219
 KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow-non-kprintf)
 KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation-non-kprintf)
+
+# Clang may emit a warning when a const variable, such as the dummy variables
+# in typecheck(), or const member of an aggregate type are not initialized,
+# which can result in unexpected behavior. However, in many audited cases of
+# the "field" variant of the warning, this is intentional because the field is
+# never used within a particular call path, the field is within a union with
+# other non-const members, or the containing object is not const so the field
+# can be modified via memcpy() / memset(). While the variable warning also gets
+# disabled with this same switch, there should not be too much coverage lost
+# because -Wuninitialized will still flag when an uninitialized const variable
+# is used.
+KBUILD_CFLAGS += $(call cc-disable-warning, default-const-init-unsafe)
 else
 
 # gcc inanely warns about local variables called 'main'



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 101/145] i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (99 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 100/145] kbuild: Disable -Wdefault-const-init-unsafe Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 102/145] ftrace: Fix preemption accounting for stacktrace trigger command Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Christophe JAILLET, Jarkko Nikula,
	Andi Shyti

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

commit 1cfe51ef07ca3286581d612debfb0430eeccbb65 upstream.

If navi_amd_register_client() fails, the previous i2c_dw_probe() call
should be undone by a corresponding i2c_del_adapter() call, as already done
in the remove function.

Fixes: 17631e8ca2d3 ("i2c: designware: Add driver support for AMD NAVI GPU")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: <stable@vger.kernel.org> # v5.13+
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/fcd9651835a32979df8802b2db9504c523a8ebbb.1747158983.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/i2c/busses/i2c-designware-pcidrv.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -278,9 +278,11 @@ static int i2c_dw_pci_probe(struct pci_d
 
 	if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) {
 		dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, &dgpu_node);
-		if (IS_ERR(dev->slave))
+		if (IS_ERR(dev->slave)) {
+			i2c_del_adapter(&dev->adapter);
 			return dev_err_probe(device, PTR_ERR(dev->slave),
 					     "register UCSI failed\n");
+		}
 	}
 
 	pm_runtime_set_autosuspend_delay(device, 1000);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 102/145] ftrace: Fix preemption accounting for stacktrace trigger command
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (100 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 101/145] i2c: designware: Fix an error handling path in i2c_dw_pci_probe() Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 103/145] ftrace: Fix preemption accounting for stacktrace filter command Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, pengdonglin, Steven Rostedt (Google)

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: pengdonglin <pengdonglin@xiaomi.com>

commit e333332657f615ac2b55aa35565c4a882018bbe9 upstream.

When using the stacktrace trigger command to trace syscalls, the
preemption count was consistently reported as 1 when the system call
event itself had 0 (".").

For example:

root@ubuntu22-vm:/sys/kernel/tracing/events/syscalls/sys_enter_read
$ echo stacktrace > trigger
$ echo 1 > enable

    sshd-416     [002] .....   232.864910: sys_read(fd: a, buf: 556b1f3221d0, count: 8000)
    sshd-416     [002] ...1.   232.864913: <stack trace>
 => ftrace_syscall_enter
 => syscall_trace_enter
 => do_syscall_64
 => entry_SYSCALL_64_after_hwframe

The root cause is that the trace framework disables preemption in __DO_TRACE before
invoking the trigger callback.

Use the tracing_gen_ctx_dec() that will accommodate for the increase of
the preemption count in __DO_TRACE when calling the callback. The result
is the accurate reporting of:

    sshd-410     [004] .....   210.117660: sys_read(fd: 4, buf: 559b725ba130, count: 40000)
    sshd-410     [004] .....   210.117662: <stack trace>
 => ftrace_syscall_enter
 => syscall_trace_enter
 => do_syscall_64
 => entry_SYSCALL_64_after_hwframe

Cc: stable@vger.kernel.org
Fixes: ce33c845b030c ("tracing: Dump stacktrace trigger to the corresponding instance")
Link: https://lore.kernel.org/20250512094246.1167956-1-dolinux.peng@gmail.com
Signed-off-by: pengdonglin <dolinux.peng@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/trace/trace_events_trigger.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/trace/trace_events_trigger.c
+++ b/kernel/trace/trace_events_trigger.c
@@ -1560,7 +1560,7 @@ stacktrace_trigger(struct event_trigger_
 	struct trace_event_file *file = data->private_data;
 
 	if (file)
-		__trace_stack(file->tr, tracing_gen_ctx(), STACK_SKIP);
+		__trace_stack(file->tr, tracing_gen_ctx_dec(), STACK_SKIP);
 	else
 		trace_dump_stack(STACK_SKIP);
 }



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 103/145] ftrace: Fix preemption accounting for stacktrace filter command
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (101 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 102/145] ftrace: Fix preemption accounting for stacktrace trigger command Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 104/145] x86/sev: Do not touch VMSA pages during SNP guest memory kdump Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, pengdonglin, Steven Rostedt (Google)

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: pengdonglin <pengdonglin@xiaomi.com>

commit 11aff32439df6ca5b3b891b43032faf88f4a6a29 upstream.

The preemption count of the stacktrace filter command to trace ksys_read
is consistently incorrect:

$ echo ksys_read:stacktrace > set_ftrace_filter

   <...>-453     [004] ...1.    38.308956: <stack trace>
=> ksys_read
=> do_syscall_64
=> entry_SYSCALL_64_after_hwframe

The root cause is that the trace framework disables preemption when
invoking the filter command callback in function_trace_probe_call:

   preempt_disable_notrace();
   probe_ops->func(ip, parent_ip, probe_opsbe->tr, probe_ops, probe->data);
   preempt_enable_notrace();

Use tracing_gen_ctx_dec() to account for the preempt_disable_notrace(),
which will output the correct preemption count:

$ echo ksys_read:stacktrace > set_ftrace_filter

   <...>-410     [006] .....    31.420396: <stack trace>
=> ksys_read
=> do_syscall_64
=> entry_SYSCALL_64_after_hwframe

Cc: stable@vger.kernel.org
Fixes: 36590c50b2d07 ("tracing: Merge irqflags + preempt counter.")
Link: https://lore.kernel.org/20250512094246.1167956-2-dolinux.peng@gmail.com
Signed-off-by: pengdonglin <dolinux.peng@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/trace/trace_functions.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/kernel/trace/trace_functions.c
+++ b/kernel/trace/trace_functions.c
@@ -597,11 +597,7 @@ ftrace_traceoff(unsigned long ip, unsign
 
 static __always_inline void trace_stack(struct trace_array *tr)
 {
-	unsigned int trace_ctx;
-
-	trace_ctx = tracing_gen_ctx();
-
-	__trace_stack(tr, trace_ctx, FTRACE_STACK_SKIP);
+	__trace_stack(tr, tracing_gen_ctx_dec(), FTRACE_STACK_SKIP);
 }
 
 static void



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 104/145] x86/sev: Do not touch VMSA pages during SNP guest memory kdump
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (102 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 103/145] ftrace: Fix preemption accounting for stacktrace filter command Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 105/145] x86/sev: Make sure pages are not skipped during kdump Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Ashish Kalra, Borislav Petkov (AMD),
	Pankaj Gupta, Tom Lendacky, Srikanth Aithal

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ashish Kalra <ashish.kalra@amd.com>

commit d2062cc1b1c367d5d019f595ef860159e1301351 upstream.

When kdump is running makedumpfile to generate vmcore and dump SNP guest
memory it touches the VMSA page of the vCPU executing kdump.

It then results in unrecoverable #NPF/RMP faults as the VMSA page is
marked busy/in-use when the vCPU is running and subsequently a causes
guest softlockup/hang.

Additionally, other APs may be halted in guest mode and their VMSA pages
are marked busy and touching these VMSA pages during guest memory dump
will also cause #NPF.

Issue AP_DESTROY GHCB calls on other APs to ensure they are kicked out
of guest mode and then clear the VMSA bit on their VMSA pages.

If the vCPU running kdump is an AP, mark it's VMSA page as offline to
ensure that makedumpfile excludes that page while dumping guest memory.

Fixes: 3074152e56c9 ("x86/sev: Convert shared memory back to private on kexec")
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Tested-by: Srikanth Aithal <sraithal@amd.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/20250428214151.155464-1-Ashish.Kalra@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/x86/coco/sev/core.c |  244 ++++++++++++++++++++++++++++++-----------------
 1 file changed, 158 insertions(+), 86 deletions(-)

--- a/arch/x86/coco/sev/core.c
+++ b/arch/x86/coco/sev/core.c
@@ -959,6 +959,102 @@ void snp_accept_memory(phys_addr_t start
 	set_pages_state(vaddr, npages, SNP_PAGE_STATE_PRIVATE);
 }
 
+static int vmgexit_ap_control(u64 event, struct sev_es_save_area *vmsa, u32 apic_id)
+{
+	bool create = event != SVM_VMGEXIT_AP_DESTROY;
+	struct ghcb_state state;
+	unsigned long flags;
+	struct ghcb *ghcb;
+	int ret = 0;
+
+	local_irq_save(flags);
+
+	ghcb = __sev_get_ghcb(&state);
+
+	vc_ghcb_invalidate(ghcb);
+
+	if (create)
+		ghcb_set_rax(ghcb, vmsa->sev_features);
+
+	ghcb_set_sw_exit_code(ghcb, SVM_VMGEXIT_AP_CREATION);
+	ghcb_set_sw_exit_info_1(ghcb,
+				((u64)apic_id << 32)	|
+				((u64)snp_vmpl << 16)	|
+				event);
+	ghcb_set_sw_exit_info_2(ghcb, __pa(vmsa));
+
+	sev_es_wr_ghcb_msr(__pa(ghcb));
+	VMGEXIT();
+
+	if (!ghcb_sw_exit_info_1_is_valid(ghcb) ||
+	    lower_32_bits(ghcb->save.sw_exit_info_1)) {
+		pr_err("SNP AP %s error\n", (create ? "CREATE" : "DESTROY"));
+		ret = -EINVAL;
+	}
+
+	__sev_put_ghcb(&state);
+
+	local_irq_restore(flags);
+
+	return ret;
+}
+
+static int snp_set_vmsa(void *va, void *caa, int apic_id, bool make_vmsa)
+{
+	int ret;
+
+	if (snp_vmpl) {
+		struct svsm_call call = {};
+		unsigned long flags;
+
+		local_irq_save(flags);
+
+		call.caa = this_cpu_read(svsm_caa);
+		call.rcx = __pa(va);
+
+		if (make_vmsa) {
+			/* Protocol 0, Call ID 2 */
+			call.rax = SVSM_CORE_CALL(SVSM_CORE_CREATE_VCPU);
+			call.rdx = __pa(caa);
+			call.r8  = apic_id;
+		} else {
+			/* Protocol 0, Call ID 3 */
+			call.rax = SVSM_CORE_CALL(SVSM_CORE_DELETE_VCPU);
+		}
+
+		ret = svsm_perform_call_protocol(&call);
+
+		local_irq_restore(flags);
+	} else {
+		/*
+		 * If the kernel runs at VMPL0, it can change the VMSA
+		 * bit for a page using the RMPADJUST instruction.
+		 * However, for the instruction to succeed it must
+		 * target the permissions of a lesser privileged (higher
+		 * numbered) VMPL level, so use VMPL1.
+		 */
+		u64 attrs = 1;
+
+		if (make_vmsa)
+			attrs |= RMPADJUST_VMSA_PAGE_BIT;
+
+		ret = rmpadjust((unsigned long)va, RMP_PG_SIZE_4K, attrs);
+	}
+
+	return ret;
+}
+
+static void snp_cleanup_vmsa(struct sev_es_save_area *vmsa, int apic_id)
+{
+	int err;
+
+	err = snp_set_vmsa(vmsa, NULL, apic_id, false);
+	if (err)
+		pr_err("clear VMSA page failed (%u), leaking page\n", err);
+	else
+		free_page((unsigned long)vmsa);
+}
+
 static void set_pte_enc(pte_t *kpte, int level, void *va)
 {
 	struct pte_enc_desc d = {
@@ -1055,6 +1151,65 @@ void snp_kexec_begin(void)
 		pr_warn("Failed to stop shared<->private conversions\n");
 }
 
+/*
+ * Shutdown all APs except the one handling kexec/kdump and clearing
+ * the VMSA tag on AP's VMSA pages as they are not being used as
+ * VMSA page anymore.
+ */
+static void shutdown_all_aps(void)
+{
+	struct sev_es_save_area *vmsa;
+	int apic_id, this_cpu, cpu;
+
+	this_cpu = get_cpu();
+
+	/*
+	 * APs are already in HLT loop when enc_kexec_finish() callback
+	 * is invoked.
+	 */
+	for_each_present_cpu(cpu) {
+		vmsa = per_cpu(sev_vmsa, cpu);
+
+		/*
+		 * The BSP or offlined APs do not have guest allocated VMSA
+		 * and there is no need  to clear the VMSA tag for this page.
+		 */
+		if (!vmsa)
+			continue;
+
+		/*
+		 * Cannot clear the VMSA tag for the currently running vCPU.
+		 */
+		if (this_cpu == cpu) {
+			unsigned long pa;
+			struct page *p;
+
+			pa = __pa(vmsa);
+			/*
+			 * Mark the VMSA page of the running vCPU as offline
+			 * so that is excluded and not touched by makedumpfile
+			 * while generating vmcore during kdump.
+			 */
+			p = pfn_to_online_page(pa >> PAGE_SHIFT);
+			if (p)
+				__SetPageOffline(p);
+			continue;
+		}
+
+		apic_id = cpuid_to_apicid[cpu];
+
+		/*
+		 * Issue AP destroy to ensure AP gets kicked out of guest mode
+		 * to allow using RMPADJUST to remove the VMSA tag on it's
+		 * VMSA page.
+		 */
+		vmgexit_ap_control(SVM_VMGEXIT_AP_DESTROY, vmsa, apic_id);
+		snp_cleanup_vmsa(vmsa, apic_id);
+	}
+
+	put_cpu();
+}
+
 void snp_kexec_finish(void)
 {
 	struct sev_es_runtime_data *data;
@@ -1069,6 +1224,8 @@ void snp_kexec_finish(void)
 	if (!IS_ENABLED(CONFIG_KEXEC_CORE))
 		return;
 
+	shutdown_all_aps();
+
 	unshare_all_memory();
 
 	/*
@@ -1090,51 +1247,6 @@ void snp_kexec_finish(void)
 	}
 }
 
-static int snp_set_vmsa(void *va, void *caa, int apic_id, bool make_vmsa)
-{
-	int ret;
-
-	if (snp_vmpl) {
-		struct svsm_call call = {};
-		unsigned long flags;
-
-		local_irq_save(flags);
-
-		call.caa = this_cpu_read(svsm_caa);
-		call.rcx = __pa(va);
-
-		if (make_vmsa) {
-			/* Protocol 0, Call ID 2 */
-			call.rax = SVSM_CORE_CALL(SVSM_CORE_CREATE_VCPU);
-			call.rdx = __pa(caa);
-			call.r8  = apic_id;
-		} else {
-			/* Protocol 0, Call ID 3 */
-			call.rax = SVSM_CORE_CALL(SVSM_CORE_DELETE_VCPU);
-		}
-
-		ret = svsm_perform_call_protocol(&call);
-
-		local_irq_restore(flags);
-	} else {
-		/*
-		 * If the kernel runs at VMPL0, it can change the VMSA
-		 * bit for a page using the RMPADJUST instruction.
-		 * However, for the instruction to succeed it must
-		 * target the permissions of a lesser privileged (higher
-		 * numbered) VMPL level, so use VMPL1.
-		 */
-		u64 attrs = 1;
-
-		if (make_vmsa)
-			attrs |= RMPADJUST_VMSA_PAGE_BIT;
-
-		ret = rmpadjust((unsigned long)va, RMP_PG_SIZE_4K, attrs);
-	}
-
-	return ret;
-}
-
 #define __ATTR_BASE		(SVM_SELECTOR_P_MASK | SVM_SELECTOR_S_MASK)
 #define INIT_CS_ATTRIBS		(__ATTR_BASE | SVM_SELECTOR_READ_MASK | SVM_SELECTOR_CODE_MASK)
 #define INIT_DS_ATTRIBS		(__ATTR_BASE | SVM_SELECTOR_WRITE_MASK)
@@ -1166,24 +1278,10 @@ static void *snp_alloc_vmsa_page(int cpu
 	return page_address(p + 1);
 }
 
-static void snp_cleanup_vmsa(struct sev_es_save_area *vmsa, int apic_id)
-{
-	int err;
-
-	err = snp_set_vmsa(vmsa, NULL, apic_id, false);
-	if (err)
-		pr_err("clear VMSA page failed (%u), leaking page\n", err);
-	else
-		free_page((unsigned long)vmsa);
-}
-
 static int wakeup_cpu_via_vmgexit(u32 apic_id, unsigned long start_ip)
 {
 	struct sev_es_save_area *cur_vmsa, *vmsa;
-	struct ghcb_state state;
 	struct svsm_ca *caa;
-	unsigned long flags;
-	struct ghcb *ghcb;
 	u8 sipi_vector;
 	int cpu, ret;
 	u64 cr4;
@@ -1297,33 +1395,7 @@ static int wakeup_cpu_via_vmgexit(u32 ap
 	}
 
 	/* Issue VMGEXIT AP Creation NAE event */
-	local_irq_save(flags);
-
-	ghcb = __sev_get_ghcb(&state);
-
-	vc_ghcb_invalidate(ghcb);
-	ghcb_set_rax(ghcb, vmsa->sev_features);
-	ghcb_set_sw_exit_code(ghcb, SVM_VMGEXIT_AP_CREATION);
-	ghcb_set_sw_exit_info_1(ghcb,
-				((u64)apic_id << 32)	|
-				((u64)snp_vmpl << 16)	|
-				SVM_VMGEXIT_AP_CREATE);
-	ghcb_set_sw_exit_info_2(ghcb, __pa(vmsa));
-
-	sev_es_wr_ghcb_msr(__pa(ghcb));
-	VMGEXIT();
-
-	if (!ghcb_sw_exit_info_1_is_valid(ghcb) ||
-	    lower_32_bits(ghcb->save.sw_exit_info_1)) {
-		pr_err("SNP AP Creation error\n");
-		ret = -EINVAL;
-	}
-
-	__sev_put_ghcb(&state);
-
-	local_irq_restore(flags);
-
-	/* Perform cleanup if there was an error */
+	ret = vmgexit_ap_control(SVM_VMGEXIT_AP_CREATE, vmsa, apic_id);
 	if (ret) {
 		snp_cleanup_vmsa(vmsa, apic_id);
 		vmsa = NULL;



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 105/145] x86/sev: Make sure pages are not skipped during kdump
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (103 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 104/145] x86/sev: Do not touch VMSA pages during SNP guest memory kdump Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 106/145] tracing: samples: Initialize trace_array_printk() with the correct function Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Ashish Kalra, Borislav Petkov (AMD),
	Tom Lendacky, Srikanth Aithal

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ashish Kalra <ashish.kalra@amd.com>

commit 82b7f88f2316c5442708daeb0b5ec5aa54c8ff7f upstream.

When shared pages are being converted to private during kdump, additional
checks are performed. They include handling the case of a GHCB page being
contained within a huge page.

Currently, this check incorrectly skips a page just below the GHCB page from
being transitioned back to private during kdump preparation.

This skipped page causes a 0x404 #VC exception when it is accessed later while
dumping guest memory for vmcore generation.

Correct the range to be checked for GHCB contained in a huge page.  Also,
ensure that the skipped huge page containing the GHCB page is transitioned
back to private by applying the correct address mask later when changing GHCBs
to private at end of kdump preparation.

  [ bp: Massage commit message. ]

Fixes: 3074152e56c9 ("x86/sev: Convert shared memory back to private on kexec")
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Tested-by: Srikanth Aithal <sraithal@amd.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/20250506183529.289549-1-Ashish.Kalra@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/x86/coco/sev/core.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c
index 41060ba41b5c..36beaac713c1 100644
--- a/arch/x86/coco/sev/core.c
+++ b/arch/x86/coco/sev/core.c
@@ -1101,7 +1101,8 @@ static void unshare_all_memory(void)
 			data = per_cpu(runtime_data, cpu);
 			ghcb = (unsigned long)&data->ghcb_page;
 
-			if (addr <= ghcb && ghcb <= addr + size) {
+			/* Handle the case of a huge page containing the GHCB page */
+			if (addr <= ghcb && ghcb < addr + size) {
 				skipped_addr = true;
 				break;
 			}
@@ -1213,8 +1214,8 @@ static void shutdown_all_aps(void)
 void snp_kexec_finish(void)
 {
 	struct sev_es_runtime_data *data;
+	unsigned long size, addr;
 	unsigned int level, cpu;
-	unsigned long size;
 	struct ghcb *ghcb;
 	pte_t *pte;
 
@@ -1242,8 +1243,10 @@ void snp_kexec_finish(void)
 		ghcb = &data->ghcb_page;
 		pte = lookup_address((unsigned long)ghcb, &level);
 		size = page_level_size(level);
-		set_pte_enc(pte, level, (void *)ghcb);
-		snp_set_memory_private((unsigned long)ghcb, (size / PAGE_SIZE));
+		/* Handle the case of a huge page containing the GHCB page */
+		addr = (unsigned long)ghcb & page_level_mask(level);
+		set_pte_enc(pte, level, (void *)addr);
+		snp_set_memory_private(addr, (size / PAGE_SIZE));
 	}
 }
 
-- 
2.49.0




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 106/145] tracing: samples: Initialize trace_array_printk() with the correct function
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (104 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 105/145] x86/sev: Make sure pages are not skipped during kdump Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 107/145] phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Masami Hiramatsu, Mathieu Desnoyers,
	Divya Indi, Steven Rostedt (Google)

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Steven Rostedt <rostedt@goodmis.org>

commit 1b0c192c92ea1fe2dcb178f84adf15fe37c3e7c8 upstream.

When using trace_array_printk() on a created instance, the correct
function to use to initialize it is:

  trace_array_init_printk()

Not

  trace_printk_init_buffer()

The former is a proper function to use, the latter is for initializing
trace_printk() and causes the NOTICE banner to be displayed.

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Divya Indi <divya.indi@oracle.com>
Link: https://lore.kernel.org/20250509152657.0f6744d9@gandalf.local.home
Fixes: 89ed42495ef4a ("tracing: Sample module to demonstrate kernel access to Ftrace instances.")
Fixes: 38ce2a9e33db6 ("tracing: Add trace_array_init_printk() to initialize instance trace_printk() buffers")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 samples/ftrace/sample-trace-array.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/samples/ftrace/sample-trace-array.c
+++ b/samples/ftrace/sample-trace-array.c
@@ -112,7 +112,7 @@ static int __init sample_trace_array_ini
 	/*
 	 * If context specific per-cpu buffers havent already been allocated.
 	 */
-	trace_printk_init_buffers();
+	trace_array_init_printk(tr);
 
 	simple_tsk = kthread_run(simple_thread, NULL, "sample-instance");
 	if (IS_ERR(simple_tsk)) {



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 107/145] phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (105 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 106/145] tracing: samples: Initialize trace_array_printk() with the correct function Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 108/145] phy: Fix error handling in tegra_xusb_port_init Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Wayne Chang, Jon Hunter, Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wayne Chang <waynec@nvidia.com>

commit b47158fb42959c417ff2662075c0d46fb783d5d1 upstream.

The current implementation uses bias_pad_enable as a reference count to
manage the shared bias pad for all UTMI PHYs. However, during system
suspension with connected USB devices, multiple power-down requests for
the UTMI pad result in a mismatch in the reference count, which in turn
produces warnings such as:

[  237.762967] WARNING: CPU: 10 PID: 1618 at tegra186_utmi_pad_power_down+0x160/0x170
[  237.763103] Call trace:
[  237.763104]  tegra186_utmi_pad_power_down+0x160/0x170
[  237.763107]  tegra186_utmi_phy_power_off+0x10/0x30
[  237.763110]  phy_power_off+0x48/0x100
[  237.763113]  tegra_xusb_enter_elpg+0x204/0x500
[  237.763119]  tegra_xusb_suspend+0x48/0x140
[  237.763122]  platform_pm_suspend+0x2c/0xb0
[  237.763125]  dpm_run_callback.isra.0+0x20/0xa0
[  237.763127]  __device_suspend+0x118/0x330
[  237.763129]  dpm_suspend+0x10c/0x1f0
[  237.763130]  dpm_suspend_start+0x88/0xb0
[  237.763132]  suspend_devices_and_enter+0x120/0x500
[  237.763135]  pm_suspend+0x1ec/0x270

The root cause was traced back to the dynamic power-down changes
introduced in commit a30951d31b25 ("xhci: tegra: USB2 pad power controls"),
where the UTMI pad was being powered down without verifying its current
state. This unbalanced behavior led to discrepancies in the reference
count.

To rectify this issue, this patch replaces the single reference counter
with a bitmask, renamed to utmi_pad_enabled. Each bit in the mask
corresponds to one of the four USB2 PHYs, allowing us to track each pad's
enablement status individually.

With this change:
  - The bias pad is powered on only when the mask is clear.
  - Each UTMI pad is powered on or down based on its corresponding bit
    in the mask, preventing redundant operations.
  - The overall power state of the shared bias pad is maintained
    correctly during suspend/resume cycles.

The mutex used to prevent race conditions during UTMI pad enable/disable
operations has been moved from the tegra186_utmi_bias_pad_power_on/off
functions to the parent functions tegra186_utmi_pad_power_on/down. This
change ensures that there are no race conditions when updating the bitmask.

Cc: stable@vger.kernel.org
Fixes: a30951d31b25 ("xhci: tegra: USB2 pad power controls")
Signed-off-by: Wayne Chang <waynec@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20250408030905.990474-1-waynec@nvidia.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/phy/tegra/xusb-tegra186.c |   44 +++++++++++++++++++++++---------------
 1 file changed, 27 insertions(+), 17 deletions(-)

--- a/drivers/phy/tegra/xusb-tegra186.c
+++ b/drivers/phy/tegra/xusb-tegra186.c
@@ -237,6 +237,8 @@
 #define   DATA0_VAL_PD				BIT(1)
 #define   USE_XUSB_AO				BIT(4)
 
+#define TEGRA_UTMI_PAD_MAX 4
+
 #define TEGRA186_LANE(_name, _offset, _shift, _mask, _type)		\
 	{								\
 		.name = _name,						\
@@ -269,7 +271,7 @@ struct tegra186_xusb_padctl {
 
 	/* UTMI bias and tracking */
 	struct clk *usb2_trk_clk;
-	unsigned int bias_pad_enable;
+	DECLARE_BITMAP(utmi_pad_enabled, TEGRA_UTMI_PAD_MAX);
 
 	/* padctl context */
 	struct tegra186_xusb_padctl_context context;
@@ -603,12 +605,8 @@ static void tegra186_utmi_bias_pad_power
 	u32 value;
 	int err;
 
-	mutex_lock(&padctl->lock);
-
-	if (priv->bias_pad_enable++ > 0) {
-		mutex_unlock(&padctl->lock);
+	if (!bitmap_empty(priv->utmi_pad_enabled, TEGRA_UTMI_PAD_MAX))
 		return;
-	}
 
 	err = clk_prepare_enable(priv->usb2_trk_clk);
 	if (err < 0)
@@ -667,17 +665,8 @@ static void tegra186_utmi_bias_pad_power
 	struct tegra186_xusb_padctl *priv = to_tegra186_xusb_padctl(padctl);
 	u32 value;
 
-	mutex_lock(&padctl->lock);
-
-	if (WARN_ON(priv->bias_pad_enable == 0)) {
-		mutex_unlock(&padctl->lock);
-		return;
-	}
-
-	if (--priv->bias_pad_enable > 0) {
-		mutex_unlock(&padctl->lock);
+	if (!bitmap_empty(priv->utmi_pad_enabled, TEGRA_UTMI_PAD_MAX))
 		return;
-	}
 
 	value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL1);
 	value |= USB2_PD_TRK;
@@ -690,13 +679,13 @@ static void tegra186_utmi_bias_pad_power
 		clk_disable_unprepare(priv->usb2_trk_clk);
 	}
 
-	mutex_unlock(&padctl->lock);
 }
 
 static void tegra186_utmi_pad_power_on(struct phy *phy)
 {
 	struct tegra_xusb_lane *lane = phy_get_drvdata(phy);
 	struct tegra_xusb_padctl *padctl = lane->pad->padctl;
+	struct tegra186_xusb_padctl *priv = to_tegra186_xusb_padctl(padctl);
 	struct tegra_xusb_usb2_port *port;
 	struct device *dev = padctl->dev;
 	unsigned int index = lane->index;
@@ -705,9 +694,16 @@ static void tegra186_utmi_pad_power_on(s
 	if (!phy)
 		return;
 
+	mutex_lock(&padctl->lock);
+	if (test_bit(index, priv->utmi_pad_enabled)) {
+		mutex_unlock(&padctl->lock);
+		return;
+	}
+
 	port = tegra_xusb_find_usb2_port(padctl, index);
 	if (!port) {
 		dev_err(dev, "no port found for USB2 lane %u\n", index);
+		mutex_unlock(&padctl->lock);
 		return;
 	}
 
@@ -724,18 +720,28 @@ static void tegra186_utmi_pad_power_on(s
 	value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index));
 	value &= ~USB2_OTG_PD_DR;
 	padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index));
+
+	set_bit(index, priv->utmi_pad_enabled);
+	mutex_unlock(&padctl->lock);
 }
 
 static void tegra186_utmi_pad_power_down(struct phy *phy)
 {
 	struct tegra_xusb_lane *lane = phy_get_drvdata(phy);
 	struct tegra_xusb_padctl *padctl = lane->pad->padctl;
+	struct tegra186_xusb_padctl *priv = to_tegra186_xusb_padctl(padctl);
 	unsigned int index = lane->index;
 	u32 value;
 
 	if (!phy)
 		return;
 
+	mutex_lock(&padctl->lock);
+	if (!test_bit(index, priv->utmi_pad_enabled)) {
+		mutex_unlock(&padctl->lock);
+		return;
+	}
+
 	dev_dbg(padctl->dev, "power down UTMI pad %u\n", index);
 
 	value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index));
@@ -748,7 +754,11 @@ static void tegra186_utmi_pad_power_down
 
 	udelay(2);
 
+	clear_bit(index, priv->utmi_pad_enabled);
+
 	tegra186_utmi_bias_pad_power_off(padctl);
+
+	mutex_unlock(&padctl->lock);
 }
 
 static int tegra186_xusb_padctl_vbus_override(struct tegra_xusb_padctl *padctl,



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 108/145] phy: Fix error handling in tegra_xusb_port_init
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (106 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 107/145] phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 109/145] net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Ma Ke, Thierry Reding, Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ma Ke <make24@iscas.ac.cn>

commit b2ea5f49580c0762d17d80d8083cb89bc3acf74f upstream.

If device_add() fails, do not use device_unregister() for error
handling. device_unregister() consists two functions: device_del() and
put_device(). device_unregister() should only be called after
device_add() succeeded because device_del() undoes what device_add()
does if successful. Change device_unregister() to put_device() call
before returning from the function.

As comment of device_add() says, 'if device_add() succeeds, you should
call device_del() when you want to get rid of it. If device_add() has
not succeeded, use only put_device() to drop the reference count'.

Found by code review.

Cc: stable@vger.kernel.org
Fixes: 53d2a715c240 ("phy: Add Tegra XUSB pad controller support")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250303072739.3874987-1-make24@iscas.ac.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/phy/tegra/xusb.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -548,16 +548,16 @@ static int tegra_xusb_port_init(struct t
 
 	err = dev_set_name(&port->dev, "%s-%u", name, index);
 	if (err < 0)
-		goto unregister;
+		goto put_device;
 
 	err = device_add(&port->dev);
 	if (err < 0)
-		goto unregister;
+		goto put_device;
 
 	return 0;
 
-unregister:
-	device_unregister(&port->dev);
+put_device:
+	put_device(&port->dev);
 	return err;
 }
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 109/145] net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (107 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 108/145] phy: Fix error handling in tegra_xusb_port_init Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 110/145] net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Oleksij Rempel, Paolo Abeni

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Oleksij Rempel <o.rempel@pengutronix.de>

commit 76ca05e0abe31a4f47a5b5a85041b5a22c03baf8 upstream.

Phylink expects MAC drivers to provide LPI callbacks to properly manage
Energy Efficient Ethernet (EEE) configuration. On KSZ switches with
integrated PHYs, LPI is internally handled by hardware, while ports
without integrated PHYs have no documented MAC-level LPI support.

Provide dummy mac_disable_tx_lpi() and mac_enable_tx_lpi() callbacks to
satisfy phylink requirements. Also, set default EEE capabilities during
phylink initialization where applicable.

Since phylink can now gracefully handle optional EEE configuration,
remove the need for the MICREL_NO_EEE PHY flag.

This change addresses issues caused by incomplete EEE refactoring
introduced in commit fe0d4fd9285e ("net: phy: Keep track of EEE
configuration"). It is not easily possible to fix all older kernels, but
this patch ensures proper behavior on latest kernels and can be
considered for backporting to stable kernels starting from v6.14.

Fixes: fe0d4fd9285e ("net: phy: Keep track of EEE configuration")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: stable@vger.kernel.org # v6.14+
Link: https://patch.msgid.link/20250504081434.424489-2-o.rempel@pengutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/dsa/microchip/ksz_common.c |  135 ++++++++++++++++++++++++++-------
 1 file changed, 107 insertions(+), 28 deletions(-)

--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -265,16 +265,70 @@ static void ksz_phylink_mac_link_down(st
 				      unsigned int mode,
 				      phy_interface_t interface);
 
+/**
+ * ksz_phylink_mac_disable_tx_lpi() - Callback to signal LPI support (Dummy)
+ * @config: phylink config structure
+ *
+ * This function is a dummy handler. See ksz_phylink_mac_enable_tx_lpi() for
+ * a detailed explanation of EEE/LPI handling in KSZ switches.
+ */
+static void ksz_phylink_mac_disable_tx_lpi(struct phylink_config *config)
+{
+}
+
+/**
+ * ksz_phylink_mac_enable_tx_lpi() - Callback to signal LPI support (Dummy)
+ * @config: phylink config structure
+ * @timer: timer value before entering LPI (unused)
+ * @tx_clock_stop: whether to stop the TX clock in LPI mode (unused)
+ *
+ * This function signals to phylink that the driver architecture supports
+ * LPI management, enabling phylink to control EEE advertisement during
+ * negotiation according to IEEE Std 802.3 (Clause 78).
+ *
+ * Hardware Management of EEE/LPI State:
+ * For KSZ switch ports with integrated PHYs (e.g., KSZ9893R ports 1-2),
+ * observation and testing suggest that the actual EEE / Low Power Idle (LPI)
+ * state transitions are managed autonomously by the hardware based on
+ * the auto-negotiation results. (Note: While the datasheet describes EEE
+ * operation based on negotiation, it doesn't explicitly detail the internal
+ * MAC/PHY interaction, so autonomous hardware management of the MAC state
+ * for LPI is inferred from observed behavior).
+ * This hardware control, consistent with the switch's ability to operate
+ * autonomously via strapping, means MAC-level software intervention is not
+ * required or exposed for managing the LPI state once EEE is negotiated.
+ * (Ref: KSZ9893R Data Sheet DS00002420D, primarily Section 4.7.5 explaining
+ * EEE, also Sections 4.1.7 on Auto-Negotiation and 3.2.1 on Configuration
+ * Straps).
+ *
+ * Additionally, ports configured as MAC interfaces (e.g., KSZ9893R port 3)
+ * lack documented MAC-level LPI control.
+ *
+ * Therefore, this callback performs no action and serves primarily to inform
+ * phylink of LPI awareness and to document the inferred hardware behavior.
+ *
+ * Returns: 0 (Always success)
+ */
+static int ksz_phylink_mac_enable_tx_lpi(struct phylink_config *config,
+					 u32 timer, bool tx_clock_stop)
+{
+	return 0;
+}
+
 static const struct phylink_mac_ops ksz88x3_phylink_mac_ops = {
 	.mac_config	= ksz88x3_phylink_mac_config,
 	.mac_link_down	= ksz_phylink_mac_link_down,
 	.mac_link_up	= ksz8_phylink_mac_link_up,
+	.mac_disable_tx_lpi = ksz_phylink_mac_disable_tx_lpi,
+	.mac_enable_tx_lpi = ksz_phylink_mac_enable_tx_lpi,
 };
 
 static const struct phylink_mac_ops ksz8_phylink_mac_ops = {
 	.mac_config	= ksz_phylink_mac_config,
 	.mac_link_down	= ksz_phylink_mac_link_down,
 	.mac_link_up	= ksz8_phylink_mac_link_up,
+	.mac_disable_tx_lpi = ksz_phylink_mac_disable_tx_lpi,
+	.mac_enable_tx_lpi = ksz_phylink_mac_enable_tx_lpi,
 };
 
 static const struct ksz_dev_ops ksz88xx_dev_ops = {
@@ -358,6 +412,8 @@ static const struct phylink_mac_ops ksz9
 	.mac_config	= ksz_phylink_mac_config,
 	.mac_link_down	= ksz_phylink_mac_link_down,
 	.mac_link_up	= ksz9477_phylink_mac_link_up,
+	.mac_disable_tx_lpi = ksz_phylink_mac_disable_tx_lpi,
+	.mac_enable_tx_lpi = ksz_phylink_mac_enable_tx_lpi,
 };
 
 static const struct ksz_dev_ops ksz9477_dev_ops = {
@@ -401,6 +457,8 @@ static const struct phylink_mac_ops lan9
 	.mac_config	= ksz_phylink_mac_config,
 	.mac_link_down	= ksz_phylink_mac_link_down,
 	.mac_link_up	= ksz9477_phylink_mac_link_up,
+	.mac_disable_tx_lpi = ksz_phylink_mac_disable_tx_lpi,
+	.mac_enable_tx_lpi = ksz_phylink_mac_enable_tx_lpi,
 };
 
 static const struct ksz_dev_ops lan937x_dev_ops = {
@@ -2016,6 +2074,18 @@ static void ksz_phylink_get_caps(struct
 
 	if (dev->dev_ops->get_caps)
 		dev->dev_ops->get_caps(dev, port, config);
+
+	if (ds->ops->support_eee && ds->ops->support_eee(ds, port)) {
+		memcpy(config->lpi_interfaces, config->supported_interfaces,
+		       sizeof(config->lpi_interfaces));
+
+		config->lpi_capabilities = MAC_100FD;
+		if (dev->info->gbit_capable[port])
+			config->lpi_capabilities |= MAC_1000FD;
+
+		/* EEE is fully operational */
+		config->eee_enabled_default = true;
+	}
 }
 
 void ksz_r_mib_stats64(struct ksz_device *dev, int port)
@@ -3008,31 +3078,6 @@ static u32 ksz_get_phy_flags(struct dsa_
 		if (!port)
 			return MICREL_KSZ8_P1_ERRATA;
 		break;
-	case KSZ8567_CHIP_ID:
-		/* KSZ8567R Errata DS80000752C Module 4 */
-	case KSZ8765_CHIP_ID:
-	case KSZ8794_CHIP_ID:
-	case KSZ8795_CHIP_ID:
-		/* KSZ879x/KSZ877x/KSZ876x Errata DS80000687C Module 2 */
-	case KSZ9477_CHIP_ID:
-		/* KSZ9477S Errata DS80000754A Module 4 */
-	case KSZ9567_CHIP_ID:
-		/* KSZ9567S Errata DS80000756A Module 4 */
-	case KSZ9896_CHIP_ID:
-		/* KSZ9896C Errata DS80000757A Module 3 */
-	case KSZ9897_CHIP_ID:
-	case LAN9646_CHIP_ID:
-		/* KSZ9897R Errata DS80000758C Module 4 */
-		/* Energy Efficient Ethernet (EEE) feature select must be manually disabled
-		 *   The EEE feature is enabled by default, but it is not fully
-		 *   operational. It must be manually disabled through register
-		 *   controls. If not disabled, the PHY ports can auto-negotiate
-		 *   to enable EEE, and this feature can cause link drops when
-		 *   linked to another device supporting EEE.
-		 *
-		 * The same item appears in the errata for all switches above.
-		 */
-		return MICREL_NO_EEE;
 	}
 
 	return 0;
@@ -3466,6 +3511,20 @@ static int ksz_max_mtu(struct dsa_switch
 	return -EOPNOTSUPP;
 }
 
+/**
+ * ksz_support_eee - Determine Energy Efficient Ethernet (EEE) support for a
+ *                   port
+ * @ds: Pointer to the DSA switch structure
+ * @port: Port number to check
+ *
+ * This function also documents devices where EEE was initially advertised but
+ * later withdrawn due to reliability issues, as described in official errata
+ * documents. These devices are explicitly listed to record known limitations,
+ * even if there is no technical necessity for runtime checks.
+ *
+ * Returns: true if the internal PHY on the given port supports fully
+ * operational EEE, false otherwise.
+ */
 static bool ksz_support_eee(struct dsa_switch *ds, int port)
 {
 	struct ksz_device *dev = ds->priv;
@@ -3475,15 +3534,35 @@ static bool ksz_support_eee(struct dsa_s
 
 	switch (dev->chip_id) {
 	case KSZ8563_CHIP_ID:
+	case KSZ9563_CHIP_ID:
+	case KSZ9893_CHIP_ID:
+		return true;
 	case KSZ8567_CHIP_ID:
+		/* KSZ8567R Errata DS80000752C Module 4 */
+	case KSZ8765_CHIP_ID:
+	case KSZ8794_CHIP_ID:
+	case KSZ8795_CHIP_ID:
+		/* KSZ879x/KSZ877x/KSZ876x Errata DS80000687C Module 2 */
 	case KSZ9477_CHIP_ID:
-	case KSZ9563_CHIP_ID:
+		/* KSZ9477S Errata DS80000754A Module 4 */
 	case KSZ9567_CHIP_ID:
-	case KSZ9893_CHIP_ID:
+		/* KSZ9567S Errata DS80000756A Module 4 */
 	case KSZ9896_CHIP_ID:
+		/* KSZ9896C Errata DS80000757A Module 3 */
 	case KSZ9897_CHIP_ID:
 	case LAN9646_CHIP_ID:
-		return true;
+		/* KSZ9897R Errata DS80000758C Module 4 */
+		/* Energy Efficient Ethernet (EEE) feature select must be
+		 * manually disabled
+		 *   The EEE feature is enabled by default, but it is not fully
+		 *   operational. It must be manually disabled through register
+		 *   controls. If not disabled, the PHY ports can auto-negotiate
+		 *   to enable EEE, and this feature can cause link drops when
+		 *   linked to another device supporting EEE.
+		 *
+		 * The same item appears in the errata for all switches above.
+		 */
+		break;
 	}
 
 	return false;



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 110/145] net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (108 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 109/145] net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 111/145] phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Oleksij Rempel, Paolo Abeni

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Oleksij Rempel <o.rempel@pengutronix.de>

commit 8c619eb21b8e87ae95877e9cca9fcb0e3115776e upstream.

The KSZ9477 PHY driver contained workarounds for broken EEE capability
advertisements by manually masking supported EEE modes and forcibly
disabling EEE if MICREL_NO_EEE was set.

With proper MAC-side EEE handling implemented via phylink, these quirks
are no longer necessary. Remove MICREL_NO_EEE handling and the use of
ksz9477_get_features().

This simplifies the PHY driver and avoids duplicated EEE management logic.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: stable@vger.kernel.org # v6.14+
Link: https://patch.msgid.link/20250504081434.424489-3-o.rempel@pengutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/phy/micrel.c   |    7 -------
 include/linux/micrel_phy.h |    1 -
 2 files changed, 8 deletions(-)

--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -2002,12 +2002,6 @@ static int ksz9477_config_init(struct ph
 			return err;
 	}
 
-	/* According to KSZ9477 Errata DS80000754C (Module 4) all EEE modes
-	 * in this switch shall be regarded as broken.
-	 */
-	if (phydev->dev_flags & MICREL_NO_EEE)
-		phy_disable_eee(phydev);
-
 	return kszphy_config_init(phydev);
 }
 
@@ -5680,7 +5674,6 @@ static struct phy_driver ksphy_driver[]
 	.handle_interrupt = kszphy_handle_interrupt,
 	.suspend	= genphy_suspend,
 	.resume		= ksz9477_resume,
-	.get_features	= ksz9477_get_features,
 } };
 
 module_phy_driver(ksphy_driver);
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -44,7 +44,6 @@
 #define MICREL_PHY_50MHZ_CLK	BIT(0)
 #define MICREL_PHY_FXEN		BIT(1)
 #define MICREL_KSZ8_P1_ERRATA	BIT(2)
-#define MICREL_NO_EEE		BIT(3)
 
 #define MICREL_KSZ9021_EXTREG_CTRL	0xB
 #define MICREL_KSZ9021_EXTREG_DATA_WRITE	0xC



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 111/145] phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (109 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 110/145] net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 112/145] phy: renesas: rcar-gen3-usb2: Set timing registers only once Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Yoshihiro Shimoda, Lad Prabhakar,
	Claudiu Beznea, Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 54c4c58713aaff76c2422ff5750e557ab3b100d7 upstream.

It has been observed on the Renesas RZ/G3S SoC that unbinding and binding
the PHY driver leads to role autodetection failures. This issue occurs when
PHY 3 is the first initialized PHY. PHY 3 does not have an interrupt
associated with the USB2_INT_ENABLE register (as
rcar_gen3_int_enable[3] = 0). As a result, rcar_gen3_init_otg() is called
to initialize OTG without enabling PHY interrupts.

To resolve this, add rcar_gen3_is_any_otg_rphy_initialized() and call it in
role_store(), role_show(), and rcar_gen3_init_otg(). At the same time,
rcar_gen3_init_otg() is only called when initialization for a PHY with
interrupt bits is in progress. As a result, the
struct rcar_gen3_phy::otg_initialized is no longer needed.

Fixes: 549b6b55b005 ("phy: renesas: rcar-gen3-usb2: enable/disable independent irqs")
Cc: stable@vger.kernel.org
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/r/20250507125032.565017-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/phy/renesas/phy-rcar-gen3-usb2.c |   33 +++++++++++++------------------
 1 file changed, 14 insertions(+), 19 deletions(-)

--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -107,7 +107,6 @@ struct rcar_gen3_phy {
 	struct rcar_gen3_chan *ch;
 	u32 int_enable_bits;
 	bool initialized;
-	bool otg_initialized;
 	bool powered;
 };
 
@@ -320,16 +319,15 @@ static bool rcar_gen3_is_any_rphy_initia
 	return false;
 }
 
-static bool rcar_gen3_needs_init_otg(struct rcar_gen3_chan *ch)
+static bool rcar_gen3_is_any_otg_rphy_initialized(struct rcar_gen3_chan *ch)
 {
-	int i;
-
-	for (i = 0; i < NUM_OF_PHYS; i++) {
-		if (ch->rphys[i].otg_initialized)
-			return false;
+	for (enum rcar_gen3_phy_index i = PHY_INDEX_BOTH_HC; i <= PHY_INDEX_EHCI;
+	     i++) {
+		if (ch->rphys[i].initialized)
+			return true;
 	}
 
-	return true;
+	return false;
 }
 
 static bool rcar_gen3_are_all_rphys_power_off(struct rcar_gen3_chan *ch)
@@ -351,7 +349,7 @@ static ssize_t role_store(struct device
 	bool is_b_device;
 	enum phy_mode cur_mode, new_mode;
 
-	if (!ch->is_otg_channel || !rcar_gen3_is_any_rphy_initialized(ch))
+	if (!ch->is_otg_channel || !rcar_gen3_is_any_otg_rphy_initialized(ch))
 		return -EIO;
 
 	if (sysfs_streq(buf, "host"))
@@ -389,7 +387,7 @@ static ssize_t role_show(struct device *
 {
 	struct rcar_gen3_chan *ch = dev_get_drvdata(dev);
 
-	if (!ch->is_otg_channel || !rcar_gen3_is_any_rphy_initialized(ch))
+	if (!ch->is_otg_channel || !rcar_gen3_is_any_otg_rphy_initialized(ch))
 		return -EIO;
 
 	return sprintf(buf, "%s\n", rcar_gen3_is_host(ch) ? "host" :
@@ -402,6 +400,9 @@ static void rcar_gen3_init_otg(struct rc
 	void __iomem *usb2_base = ch->base;
 	u32 val;
 
+	if (!ch->is_otg_channel || rcar_gen3_is_any_otg_rphy_initialized(ch))
+		return;
+
 	/* Should not use functions of read-modify-write a register */
 	val = readl(usb2_base + USB2_LINECTRL1);
 	val = (val & ~USB2_LINECTRL1_DP_RPD) | USB2_LINECTRL1_DPRPD_EN |
@@ -465,12 +466,9 @@ static int rcar_gen3_phy_usb2_init(struc
 	writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET);
 	writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET);
 
-	/* Initialize otg part */
-	if (channel->is_otg_channel) {
-		if (rcar_gen3_needs_init_otg(channel))
-			rcar_gen3_init_otg(channel);
-		rphy->otg_initialized = true;
-	}
+	/* Initialize otg part (only if we initialize a PHY with IRQs). */
+	if (rphy->int_enable_bits)
+		rcar_gen3_init_otg(channel);
 
 	rphy->initialized = true;
 
@@ -486,9 +484,6 @@ static int rcar_gen3_phy_usb2_exit(struc
 
 	rphy->initialized = false;
 
-	if (channel->is_otg_channel)
-		rphy->otg_initialized = false;
-
 	val = readl(usb2_base + USB2_INT_ENABLE);
 	val &= ~rphy->int_enable_bits;
 	if (!rcar_gen3_is_any_rphy_initialized(channel))



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 112/145] phy: renesas: rcar-gen3-usb2: Set timing registers only once
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (110 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 111/145] phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 113/145] scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Yoshihiro Shimoda, Lad Prabhakar,
	Claudiu Beznea, Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

commit 86e70849f4b2b4597ac9f7c7931f2a363774be25 upstream.

phy-rcar-gen3-usb2 driver exports 4 PHYs. The timing registers are common
to all PHYs. There is no need to set them every time a PHY is initialized.
Set timing register only when the 1st PHY is initialized.

Fixes: f3b5a8d9b50d ("phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver")
Cc: stable@vger.kernel.org
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/r/20250507125032.565017-6-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/phy/renesas/phy-rcar-gen3-usb2.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -463,8 +463,11 @@ static int rcar_gen3_phy_usb2_init(struc
 	val = readl(usb2_base + USB2_INT_ENABLE);
 	val |= USB2_INT_ENABLE_UCOM_INTEN | rphy->int_enable_bits;
 	writel(val, usb2_base + USB2_INT_ENABLE);
-	writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET);
-	writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET);
+
+	if (!rcar_gen3_is_any_rphy_initialized(channel)) {
+		writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET);
+		writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET);
+	}
 
 	/* Initialize otg part (only if we initialize a PHY with IRQs). */
 	if (rphy->int_enable_bits)



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 113/145] scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (111 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 112/145] phy: renesas: rcar-gen3-usb2: Set timing registers only once Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 114/145] smb: client: fix memory leak during error handling for POSIX mkdir Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Steve Siwinski, Damien Le Moal,
	Martin K. Petersen

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Steve Siwinski <ssiwinski@atto.com>

commit e8007fad5457ea547ca63bb011fdb03213571c7e upstream.

The REPORT ZONES buffer size is currently limited by the HBA's maximum
segment count to ensure the buffer can be mapped. However, the block
layer further limits the number of iovec entries to 1024 when allocating
a bio.

To avoid allocation of buffers too large to be mapped, further restrict
the maximum buffer size to BIO_MAX_INLINE_VECS.

Replace the UIO_MAXIOV symbolic name with the more contextually
appropriate BIO_MAX_INLINE_VECS.

Fixes: b091ac616846 ("sd_zbc: Fix report zones buffer allocation")
Cc: stable@vger.kernel.org
Signed-off-by: Steve Siwinski <ssiwinski@atto.com>
Link: https://lore.kernel.org/r/20250508200122.243129-1-ssiwinski@atto.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 block/bio.c           |    2 +-
 drivers/scsi/sd_zbc.c |    6 +++++-
 include/linux/bio.h   |    1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

--- a/block/bio.c
+++ b/block/bio.c
@@ -611,7 +611,7 @@ struct bio *bio_kmalloc(unsigned short n
 {
 	struct bio *bio;
 
-	if (nr_vecs > UIO_MAXIOV)
+	if (nr_vecs > BIO_MAX_INLINE_VECS)
 		return NULL;
 	return kmalloc(struct_size(bio, bi_inline_vecs, nr_vecs), gfp_mask);
 }
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -169,6 +169,7 @@ static void *sd_zbc_alloc_report_buffer(
 					unsigned int nr_zones, size_t *buflen)
 {
 	struct request_queue *q = sdkp->disk->queue;
+	unsigned int max_segments;
 	size_t bufsize;
 	void *buf;
 
@@ -180,12 +181,15 @@ static void *sd_zbc_alloc_report_buffer(
 	 * Furthermore, since the report zone command cannot be split, make
 	 * sure that the allocated buffer can always be mapped by limiting the
 	 * number of pages allocated to the HBA max segments limit.
+	 * Since max segments can be larger than the max inline bio vectors,
+	 * further limit the allocated buffer to BIO_MAX_INLINE_VECS.
 	 */
 	nr_zones = min(nr_zones, sdkp->zone_info.nr_zones);
 	bufsize = roundup((nr_zones + 1) * 64, SECTOR_SIZE);
 	bufsize = min_t(size_t, bufsize,
 			queue_max_hw_sectors(q) << SECTOR_SHIFT);
-	bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT);
+	max_segments = min(BIO_MAX_INLINE_VECS, queue_max_segments(q));
+	bufsize = min_t(size_t, bufsize, max_segments << PAGE_SHIFT);
 
 	while (bufsize >= SECTOR_SIZE) {
 		buf = kvzalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -11,6 +11,7 @@
 #include <linux/uio.h>
 
 #define BIO_MAX_VECS		256U
+#define BIO_MAX_INLINE_VECS	UIO_MAXIOV
 
 struct queue_limits;
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 114/145] smb: client: fix memory leak during error handling for POSIX mkdir
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (112 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 113/145] scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 115/145] spi: tegra114: Use value to check for invalid delays Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Jethro Donaldson, Steve French

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jethro Donaldson <devel@jro.nz>

commit 1fe4a44b7fa3955bcb7b4067c07b778fe90d8ee7 upstream.

The response buffer for the CREATE request handled by smb311_posix_mkdir()
is leaked on the error path (goto err_free_rsp_buf) because the structure
pointer *rsp passed to free_rsp_buf() is not assigned until *after* the
error condition is checked.

As *rsp is initialised to NULL, free_rsp_buf() becomes a no-op and the leak
is instead reported by __kmem_cache_shutdown() upon subsequent rmmod of
cifs.ko if (and only if) the error path has been hit.

Pass rsp_iov.iov_base to free_rsp_buf() instead, similar to the code in
other functions in smb2pdu.c for which *rsp is assigned late.

Cc: stable@vger.kernel.org
Signed-off-by: Jethro Donaldson <devel@jro.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/smb/client/smb2pdu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/smb/client/smb2pdu.c
+++ b/fs/smb/client/smb2pdu.c
@@ -2967,7 +2967,7 @@ replay_again:
 	/* Eventually save off posix specific response info and timestamps */
 
 err_free_rsp_buf:
-	free_rsp_buf(resp_buftype, rsp);
+	free_rsp_buf(resp_buftype, rsp_iov.iov_base);
 	kfree(pc_buf);
 err_free_req:
 	cifs_small_buf_release(req);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 115/145] spi: tegra114: Use value to check for invalid delays
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (113 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 114/145] smb: client: fix memory leak during error handling for POSIX mkdir Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 116/145] tpm: Mask TPM RC in tpm2_start_auth_session() Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Aaron Kling, Jon Hunter, Mark Brown

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Aaron Kling <webgeek1234@gmail.com>

commit e979a7c79fbc706f6dac913af379ef4caa04d3d5 upstream.

A delay unit of 0 is a valid entry, thus it is not valid to check for
unused delays. Instead, check the value field; if that is zero, the
given delay is unset.

Fixes: 4426e6b4ecf6 ("spi: tegra114: Don't fail set_cs_timing when delays are zero")
Cc: stable@vger.kernel.org
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20250506-spi-tegra114-fixup-v1-1-136dc2f732f3@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/spi/spi-tegra114.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/spi/spi-tegra114.c
+++ b/drivers/spi/spi-tegra114.c
@@ -728,9 +728,9 @@ static int tegra_spi_set_hw_cs_timing(st
 	u32 inactive_cycles;
 	u8 cs_state;
 
-	if ((setup->unit && setup->unit != SPI_DELAY_UNIT_SCK) ||
-	    (hold->unit && hold->unit != SPI_DELAY_UNIT_SCK) ||
-	    (inactive->unit && inactive->unit != SPI_DELAY_UNIT_SCK)) {
+	if ((setup->value && setup->unit != SPI_DELAY_UNIT_SCK) ||
+	    (hold->value && hold->unit != SPI_DELAY_UNIT_SCK) ||
+	    (inactive->value && inactive->unit != SPI_DELAY_UNIT_SCK)) {
 		dev_err(&spi->dev,
 			"Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
 			SPI_DELAY_UNIT_SCK);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 116/145] tpm: Mask TPM RC in tpm2_start_auth_session()
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (114 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 115/145] spi: tegra114: Use value to check for invalid delays Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 117/145] wifi: mt76: disable napi on driver removal Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Herbert Xu, Stefano Garzarella,
	Jarkko Sakkinen

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jarkko Sakkinen <jarkko@kernel.org>

commit 539fbab37881e32ba6a708a100de6db19e1e7e7d upstream.

tpm2_start_auth_session() does not mask TPM RC correctly from the callers:

[   28.766528] tpm tpm0: A TPM error (2307) occurred start auth session

Process TPM RCs inside tpm2_start_auth_session(), and map them to POSIX
error codes.

Cc: stable@vger.kernel.org # v6.10+
Fixes: 699e3efd6c64 ("tpm: Add HMAC session start and end functions")
Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Closes: https://lore.kernel.org/linux-integrity/Z_NgdRHuTKP6JK--@gondor.apana.org.au/
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/char/tpm/tpm2-sessions.c |   20 ++++++--------------
 include/linux/tpm.h              |   19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 14 deletions(-)

--- a/drivers/char/tpm/tpm2-sessions.c
+++ b/drivers/char/tpm/tpm2-sessions.c
@@ -40,11 +40,6 @@
  *
  * These are the usage functions:
  *
- * tpm2_start_auth_session() which allocates the opaque auth structure
- *	and gets a session from the TPM.  This must be called before
- *	any of the following functions.  The session is protected by a
- *	session_key which is derived from a random salt value
- *	encrypted to the NULL seed.
  * tpm2_end_auth_session() kills the session and frees the resources.
  *	Under normal operation this function is done by
  *	tpm_buf_check_hmac_response(), so this is only to be used on
@@ -963,16 +958,13 @@ err:
 }
 
 /**
- * tpm2_start_auth_session() - create a HMAC authentication session with the TPM
- * @chip: the TPM chip structure to create the session with
+ * tpm2_start_auth_session() - Create an a HMAC authentication session
+ * @chip:	A TPM chip
  *
- * This function loads the NULL seed from its saved context and starts
- * an authentication session on the null seed, fills in the
- * @chip->auth structure to contain all the session details necessary
- * for performing the HMAC, encrypt and decrypt operations and
- * returns.  The NULL seed is flushed before this function returns.
+ * Loads the ephemeral key (null seed), and starts an HMAC authenticated
+ * session. The null seed is flushed before the return.
  *
- * Return: zero on success or actual error encountered.
+ * Returns zero on success, or a POSIX error code.
  */
 int tpm2_start_auth_session(struct tpm_chip *chip)
 {
@@ -1024,7 +1016,7 @@ int tpm2_start_auth_session(struct tpm_c
 	/* hash algorithm for session */
 	tpm_buf_append_u16(&buf, TPM_ALG_SHA256);
 
-	rc = tpm_transmit_cmd(chip, &buf, 0, "start auth session");
+	rc = tpm_ret_to_err(tpm_transmit_cmd(chip, &buf, 0, "StartAuthSession"));
 	tpm2_flush_context(chip, null_key);
 
 	if (rc == TPM2_RC_SUCCESS)
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -257,6 +257,7 @@ enum tpm2_return_codes {
 	TPM2_RC_TESTING		= 0x090A, /* RC_WARN */
 	TPM2_RC_REFERENCE_H0	= 0x0910,
 	TPM2_RC_RETRY		= 0x0922,
+	TPM2_RC_SESSION_MEMORY	= 0x0903,
 };
 
 enum tpm2_command_codes {
@@ -437,6 +438,24 @@ static inline u32 tpm2_rc_value(u32 rc)
 	return (rc & BIT(7)) ? rc & 0xbf : rc;
 }
 
+/*
+ * Convert a return value from tpm_transmit_cmd() to POSIX error code.
+ */
+static inline ssize_t tpm_ret_to_err(ssize_t ret)
+{
+	if (ret < 0)
+		return ret;
+
+	switch (tpm2_rc_value(ret)) {
+	case TPM2_RC_SUCCESS:
+		return 0;
+	case TPM2_RC_SESSION_MEMORY:
+		return -ENOMEM;
+	default:
+		return -EFAULT;
+	}
+}
+
 #if defined(CONFIG_TCG_TPM) || defined(CONFIG_TCG_TPM_MODULE)
 
 extern int tpm_is_tpm2(struct tpm_chip *chip);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 117/145] wifi: mt76: disable napi on driver removal
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (115 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 116/145] tpm: Mask TPM RC in tpm2_start_auth_session() Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 118/145] wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Fedor Pchelkin, Ming Yen Hsieh,
	Felix Fietkau

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Fedor Pchelkin <pchelkin@ispras.ru>

commit 78ab4be549533432d97ea8989d2f00b508fa68d8 upstream.

A warning on driver removal started occurring after commit 9dd05df8403b
("net: warn if NAPI instance wasn't shut down"). Disable tx napi before
deleting it in mt76_dma_cleanup().

 WARNING: CPU: 4 PID: 18828 at net/core/dev.c:7288 __netif_napi_del_locked+0xf0/0x100
 CPU: 4 UID: 0 PID: 18828 Comm: modprobe Not tainted 6.15.0-rc4 #4 PREEMPT(lazy)
 Hardware name: ASUS System Product Name/PRIME X670E-PRO WIFI, BIOS 3035 09/05/2024
 RIP: 0010:__netif_napi_del_locked+0xf0/0x100
 Call Trace:
 <TASK>
 mt76_dma_cleanup+0x54/0x2f0 [mt76]
 mt7921_pci_remove+0xd5/0x190 [mt7921e]
 pci_device_remove+0x47/0xc0
 device_release_driver_internal+0x19e/0x200
 driver_detach+0x48/0x90
 bus_remove_driver+0x6d/0xf0
 pci_unregister_driver+0x2e/0xb0
 __do_sys_delete_module.isra.0+0x197/0x2e0
 do_syscall_64+0x7b/0x160
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

Tested with mt7921e but the same pattern can be actually applied to other
mt76 drivers calling mt76_dma_cleanup() during removal. Tx napi is enabled
in their *_dma_init() functions and only toggled off and on again inside
their suspend/resume/reset paths. So it should be okay to disable tx
napi in such a generic way.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 2ac515a5d74f ("mt76: mt76x02: use napi polling for tx cleanup")
Cc: stable@vger.kernel.org
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Tested-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://patch.msgid.link/20250506115540.19045-1-pchelkin@ispras.ru
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/wireless/mediatek/mt76/dma.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -1011,6 +1011,7 @@ void mt76_dma_cleanup(struct mt76_dev *d
 	int i;
 
 	mt76_worker_disable(&dev->tx_worker);
+	napi_disable(&dev->tx_napi);
 	netif_napi_del(&dev->tx_napi);
 
 	for (i = 0; i < ARRAY_SIZE(dev->phys); i++) {



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 118/145] wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (116 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 117/145] wifi: mt76: disable napi on driver removal Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 119/145] ring-buffer: Fix persistent buffer when commit page is the reader page Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Benjamin Xiao, Niklas Schnelle,
	Ming Yen Hsieh, Felix Fietkau

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>

commit 0aa8496adda570c2005410a30df963a16643a3dc upstream.

Ensure that the hdr_trans_tlv command is included in the broadcast wtbl to
prevent the IPv6 and multicast packet from being dropped by the chip.

Cc: stable@vger.kernel.org
Fixes: cb1353ef3473 ("wifi: mt76: mt7925: integrate *mlo_sta_cmd and *sta_cmd")
Reported-by: Benjamin Xiao <fossben@pm.me>
Tested-by: Niklas Schnelle <niks@kernel.org>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://lore.kernel.org/lkml/EmWnO5b-acRH1TXbGnkx41eJw654vmCR-8_xMBaPMwexCnfkvKCdlU5u19CGbaapJ3KRu-l3B-tSUhf8CCQwL0odjo6Cd5YG5lvNeB-vfdg=@pm.me/
Link: https://patch.msgid.link/20250509010421.403022-1-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -1867,14 +1867,14 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy,
 			mt7925_mcu_sta_mld_tlv(skb, info->vif, info->link_sta->sta);
 			mt7925_mcu_sta_eht_mld_tlv(skb, info->vif, info->link_sta->sta);
 		}
-
-		mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, info->link_sta);
 	}
 
 	if (!info->enable) {
 		mt7925_mcu_sta_remove_tlv(skb);
 		mt76_connac_mcu_add_tlv(skb, STA_REC_MLD_OFF,
 					sizeof(struct tlv));
+	} else {
+		mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, info->link_sta);
 	}
 
 	return mt76_mcu_skb_send_msg(dev, skb, info->cmd, true);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 119/145] ring-buffer: Fix persistent buffer when commit page is the reader page
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (117 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 118/145] wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 120/145] net: qede: Initialize qede_ll_ops with designated initializer Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Mathieu Desnoyers, Tasos Sahanidis,
	Masami Hiramatsu (Google), Steven Rostedt (Google)

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Steven Rostedt <rostedt@goodmis.org>

commit 1d6c39c89f617c9fec6bbae166e25b16a014f7c8 upstream.

The ring buffer is made up of sub buffers (sometimes called pages as they
are by default PAGE_SIZE). It has the following "pages":

  "tail page" - this is the page that the next write will write to
  "head page" - this is the page that the reader will swap the reader page with.
  "reader page" - This belongs to the reader, where it will swap the head
                  page from the ring buffer so that the reader does not
                  race with the writer.

The writer may end up on the "reader page" if the ring buffer hasn't
written more than one page, where the "tail page" and the "head page" are
the same.

The persistent ring buffer has meta data that points to where these pages
exist so on reboot it can re-create the pointers to the cpu_buffer
descriptor. But when the commit page is on the reader page, the logic is
incorrect.

The check to see if the commit page is on the reader page checked if the
head page was the reader page, which would never happen, as the head page
is always in the ring buffer. The correct check would be to test if the
commit page is on the reader page. If that's the case, then it can exit
out early as the commit page is only on the reader page when there's only
one page of data in the buffer. There's no reason to iterate the ring
buffer pages to find the "commit page" as it is already found.

To trigger this bug:

  # echo 1 > /sys/kernel/tracing/instances/boot_mapped/events/syscalls/sys_enter_fchownat/enable
  # touch /tmp/x
  # chown sshd /tmp/x
  # reboot

On boot up, the dmesg will have:
 Ring buffer meta [0] is from previous boot!
 Ring buffer meta [1] is from previous boot!
 Ring buffer meta [2] is from previous boot!
 Ring buffer meta [3] is from previous boot!
 Ring buffer meta [4] commit page not found
 Ring buffer meta [5] is from previous boot!
 Ring buffer meta [6] is from previous boot!
 Ring buffer meta [7] is from previous boot!

Where the buffer on CPU 4 had a "commit page not found" error and that
buffer is cleared and reset causing the output to be empty and the data lost.

When it works correctly, it has:

  # cat /sys/kernel/tracing/instances/boot_mapped/trace_pipe
        <...>-1137    [004] .....   998.205323: sys_enter_fchownat: __syscall_nr=0x104 (260) dfd=0xffffff9c (4294967196) filename=(0xffffc90000a0002c) user=0x3e8 (1000) group=0xffffffff (4294967295) flag=0x0 (0

Cc: stable@vger.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20250513115032.3e0b97f7@gandalf.local.home
Fixes: 5f3b6e839f3ce ("ring-buffer: Validate boot range memory events")
Reported-by: Tasos Sahanidis <tasos@tasossah.com>
Tested-by: Tasos Sahanidis <tasos@tasossah.com>
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/trace/ring_buffer.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1832,10 +1832,12 @@ static void rb_meta_validate_events(stru
 
 	head_page = cpu_buffer->head_page;
 
-	/* If both the head and commit are on the reader_page then we are done. */
-	if (head_page == cpu_buffer->reader_page &&
-	    head_page == cpu_buffer->commit_page)
+	/* If the commit_buffer is the reader page, update the commit page */
+	if (meta->commit_buffer == (unsigned long)cpu_buffer->reader_page->page) {
+		cpu_buffer->commit_page = cpu_buffer->reader_page;
+		/* Nothing more to do, the only page is the reader page */
 		goto done;
+	}
 
 	/* Iterate until finding the commit page */
 	for (i = 0; i < meta->nr_subbufs + 1; i++, rb_inc_page(&head_page)) {



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 120/145] net: qede: Initialize qede_ll_ops with designated initializer
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (118 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 119/145] ring-buffer: Fix persistent buffer when commit page is the reader page Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 121/145] io_uring/memmap: dont use page_address() on a highmem page Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Nathan Chancellor, Jakub Kicinski

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nathan Chancellor <nathan@kernel.org>

commit 6b3ab7f2cbfaeb6580709cd8ef4d72cfd01bfde4 upstream.

After a recent change [1] in clang's randstruct implementation to
randomize structures that only contain function pointers, there is an
error because qede_ll_ops get randomized but does not use a designated
initializer for the first member:

  drivers/net/ethernet/qlogic/qede/qede_main.c:206:2: error: a randomized struct can only be initialized with a designated initializer
    206 |         {
        |         ^

Explicitly initialize the common member using a designated initializer
to fix the build.

Cc: stable@vger.kernel.org
Fixes: 035f7f87b729 ("randstruct: Enable Clang support")
Link: https://github.com/llvm/llvm-project/commit/04364fb888eea6db9811510607bed4b200bcb082 [1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20250507-qede-fix-clang-randstruct-v1-1-5ccc15626fba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/qlogic/qede/qede_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -203,7 +203,7 @@ static struct pci_driver qede_pci_driver
 };
 
 static struct qed_eth_cb_ops qede_ll_ops = {
-	{
+	.common = {
 #ifdef CONFIG_RFS_ACCEL
 		.arfs_filter_op = qede_arfs_filter_op,
 #endif



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 121/145] io_uring/memmap: dont use page_address() on a highmem page
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (119 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 120/145] net: qede: Initialize qede_ll_ops with designated initializer Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 122/145] io_uring/uring_cmd: fix hybrid polling initialization issue Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, syzbot+5b8c4abafcb1d791ccfc,
	syzbot+6456a99dfdc2e78c4feb, Jens Axboe

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jens Axboe <axboe@kernel.dk>

commit f446c6311e86618a1f81eb576b56a6266307238f upstream.

For older/32-bit systems with highmem, don't assume that the pages in
a mapped region are always going to be mapped. If io_region_init_ptr()
finds that the pages are coalescable, also check if the first page is
a HighMem page or not. If it is, fall through to the usual vmap()
mapping rather than attempt to get the unmapped page address.

Cc: stable@vger.kernel.org
Fixes: c4d0ac1c1567 ("io_uring/memmap: optimise single folio regions")
Link: https://lore.kernel.org/all/681fe2fb.050a0220.f2294.001a.GAE@google.com/
Reported-by: syzbot+5b8c4abafcb1d791ccfc@syzkaller.appspotmail.com
Link: https://lore.kernel.org/all/681fed0a.050a0220.f2294.001c.GAE@google.com/
Reported-by: syzbot+6456a99dfdc2e78c4feb@syzkaller.appspotmail.com
Tested-by: syzbot+6456a99dfdc2e78c4feb@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 io_uring/memmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/memmap.c b/io_uring/memmap.c
index 76fcc79656b0..07f8a5cbd37e 100644
--- a/io_uring/memmap.c
+++ b/io_uring/memmap.c
@@ -116,7 +116,7 @@ static int io_region_init_ptr(struct io_mapped_region *mr)
 	void *ptr;
 
 	if (io_check_coalesce_buffer(mr->pages, mr->nr_pages, &ifd)) {
-		if (ifd.nr_folios == 1) {
+		if (ifd.nr_folios == 1 && !PageHighMem(mr->pages[0])) {
 			mr->ptr = page_address(mr->pages[0]);
 			return 0;
 		}
-- 
2.49.0




^ permalink raw reply related	[flat|nested] 165+ messages in thread

* [PATCH 6.14 122/145] io_uring/uring_cmd: fix hybrid polling initialization issue
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (120 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 121/145] io_uring/memmap: dont use page_address() on a highmem page Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 123/145] mm: hugetlb: fix incorrect fallback for subpool Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, hexue, Jens Axboe

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: hexue <xue01.he@samsung.com>

commit 63166b815dc163b2e46426cecf707dc5923d6d13 upstream.

Modify the check for whether the timer is initialized during IO transfer
when passthrough is used with hybrid polling, to ensure that it's always
setup correctly.

Cc: stable@vger.kernel.org
Fixes: 01ee194d1aba ("io_uring: add support for hybrid IOPOLL")
Signed-off-by: hexue <xue01.he@samsung.com>
Link: https://lore.kernel.org/r/20250512052025.293031-1-xue01.he@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 io_uring/uring_cmd.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/io_uring/uring_cmd.c
+++ b/io_uring/uring_cmd.c
@@ -244,6 +244,11 @@ int io_uring_cmd(struct io_kiocb *req, u
 			return -EOPNOTSUPP;
 		issue_flags |= IO_URING_F_IOPOLL;
 		req->iopoll_completed = 0;
+		if (ctx->flags & IORING_SETUP_HYBRID_IOPOLL) {
+			/* make sure every req only blocks once */
+			req->flags &= ~REQ_F_IOPOLL_STATE;
+			req->iopoll_start = ktime_get_ns();
+		}
 	}
 
 	ret = file->f_op->uring_cmd(ioucmd, issue_flags);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 123/145] mm: hugetlb: fix incorrect fallback for subpool
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (121 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 122/145] io_uring/uring_cmd: fix hybrid polling initialization issue Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 124/145] mm: userfaultfd: correct dirty flags set for both present and swap pte Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Wupeng Ma, Joshua Hahn,
	Oscar Salvador, David Hildenbrand, Muchun Song, Andrew Morton

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wupeng Ma <mawupeng1@huawei.com>

commit a833a693a490ecff8ba377654c6d4d333718b6b1 upstream.

During our testing with hugetlb subpool enabled, we observe that
hstate->resv_huge_pages may underflow into negative values.  Root cause
analysis reveals a race condition in subpool reservation fallback handling
as follow:

hugetlb_reserve_pages()
    /* Attempt subpool reservation */
    gbl_reserve = hugepage_subpool_get_pages(spool, chg);

    /* Global reservation may fail after subpool allocation */
    if (hugetlb_acct_memory(h, gbl_reserve) < 0)
        goto out_put_pages;

out_put_pages:
    /* This incorrectly restores reservation to subpool */
    hugepage_subpool_put_pages(spool, chg);

When hugetlb_acct_memory() fails after subpool allocation, the current
implementation over-commits subpool reservations by returning the full
'chg' value instead of the actual allocated 'gbl_reserve' amount.  This
discrepancy propagates to global reservations during subsequent releases,
eventually causing resv_huge_pages underflow.

This problem can be trigger easily with the following steps:
1. reverse hugepage for hugeltb allocation
2. mount hugetlbfs with min_size to enable hugetlb subpool
3. alloc hugepages with two task(make sure the second will fail due to
   insufficient amount of hugepages)
4. with for a few seconds and repeat step 3 which will make
   hstate->resv_huge_pages to go below zero.

To fix this problem, return corrent amount of pages to subpool during the
fallback after hugepage_subpool_get_pages is called.

Link: https://lkml.kernel.org/r/20250410062633.3102457-1-mawupeng1@huawei.com
Fixes: 1c5ecae3a93f ("hugetlbfs: add minimum size accounting to subpools")
Signed-off-by: Wupeng Ma <mawupeng1@huawei.com>
Tested-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: David Hildenbrand <david@redhat.com>
Cc: Ma Wupeng <mawupeng1@huawei.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 mm/hugetlb.c |   28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2987,7 +2987,7 @@ struct folio *alloc_hugetlb_folio(struct
 	struct hugepage_subpool *spool = subpool_vma(vma);
 	struct hstate *h = hstate_vma(vma);
 	struct folio *folio;
-	long retval, gbl_chg;
+	long retval, gbl_chg, gbl_reserve;
 	map_chg_state map_chg;
 	int ret, idx;
 	struct hugetlb_cgroup *h_cg = NULL;
@@ -3140,8 +3140,16 @@ out_uncharge_cgroup_reservation:
 		hugetlb_cgroup_uncharge_cgroup_rsvd(idx, pages_per_huge_page(h),
 						    h_cg);
 out_subpool_put:
-	if (map_chg)
-		hugepage_subpool_put_pages(spool, 1);
+	/*
+	 * put page to subpool iff the quota of subpool's rsv_hpages is used
+	 * during hugepage_subpool_get_pages.
+	 */
+	if (map_chg && !gbl_chg) {
+		gbl_reserve = hugepage_subpool_put_pages(spool, 1);
+		hugetlb_acct_memory(h, -gbl_reserve);
+	}
+
+
 out_end_reservation:
 	if (map_chg != MAP_CHG_ENFORCED)
 		vma_end_reservation(h, vma, addr);
@@ -6949,7 +6957,7 @@ bool hugetlb_reserve_pages(struct inode
 					struct vm_area_struct *vma,
 					vm_flags_t vm_flags)
 {
-	long chg = -1, add = -1;
+	long chg = -1, add = -1, spool_resv, gbl_resv;
 	struct hstate *h = hstate_inode(inode);
 	struct hugepage_subpool *spool = subpool_inode(inode);
 	struct resv_map *resv_map;
@@ -7084,8 +7092,16 @@ bool hugetlb_reserve_pages(struct inode
 	return true;
 
 out_put_pages:
-	/* put back original number of pages, chg */
-	(void)hugepage_subpool_put_pages(spool, chg);
+	spool_resv = chg - gbl_reserve;
+	if (spool_resv) {
+		/* put sub pool's reservation back, chg - gbl_reserve */
+		gbl_resv = hugepage_subpool_put_pages(spool, spool_resv);
+		/*
+		 * subpool's reserved pages can not be put back due to race,
+		 * return to hstate.
+		 */
+		hugetlb_acct_memory(h, -gbl_resv);
+	}
 out_uncharge_cgroup:
 	hugetlb_cgroup_uncharge_cgroup_rsvd(hstate_index(h),
 					    chg * pages_per_huge_page(h), h_cg);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 124/145] mm: userfaultfd: correct dirty flags set for both present and swap pte
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (122 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 123/145] mm: hugetlb: fix incorrect fallback for subpool Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 125/145] dmaengine: ti: k3-udma: Add missing locking Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Barry Song, David Hildenbrand,
	Peter Xu, Suren Baghdasaryan, Lokesh Gidra, Andrea Arcangeli,
	Andrew Morton

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Barry Song <v-songbaohua@oppo.com>

commit 75cb1cca2c880179a11c7dd9380b6f14e41a06a4 upstream.

As David pointed out, what truly matters for mremap and userfaultfd move
operations is the soft dirty bit.  The current comment and
implementation—which always sets the dirty bit for present PTEs and
fails to set the soft dirty bit for swap PTEs—are incorrect.  This could
break features like Checkpoint-Restore in Userspace (CRIU).

This patch updates the behavior to correctly set the soft dirty bit for
both present and swap PTEs in accordance with mremap.

Link: https://lkml.kernel.org/r/20250508220912.7275-1-21cnbao@gmail.com
Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Reported-by: David Hildenbrand <david@redhat.com>
Closes: https://lore.kernel.org/linux-mm/02f14ee1-923f-47e3-a994-4950afb9afcc@redhat.com/
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Lokesh Gidra <lokeshgidra@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 mm/userfaultfd.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -1068,8 +1068,13 @@ static int move_present_pte(struct mm_st
 	src_folio->index = linear_page_index(dst_vma, dst_addr);
 
 	orig_dst_pte = mk_pte(&src_folio->page, dst_vma->vm_page_prot);
-	/* Follow mremap() behavior and treat the entry dirty after the move */
-	orig_dst_pte = pte_mkwrite(pte_mkdirty(orig_dst_pte), dst_vma);
+	/* Set soft dirty bit so userspace can notice the pte was moved */
+#ifdef CONFIG_MEM_SOFT_DIRTY
+	orig_dst_pte = pte_mksoft_dirty(orig_dst_pte);
+#endif
+	if (pte_dirty(orig_src_pte))
+		orig_dst_pte = pte_mkdirty(orig_dst_pte);
+	orig_dst_pte = pte_mkwrite(orig_dst_pte, dst_vma);
 
 	set_pte_at(mm, dst_addr, dst_pte, orig_dst_pte);
 out:
@@ -1104,6 +1109,9 @@ static int move_swap_pte(struct mm_struc
 	}
 
 	orig_src_pte = ptep_get_and_clear(mm, src_addr, src_pte);
+#ifdef CONFIG_MEM_SOFT_DIRTY
+	orig_src_pte = pte_swp_mksoft_dirty(orig_src_pte);
+#endif
 	set_pte_at(mm, dst_addr, dst_pte, orig_src_pte);
 	double_pt_unlock(dst_ptl, src_ptl);
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 125/145] dmaengine: ti: k3-udma: Add missing locking
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (123 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 124/145] mm: userfaultfd: correct dirty flags set for both present and swap pte Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 126/145] dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Peter Ujfalusi, Vignesh Raghavendra,
	Vinod Koul, dmaengine, Ronald Wahl

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ronald Wahl <ronald.wahl@legrand.com>

commit fca280992af8c2fbd511bc43f65abb4a17363f2f upstream.

Recent kernels complain about a missing lock in k3-udma.c when the lock
validator is enabled:

[    4.128073] WARNING: CPU: 0 PID: 746 at drivers/dma/ti/../virt-dma.h:169 udma_start.isra.0+0x34/0x238
[    4.137352] CPU: 0 UID: 0 PID: 746 Comm: kworker/0:3 Not tainted 6.12.9-arm64 #28
[    4.144867] Hardware name: pp-v12 (DT)
[    4.148648] Workqueue: events udma_check_tx_completion
[    4.153841] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    4.160834] pc : udma_start.isra.0+0x34/0x238
[    4.165227] lr : udma_start.isra.0+0x30/0x238
[    4.169618] sp : ffffffc083cabcf0
[    4.172963] x29: ffffffc083cabcf0 x28: 0000000000000000 x27: ffffff800001b005
[    4.180167] x26: ffffffc0812f0000 x25: 0000000000000000 x24: 0000000000000000
[    4.187370] x23: 0000000000000001 x22: 00000000e21eabe9 x21: ffffff8000fa0670
[    4.194571] x20: ffffff8001b6bf00 x19: ffffff8000fa0430 x18: ffffffc083b95030
[    4.201773] x17: 0000000000000000 x16: 00000000f0000000 x15: 0000000000000048
[    4.208976] x14: 0000000000000048 x13: 0000000000000000 x12: 0000000000000001
[    4.216179] x11: ffffffc08151a240 x10: 0000000000003ea1 x9 : ffffffc08046ab68
[    4.223381] x8 : ffffffc083cabac0 x7 : ffffffc081df3718 x6 : 0000000000029fc8
[    4.230583] x5 : ffffffc0817ee6d8 x4 : 0000000000000bc0 x3 : 0000000000000000
[    4.237784] x2 : 0000000000000000 x1 : 00000000001fffff x0 : 0000000000000000
[    4.244986] Call trace:
[    4.247463]  udma_start.isra.0+0x34/0x238
[    4.251509]  udma_check_tx_completion+0xd0/0xdc
[    4.256076]  process_one_work+0x244/0x3fc
[    4.260129]  process_scheduled_works+0x6c/0x74
[    4.264610]  worker_thread+0x150/0x1dc
[    4.268398]  kthread+0xd8/0xe8
[    4.271492]  ret_from_fork+0x10/0x20
[    4.275107] irq event stamp: 220
[    4.278363] hardirqs last  enabled at (219): [<ffffffc080a27c7c>] _raw_spin_unlock_irq+0x38/0x50
[    4.287183] hardirqs last disabled at (220): [<ffffffc080a1c154>] el1_dbg+0x24/0x50
[    4.294879] softirqs last  enabled at (182): [<ffffffc080037e68>] handle_softirqs+0x1c0/0x3cc
[    4.303437] softirqs last disabled at (177): [<ffffffc080010170>] __do_softirq+0x1c/0x28
[    4.311559] ---[ end trace 0000000000000000 ]---

This commit adds the missing locking.

Fixes: 25dcb5dd7b7c ("dmaengine: ti: New driver for K3 UDMA")
Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Ronald Wahl <ronald.wahl@legrand.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20250414173113.80677-1-rwahl@gmx.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/ti/k3-udma.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -1091,8 +1091,11 @@ static void udma_check_tx_completion(str
 	u32 residue_diff;
 	ktime_t time_diff;
 	unsigned long delay;
+	unsigned long flags;
 
 	while (1) {
+		spin_lock_irqsave(&uc->vc.lock, flags);
+
 		if (uc->desc) {
 			/* Get previous residue and time stamp */
 			residue_diff = uc->tx_drain.residue;
@@ -1127,6 +1130,8 @@ static void udma_check_tx_completion(str
 				break;
 			}
 
+			spin_unlock_irqrestore(&uc->vc.lock, flags);
+
 			usleep_range(ktime_to_us(delay),
 				     ktime_to_us(delay) + 10);
 			continue;
@@ -1143,6 +1148,8 @@ static void udma_check_tx_completion(str
 
 		break;
 	}
+
+	spin_unlock_irqrestore(&uc->vc.lock, flags);
 }
 
 static irqreturn_t udma_ring_irq_handler(int irq, void *data)



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 126/145] dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (124 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 125/145] dmaengine: ti: k3-udma: Add missing locking Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 127/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Vaishnav Achath, Peter Ujfalusi,
	Udit Kumar, Yemike Abhilash Chandra, Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>

commit 8ca9590c39b69b55a8de63d2b21b0d44f523b43a upstream.

Currently, a local dma_cap_mask_t variable is used to store device
cap_mask within udma_of_xlate(). However, the DMA_PRIVATE flag in
the device cap_mask can get cleared when the last channel is released.
This can happen right after storing the cap_mask locally in
udma_of_xlate(), and subsequent dma_request_channel() can fail due to
mismatch in the cap_mask. Fix this by removing the local dma_cap_mask_t
variable and directly using the one from the dma_device structure.

Fixes: 25dcb5dd7b7c ("dmaengine: ti: New driver for K3 UDMA")
Cc: stable@vger.kernel.org
Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
Link: https://lore.kernel.org/r/20250417075521.623651-1-y-abhilashchandra@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/ti/k3-udma.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -4253,7 +4253,6 @@ static struct dma_chan *udma_of_xlate(st
 				      struct of_dma *ofdma)
 {
 	struct udma_dev *ud = ofdma->of_dma_data;
-	dma_cap_mask_t mask = ud->ddev.cap_mask;
 	struct udma_filter_param filter_param;
 	struct dma_chan *chan;
 
@@ -4285,7 +4284,7 @@ static struct dma_chan *udma_of_xlate(st
 		}
 	}
 
-	chan = __dma_request_channel(&mask, udma_dma_filter_fn, &filter_param,
+	chan = __dma_request_channel(&ud->ddev.cap_mask, udma_dma_filter_fn, &filter_param,
 				     ofdma->of_node);
 	if (!chan) {
 		dev_err(ud->dev, "get channel fail in %s.\n", __func__);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 127/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (125 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 126/145] dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 128/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Shuai Xue, Dave Jiang, Fenghua Yu,
	Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuai Xue <xueshuai@linux.alibaba.com>

commit 3fd2f4bc010cdfbc07dd21018dc65bd9370eb7a4 upstream.

Memory allocated for wqs is not freed if an error occurs during
idxd_setup_wqs(). To fix it, free the allocated memory in the reverse
order of allocation before exiting the function in case of an error.

Fixes: 7c5dd23e57c1 ("dmaengine: idxd: fix wq conf_dev 'struct device' lifetime")
Fixes: 700af3a0a26c ("dmaengine: idxd: add 'struct idxd_dev' as wrapper for conf_dev")
Fixes: de5819b99489 ("dmaengine: idxd: track enabled workqueues in bitmap")
Fixes: b0325aefd398 ("dmaengine: idxd: add WQ operation cap restriction support")
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Link: https://lore.kernel.org/r/20250404120217.48772-2-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/idxd/init.c |   30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)

--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -169,8 +169,8 @@ static int idxd_setup_wqs(struct idxd_de
 
 	idxd->wq_enable_map = bitmap_zalloc_node(idxd->max_wqs, GFP_KERNEL, dev_to_node(dev));
 	if (!idxd->wq_enable_map) {
-		kfree(idxd->wqs);
-		return -ENOMEM;
+		rc = -ENOMEM;
+		goto err_bitmap;
 	}
 
 	for (i = 0; i < idxd->max_wqs; i++) {
@@ -189,10 +189,8 @@ static int idxd_setup_wqs(struct idxd_de
 		conf_dev->bus = &dsa_bus_type;
 		conf_dev->type = &idxd_wq_device_type;
 		rc = dev_set_name(conf_dev, "wq%d.%d", idxd->id, wq->id);
-		if (rc < 0) {
-			put_device(conf_dev);
+		if (rc < 0)
 			goto err;
-		}
 
 		mutex_init(&wq->wq_lock);
 		init_waitqueue_head(&wq->err_queue);
@@ -203,7 +201,6 @@ static int idxd_setup_wqs(struct idxd_de
 		wq->enqcmds_retries = IDXD_ENQCMDS_RETRIES;
 		wq->wqcfg = kzalloc_node(idxd->wqcfg_size, GFP_KERNEL, dev_to_node(dev));
 		if (!wq->wqcfg) {
-			put_device(conf_dev);
 			rc = -ENOMEM;
 			goto err;
 		}
@@ -211,9 +208,8 @@ static int idxd_setup_wqs(struct idxd_de
 		if (idxd->hw.wq_cap.op_config) {
 			wq->opcap_bmap = bitmap_zalloc(IDXD_MAX_OPCAP_BITS, GFP_KERNEL);
 			if (!wq->opcap_bmap) {
-				put_device(conf_dev);
 				rc = -ENOMEM;
-				goto err;
+				goto err_opcap_bmap;
 			}
 			bitmap_copy(wq->opcap_bmap, idxd->opcap_bmap, IDXD_MAX_OPCAP_BITS);
 		}
@@ -224,12 +220,28 @@ static int idxd_setup_wqs(struct idxd_de
 
 	return 0;
 
- err:
+err_opcap_bmap:
+	kfree(wq->wqcfg);
+
+err:
+	put_device(conf_dev);
+	kfree(wq);
+
 	while (--i >= 0) {
 		wq = idxd->wqs[i];
+		if (idxd->hw.wq_cap.op_config)
+			bitmap_free(wq->opcap_bmap);
+		kfree(wq->wqcfg);
 		conf_dev = wq_confdev(wq);
 		put_device(conf_dev);
+		kfree(wq);
+
 	}
+	bitmap_free(idxd->wq_enable_map);
+
+err_bitmap:
+	kfree(idxd->wqs);
+
 	return rc;
 }
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 128/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (126 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 127/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 129/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Shuai Xue, Dave Jiang, Fenghua Yu,
	Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuai Xue <xueshuai@linux.alibaba.com>

commit 817bced19d1dbdd0b473580d026dc0983e30e17b upstream.

Memory allocated for engines is not freed if an error occurs during
idxd_setup_engines(). To fix it, free the allocated memory in the
reverse order of allocation before exiting the function in case of an
error.

Fixes: 75b911309060 ("dmaengine: idxd: fix engine conf_dev lifetime")
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Link: https://lore.kernel.org/r/20250404120217.48772-3-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/idxd/init.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -275,6 +275,7 @@ static int idxd_setup_engines(struct idx
 		rc = dev_set_name(conf_dev, "engine%d.%d", idxd->id, engine->id);
 		if (rc < 0) {
 			put_device(conf_dev);
+			kfree(engine);
 			goto err;
 		}
 
@@ -288,7 +289,10 @@ static int idxd_setup_engines(struct idx
 		engine = idxd->engines[i];
 		conf_dev = engine_confdev(engine);
 		put_device(conf_dev);
+		kfree(engine);
 	}
+	kfree(idxd->engines);
+
 	return rc;
 }
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 129/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (127 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 128/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 130/145] dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Shuai Xue, Dave Jiang, Fenghua Yu,
	Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuai Xue <xueshuai@linux.alibaba.com>

commit aa6f4f945b10eac57aed46154ae7d6fada7fccc7 upstream.

Memory allocated for groups is not freed if an error occurs during
idxd_setup_groups(). To fix it, free the allocated memory in the reverse
order of allocation before exiting the function in case of an error.

Fixes: defe49f96012 ("dmaengine: idxd: fix group conf_dev lifetime")
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Link: https://lore.kernel.org/r/20250404120217.48772-4-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/idxd/init.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -326,6 +326,7 @@ static int idxd_setup_groups(struct idxd
 		rc = dev_set_name(conf_dev, "group%d.%d", idxd->id, group->id);
 		if (rc < 0) {
 			put_device(conf_dev);
+			kfree(group);
 			goto err;
 		}
 
@@ -350,7 +351,10 @@ static int idxd_setup_groups(struct idxd
 	while (--i >= 0) {
 		group = idxd->groups[i];
 		put_device(group_confdev(group));
+		kfree(group);
 	}
+	kfree(idxd->groups);
+
 	return rc;
 }
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 130/145] dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (128 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 129/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 131/145] dmaengine: idxd: Add missing cleanups in cleanup internals Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Fenghua Yu, Shuai Xue, Dave Jiang,
	Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuai Xue <xueshuai@linux.alibaba.com>

commit 61259fb96e023f7299c442c48b13e72c441fc0f2 upstream.

The idxd_setup_internals() is missing some cleanup when things fail in
the middle.

Add the appropriate cleanup routines:

- cleanup groups
- cleanup enginces
- cleanup wqs

to make sure it exits gracefully.

Fixes: defe49f96012 ("dmaengine: idxd: fix group conf_dev lifetime")
Cc: stable@vger.kernel.org
Suggested-by: Fenghua Yu <fenghuay@nvidia.com>
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20250404120217.48772-5-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/idxd/init.c |   58 ++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 51 insertions(+), 7 deletions(-)

--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -155,6 +155,25 @@ static void idxd_cleanup_interrupts(stru
 	pci_free_irq_vectors(pdev);
 }
 
+static void idxd_clean_wqs(struct idxd_device *idxd)
+{
+	struct idxd_wq *wq;
+	struct device *conf_dev;
+	int i;
+
+	for (i = 0; i < idxd->max_wqs; i++) {
+		wq = idxd->wqs[i];
+		if (idxd->hw.wq_cap.op_config)
+			bitmap_free(wq->opcap_bmap);
+		kfree(wq->wqcfg);
+		conf_dev = wq_confdev(wq);
+		put_device(conf_dev);
+		kfree(wq);
+	}
+	bitmap_free(idxd->wq_enable_map);
+	kfree(idxd->wqs);
+}
+
 static int idxd_setup_wqs(struct idxd_device *idxd)
 {
 	struct device *dev = &idxd->pdev->dev;
@@ -245,6 +264,21 @@ err_bitmap:
 	return rc;
 }
 
+static void idxd_clean_engines(struct idxd_device *idxd)
+{
+	struct idxd_engine *engine;
+	struct device *conf_dev;
+	int i;
+
+	for (i = 0; i < idxd->max_engines; i++) {
+		engine = idxd->engines[i];
+		conf_dev = engine_confdev(engine);
+		put_device(conf_dev);
+		kfree(engine);
+	}
+	kfree(idxd->engines);
+}
+
 static int idxd_setup_engines(struct idxd_device *idxd)
 {
 	struct idxd_engine *engine;
@@ -296,6 +330,19 @@ static int idxd_setup_engines(struct idx
 	return rc;
 }
 
+static void idxd_clean_groups(struct idxd_device *idxd)
+{
+	struct idxd_group *group;
+	int i;
+
+	for (i = 0; i < idxd->max_groups; i++) {
+		group = idxd->groups[i];
+		put_device(group_confdev(group));
+		kfree(group);
+	}
+	kfree(idxd->groups);
+}
+
 static int idxd_setup_groups(struct idxd_device *idxd)
 {
 	struct device *dev = &idxd->pdev->dev;
@@ -410,7 +457,7 @@ static int idxd_init_evl(struct idxd_dev
 static int idxd_setup_internals(struct idxd_device *idxd)
 {
 	struct device *dev = &idxd->pdev->dev;
-	int rc, i;
+	int rc;
 
 	init_waitqueue_head(&idxd->cmd_waitq);
 
@@ -441,14 +488,11 @@ static int idxd_setup_internals(struct i
  err_evl:
 	destroy_workqueue(idxd->wq);
  err_wkq_create:
-	for (i = 0; i < idxd->max_groups; i++)
-		put_device(group_confdev(idxd->groups[i]));
+	idxd_clean_groups(idxd);
  err_group:
-	for (i = 0; i < idxd->max_engines; i++)
-		put_device(engine_confdev(idxd->engines[i]));
+	idxd_clean_engines(idxd);
  err_engine:
-	for (i = 0; i < idxd->max_wqs; i++)
-		put_device(wq_confdev(idxd->wqs[i]));
+	idxd_clean_wqs(idxd);
  err_wqs:
 	return rc;
 }



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 131/145] dmaengine: idxd: Add missing cleanups in cleanup internals
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (129 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 130/145] dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 132/145] dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Shuai Xue, Fenghua Yu, Dave Jiang,
	Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuai Xue <xueshuai@linux.alibaba.com>

commit 61d651572b6c4fe50c7b39a390760f3a910c7ccf upstream.

The idxd_cleanup_internals() function only decreases the reference count
of groups, engines, and wqs but is missing the step to release memory
resources.

To fix this, use the cleanup helper to properly release the memory
resources.

Fixes: ddf742d4f3f1 ("dmaengine: idxd: Add missing cleanup for early error out in probe call")
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20250404120217.48772-6-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/idxd/init.c |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -407,14 +407,9 @@ static int idxd_setup_groups(struct idxd
 
 static void idxd_cleanup_internals(struct idxd_device *idxd)
 {
-	int i;
-
-	for (i = 0; i < idxd->max_groups; i++)
-		put_device(group_confdev(idxd->groups[i]));
-	for (i = 0; i < idxd->max_engines; i++)
-		put_device(engine_confdev(idxd->engines[i]));
-	for (i = 0; i < idxd->max_wqs; i++)
-		put_device(wq_confdev(idxd->wqs[i]));
+	idxd_clean_groups(idxd);
+	idxd_clean_engines(idxd);
+	idxd_clean_wqs(idxd);
 	destroy_workqueue(idxd->wq);
 }
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 132/145] dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (130 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 131/145] dmaengine: idxd: Add missing cleanups in cleanup internals Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 133/145] dmaengine: idxd: fix memory leak in error handling path of idxd_alloc Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Vinicius Costa Gomes, Shuai Xue,
	Fenghua Yu, Dave Jiang, Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuai Xue <xueshuai@linux.alibaba.com>

commit d5449ff1b04dfe9ed8e455769aa01e4c2ccf6805 upstream.

The remove call stack is missing idxd cleanup to free bitmap, ida and
the idxd_device. Call idxd_free() helper routines to make sure we exit
gracefully.

Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators")
Cc: stable@vger.kernel.org
Suggested-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20250404120217.48772-9-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/idxd/init.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -1319,6 +1319,7 @@ static void idxd_remove(struct pci_dev *
 	destroy_workqueue(idxd->wq);
 	perfmon_pmu_remove(idxd);
 	put_device(idxd_confdev(idxd));
+	idxd_free(idxd);
 }
 
 static struct pci_driver idxd_pci_driver = {



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 133/145] dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (131 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 132/145] dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 134/145] dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Shuai Xue, Dave Jiang, Fenghua Yu,
	Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuai Xue <xueshuai@linux.alibaba.com>

commit 46a5cca76c76c86063000a12936f8e7875295838 upstream.

Memory allocated for idxd is not freed if an error occurs during
idxd_alloc(). To fix it, free the allocated memory in the reverse order
of allocation before exiting the function in case of an error.

Fixes: a8563a33a5e2 ("dmanegine: idxd: reformat opcap output to match bitmap_parse() input")
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Link: https://lore.kernel.org/r/20250404120217.48772-7-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/idxd/init.c |   24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -604,28 +604,34 @@ static struct idxd_device *idxd_alloc(st
 	idxd_dev_set_type(&idxd->idxd_dev, idxd->data->type);
 	idxd->id = ida_alloc(&idxd_ida, GFP_KERNEL);
 	if (idxd->id < 0)
-		return NULL;
+		goto err_ida;
 
 	idxd->opcap_bmap = bitmap_zalloc_node(IDXD_MAX_OPCAP_BITS, GFP_KERNEL, dev_to_node(dev));
-	if (!idxd->opcap_bmap) {
-		ida_free(&idxd_ida, idxd->id);
-		return NULL;
-	}
+	if (!idxd->opcap_bmap)
+		goto err_opcap;
 
 	device_initialize(conf_dev);
 	conf_dev->parent = dev;
 	conf_dev->bus = &dsa_bus_type;
 	conf_dev->type = idxd->data->dev_type;
 	rc = dev_set_name(conf_dev, "%s%d", idxd->data->name_prefix, idxd->id);
-	if (rc < 0) {
-		put_device(conf_dev);
-		return NULL;
-	}
+	if (rc < 0)
+		goto err_name;
 
 	spin_lock_init(&idxd->dev_lock);
 	spin_lock_init(&idxd->cmd_lock);
 
 	return idxd;
+
+err_name:
+	put_device(conf_dev);
+	bitmap_free(idxd->opcap_bmap);
+err_opcap:
+	ida_free(&idxd_ida, idxd->id);
+err_ida:
+	kfree(idxd);
+
+	return NULL;
 }
 
 static int idxd_enable_system_pasid(struct idxd_device *idxd)



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 134/145] dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (132 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 133/145] dmaengine: idxd: fix memory leak in error handling path of idxd_alloc Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 135/145] dmaengine: idxd: Refactor remove call with idxd_cleanup() helper Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Shuai Xue, Dave Jiang, Fenghua Yu,
	Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuai Xue <xueshuai@linux.alibaba.com>

commit 90022b3a6981ec234902be5dbf0f983a12c759fc upstream.

Memory allocated for idxd is not freed if an error occurs during
idxd_pci_probe(). To fix it, free the allocated memory in the reverse
order of allocation before exiting the function in case of an error.

Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators")
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Link: https://lore.kernel.org/r/20250404120217.48772-8-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/idxd/init.c |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -587,6 +587,17 @@ static void idxd_read_caps(struct idxd_d
 		idxd->hw.iaa_cap.bits = ioread64(idxd->reg_base + IDXD_IAACAP_OFFSET);
 }
 
+static void idxd_free(struct idxd_device *idxd)
+{
+	if (!idxd)
+		return;
+
+	put_device(idxd_confdev(idxd));
+	bitmap_free(idxd->opcap_bmap);
+	ida_free(&idxd_ida, idxd->id);
+	kfree(idxd);
+}
+
 static struct idxd_device *idxd_alloc(struct pci_dev *pdev, struct idxd_driver_data *data)
 {
 	struct device *dev = &pdev->dev;
@@ -1256,7 +1267,7 @@ int idxd_pci_probe_alloc(struct idxd_dev
  err:
 	pci_iounmap(pdev, idxd->reg_base);
  err_iomap:
-	put_device(idxd_confdev(idxd));
+	idxd_free(idxd);
  err_idxd_alloc:
 	pci_disable_device(pdev);
 	return rc;



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 135/145] dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (133 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 134/145] dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 136/145] accel/ivpu: Use workqueue for IRQ handling Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Vinicius Costa Gomes, Shuai Xue,
	Fenghua Yu, Dave Jiang, Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shuai Xue <xueshuai@linux.alibaba.com>

commit a409e919ca321cc0e28f8abf96fde299f0072a81 upstream.

The idxd_cleanup() helper cleans up perfmon, interrupts, internals and
so on. Refactor remove call with the idxd_cleanup() helper to avoid code
duplication. Note, this also fixes the missing put_device() for idxd
groups, enginces and wqs.

Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators")
Cc: stable@vger.kernel.org
Suggested-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20250404120217.48772-10-xueshuai@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/idxd/init.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -1309,7 +1309,6 @@ static void idxd_shutdown(struct pci_dev
 static void idxd_remove(struct pci_dev *pdev)
 {
 	struct idxd_device *idxd = pci_get_drvdata(pdev);
-	struct idxd_irq_entry *irq_entry;
 
 	idxd_unregister_devices(idxd);
 	/*
@@ -1322,21 +1321,12 @@ static void idxd_remove(struct pci_dev *
 	get_device(idxd_confdev(idxd));
 	device_unregister(idxd_confdev(idxd));
 	idxd_shutdown(pdev);
-	if (device_pasid_enabled(idxd))
-		idxd_disable_system_pasid(idxd);
 	idxd_device_remove_debugfs(idxd);
-
-	irq_entry = idxd_get_ie(idxd, 0);
-	free_irq(irq_entry->vector, irq_entry);
-	pci_free_irq_vectors(pdev);
+	idxd_cleanup(idxd);
 	pci_iounmap(pdev, idxd->reg_base);
-	if (device_user_pasid_enabled(idxd))
-		idxd_disable_sva(pdev);
-	pci_disable_device(pdev);
-	destroy_workqueue(idxd->wq);
-	perfmon_pmu_remove(idxd);
 	put_device(idxd_confdev(idxd));
 	idxd_free(idxd);
+	pci_disable_device(pdev);
 }
 
 static struct pci_driver idxd_pci_driver = {



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 136/145] accel/ivpu: Use workqueue for IRQ handling
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (134 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 135/145] dmaengine: idxd: Refactor remove call with idxd_cleanup() helper Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 137/145] accel/ivpu: Dump only first MMU fault from single context Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Maciej Falkowski, Jacek Lawrynowicz

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Maciej Falkowski <maciej.falkowski@linux.intel.com>

commit bc3e5f48b7ee021371dc37297678f7089be6ce28 upstream.

Convert IRQ bottom half from the thread handler into workqueue.
This increases a stability in rare scenarios where driver on
debugging/hardening kernels processes IRQ too slow and misses
some interrupts due to it.
Workqueue handler also gives a very minor performance increase.

Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250107173238.381120-6-maciej.falkowski@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/accel/ivpu/ivpu_drv.c     |   39 +++++++++-----------------------------
 drivers/accel/ivpu/ivpu_drv.h     |    5 +++-
 drivers/accel/ivpu/ivpu_hw.c      |    5 ----
 drivers/accel/ivpu/ivpu_hw.h      |    9 --------
 drivers/accel/ivpu/ivpu_hw_btrs.c |    3 --
 drivers/accel/ivpu/ivpu_ipc.c     |    7 ++----
 drivers/accel/ivpu/ivpu_ipc.h     |    2 -
 drivers/accel/ivpu/ivpu_job.c     |    2 -
 drivers/accel/ivpu/ivpu_job.h     |    2 -
 drivers/accel/ivpu/ivpu_pm.c      |    3 +-
 drivers/accel/ivpu/ivpu_pm.h      |    2 -
 11 files changed, 24 insertions(+), 55 deletions(-)

--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -7,6 +7,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/pm_runtime.h>
+#include <linux/workqueue.h>
 #include <generated/utsrelease.h>
 
 #include <drm/drm_accel.h>
@@ -419,6 +420,9 @@ void ivpu_prepare_for_reset(struct ivpu_
 {
 	ivpu_hw_irq_disable(vdev);
 	disable_irq(vdev->irq);
+	cancel_work_sync(&vdev->irq_ipc_work);
+	cancel_work_sync(&vdev->irq_dct_work);
+	cancel_work_sync(&vdev->context_abort_work);
 	ivpu_ipc_disable(vdev);
 	ivpu_mmu_disable(vdev);
 }
@@ -463,31 +467,6 @@ static const struct drm_driver driver =
 	.major = 1,
 };
 
-static irqreturn_t ivpu_irq_thread_handler(int irq, void *arg)
-{
-	struct ivpu_device *vdev = arg;
-	u8 irq_src;
-
-	if (kfifo_is_empty(&vdev->hw->irq.fifo))
-		return IRQ_NONE;
-
-	while (kfifo_get(&vdev->hw->irq.fifo, &irq_src)) {
-		switch (irq_src) {
-		case IVPU_HW_IRQ_SRC_IPC:
-			ivpu_ipc_irq_thread_handler(vdev);
-			break;
-		case IVPU_HW_IRQ_SRC_DCT:
-			ivpu_pm_dct_irq_thread_handler(vdev);
-			break;
-		default:
-			ivpu_err_ratelimited(vdev, "Unknown IRQ source: %u\n", irq_src);
-			break;
-		}
-	}
-
-	return IRQ_HANDLED;
-}
-
 static int ivpu_irq_init(struct ivpu_device *vdev)
 {
 	struct pci_dev *pdev = to_pci_dev(vdev->drm.dev);
@@ -499,12 +478,16 @@ static int ivpu_irq_init(struct ivpu_dev
 		return ret;
 	}
 
+	INIT_WORK(&vdev->irq_ipc_work, ivpu_ipc_irq_work_fn);
+	INIT_WORK(&vdev->irq_dct_work, ivpu_pm_irq_dct_work_fn);
+	INIT_WORK(&vdev->context_abort_work, ivpu_context_abort_work_fn);
+
 	ivpu_irq_handlers_init(vdev);
 
 	vdev->irq = pci_irq_vector(pdev, 0);
 
-	ret = devm_request_threaded_irq(vdev->drm.dev, vdev->irq, ivpu_hw_irq_handler,
-					ivpu_irq_thread_handler, IRQF_NO_AUTOEN, DRIVER_NAME, vdev);
+	ret = devm_request_irq(vdev->drm.dev, vdev->irq, ivpu_hw_irq_handler,
+			       IRQF_NO_AUTOEN, DRIVER_NAME, vdev);
 	if (ret)
 		ivpu_err(vdev, "Failed to request an IRQ %d\n", ret);
 
@@ -597,8 +580,6 @@ static int ivpu_dev_init(struct ivpu_dev
 	vdev->db_limit.min = IVPU_MIN_DB;
 	vdev->db_limit.max = IVPU_MAX_DB;
 
-	INIT_WORK(&vdev->context_abort_work, ivpu_context_abort_thread_handler);
-
 	ret = drmm_mutex_init(&vdev->drm, &vdev->context_list_lock);
 	if (ret)
 		goto err_xa_destroy;
--- a/drivers/accel/ivpu/ivpu_drv.h
+++ b/drivers/accel/ivpu/ivpu_drv.h
@@ -137,12 +137,15 @@ struct ivpu_device {
 	struct mutex context_list_lock; /* Protects user context addition/removal */
 	struct xarray context_xa;
 	struct xa_limit context_xa_limit;
-	struct work_struct context_abort_work;
 
 	struct xarray db_xa;
 	struct xa_limit db_limit;
 	u32 db_next;
 
+	struct work_struct irq_ipc_work;
+	struct work_struct irq_dct_work;
+	struct work_struct context_abort_work;
+
 	struct mutex bo_list_lock; /* Protects bo_list */
 	struct list_head bo_list;
 
--- a/drivers/accel/ivpu/ivpu_hw.c
+++ b/drivers/accel/ivpu/ivpu_hw.c
@@ -285,8 +285,6 @@ void ivpu_hw_profiling_freq_drive(struct
 
 void ivpu_irq_handlers_init(struct ivpu_device *vdev)
 {
-	INIT_KFIFO(vdev->hw->irq.fifo);
-
 	if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX)
 		vdev->hw->irq.ip_irq_handler = ivpu_hw_ip_irq_handler_37xx;
 	else
@@ -300,7 +298,6 @@ void ivpu_irq_handlers_init(struct ivpu_
 
 void ivpu_hw_irq_enable(struct ivpu_device *vdev)
 {
-	kfifo_reset(&vdev->hw->irq.fifo);
 	ivpu_hw_ip_irq_enable(vdev);
 	ivpu_hw_btrs_irq_enable(vdev);
 }
@@ -327,8 +324,6 @@ irqreturn_t ivpu_hw_irq_handler(int irq,
 	/* Re-enable global interrupts to re-trigger MSI for pending interrupts */
 	ivpu_hw_btrs_global_int_enable(vdev);
 
-	if (!kfifo_is_empty(&vdev->hw->irq.fifo))
-		return IRQ_WAKE_THREAD;
 	if (ip_handled || btrs_handled)
 		return IRQ_HANDLED;
 	return IRQ_NONE;
--- a/drivers/accel/ivpu/ivpu_hw.h
+++ b/drivers/accel/ivpu/ivpu_hw.h
@@ -6,18 +6,10 @@
 #ifndef __IVPU_HW_H__
 #define __IVPU_HW_H__
 
-#include <linux/kfifo.h>
-
 #include "ivpu_drv.h"
 #include "ivpu_hw_btrs.h"
 #include "ivpu_hw_ip.h"
 
-#define IVPU_HW_IRQ_FIFO_LENGTH 1024
-
-#define IVPU_HW_IRQ_SRC_IPC 1
-#define IVPU_HW_IRQ_SRC_MMU_EVTQ 2
-#define IVPU_HW_IRQ_SRC_DCT 3
-
 struct ivpu_addr_range {
 	resource_size_t start;
 	resource_size_t end;
@@ -27,7 +19,6 @@ struct ivpu_hw_info {
 	struct {
 		bool (*btrs_irq_handler)(struct ivpu_device *vdev, int irq);
 		bool (*ip_irq_handler)(struct ivpu_device *vdev, int irq);
-		DECLARE_KFIFO(fifo, u8, IVPU_HW_IRQ_FIFO_LENGTH);
 	} irq;
 	struct {
 		struct ivpu_addr_range global;
--- a/drivers/accel/ivpu/ivpu_hw_btrs.c
+++ b/drivers/accel/ivpu/ivpu_hw_btrs.c
@@ -666,8 +666,7 @@ bool ivpu_hw_btrs_irq_handler_lnl(struct
 
 	if (REG_TEST_FLD(VPU_HW_BTRS_LNL_INTERRUPT_STAT, SURV_ERR, status)) {
 		ivpu_dbg(vdev, IRQ, "Survivability IRQ\n");
-		if (!kfifo_put(&vdev->hw->irq.fifo, IVPU_HW_IRQ_SRC_DCT))
-			ivpu_err_ratelimited(vdev, "IRQ FIFO full\n");
+		queue_work(system_wq, &vdev->irq_dct_work);
 	}
 
 	if (REG_TEST_FLD(VPU_HW_BTRS_LNL_INTERRUPT_STAT, FREQ_CHANGE, status)) {
--- a/drivers/accel/ivpu/ivpu_ipc.c
+++ b/drivers/accel/ivpu/ivpu_ipc.c
@@ -460,13 +460,12 @@ void ivpu_ipc_irq_handler(struct ivpu_de
 		}
 	}
 
-	if (!list_empty(&ipc->cb_msg_list))
-		if (!kfifo_put(&vdev->hw->irq.fifo, IVPU_HW_IRQ_SRC_IPC))
-			ivpu_err_ratelimited(vdev, "IRQ FIFO full\n");
+	queue_work(system_wq, &vdev->irq_ipc_work);
 }
 
-void ivpu_ipc_irq_thread_handler(struct ivpu_device *vdev)
+void ivpu_ipc_irq_work_fn(struct work_struct *work)
 {
+	struct ivpu_device *vdev = container_of(work, struct ivpu_device, irq_ipc_work);
 	struct ivpu_ipc_info *ipc = vdev->ipc;
 	struct ivpu_ipc_rx_msg *rx_msg, *r;
 	struct list_head cb_msg_list;
--- a/drivers/accel/ivpu/ivpu_ipc.h
+++ b/drivers/accel/ivpu/ivpu_ipc.h
@@ -90,7 +90,7 @@ void ivpu_ipc_disable(struct ivpu_device
 void ivpu_ipc_reset(struct ivpu_device *vdev);
 
 void ivpu_ipc_irq_handler(struct ivpu_device *vdev);
-void ivpu_ipc_irq_thread_handler(struct ivpu_device *vdev);
+void ivpu_ipc_irq_work_fn(struct work_struct *work);
 
 void ivpu_ipc_consumer_add(struct ivpu_device *vdev, struct ivpu_ipc_consumer *cons,
 			   u32 channel, ivpu_ipc_rx_callback_t callback);
--- a/drivers/accel/ivpu/ivpu_job.c
+++ b/drivers/accel/ivpu/ivpu_job.c
@@ -845,7 +845,7 @@ void ivpu_job_done_consumer_fini(struct
 	ivpu_ipc_consumer_del(vdev, &vdev->job_done_consumer);
 }
 
-void ivpu_context_abort_thread_handler(struct work_struct *work)
+void ivpu_context_abort_work_fn(struct work_struct *work)
 {
 	struct ivpu_device *vdev = container_of(work, struct ivpu_device, context_abort_work);
 	struct ivpu_file_priv *file_priv;
--- a/drivers/accel/ivpu/ivpu_job.h
+++ b/drivers/accel/ivpu/ivpu_job.h
@@ -66,7 +66,7 @@ void ivpu_cmdq_reset_all_contexts(struct
 
 void ivpu_job_done_consumer_init(struct ivpu_device *vdev);
 void ivpu_job_done_consumer_fini(struct ivpu_device *vdev);
-void ivpu_context_abort_thread_handler(struct work_struct *work);
+void ivpu_context_abort_work_fn(struct work_struct *work);
 
 void ivpu_jobs_abort_all(struct ivpu_device *vdev);
 
--- a/drivers/accel/ivpu/ivpu_pm.c
+++ b/drivers/accel/ivpu/ivpu_pm.c
@@ -464,8 +464,9 @@ int ivpu_pm_dct_disable(struct ivpu_devi
 	return 0;
 }
 
-void ivpu_pm_dct_irq_thread_handler(struct ivpu_device *vdev)
+void ivpu_pm_irq_dct_work_fn(struct work_struct *work)
 {
+	struct ivpu_device *vdev = container_of(work, struct ivpu_device, irq_dct_work);
 	bool enable;
 	int ret;
 
--- a/drivers/accel/ivpu/ivpu_pm.h
+++ b/drivers/accel/ivpu/ivpu_pm.h
@@ -45,6 +45,6 @@ void ivpu_stop_job_timeout_detection(str
 int ivpu_pm_dct_init(struct ivpu_device *vdev);
 int ivpu_pm_dct_enable(struct ivpu_device *vdev, u8 active_percent);
 int ivpu_pm_dct_disable(struct ivpu_device *vdev);
-void ivpu_pm_dct_irq_thread_handler(struct ivpu_device *vdev);
+void ivpu_pm_irq_dct_work_fn(struct work_struct *work);
 
 #endif /* __IVPU_PM_H__ */



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 137/145] accel/ivpu: Dump only first MMU fault from single context
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (135 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 136/145] accel/ivpu: Use workqueue for IRQ handling Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 138/145] accel/ivpu: Move parts of MMU event IRQ handling to thread handler Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Karol Wachowski, Maciej Falkowski,
	Jacek Lawrynowicz

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Karol Wachowski <karol.wachowski@intel.com>

commit 0240fa18d247c99a1967f2fed025296a89a1c5f5 upstream.

Stop dumping consecutive faults from an already faulty context immediately,
instead of waiting for the context abort thread handler (IRQ handler bottom
half) to abort currently executing jobs.

Remove 'R' (record events) bit from context descriptor of a faulty
context to prevent future faults generation.

This change speeds up the IRQ handler by eliminating the need to print the
fault content repeatedly. Additionally, it prevents flooding dmesg with
errors, which was occurring due to the delay in the bottom half of the
handler stopping fault-generating jobs.

Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250107173238.381120-7-maciej.falkowski@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/accel/ivpu/ivpu_mmu.c         |   51 ++++++++++++++++++++++++++++++----
 drivers/accel/ivpu/ivpu_mmu_context.c |   13 --------
 drivers/accel/ivpu/ivpu_mmu_context.h |    2 -
 3 files changed, 46 insertions(+), 20 deletions(-)

--- a/drivers/accel/ivpu/ivpu_mmu.c
+++ b/drivers/accel/ivpu/ivpu_mmu.c
@@ -870,23 +870,64 @@ static u32 *ivpu_mmu_get_event(struct iv
 	return evt;
 }
 
+static int ivpu_mmu_disable_events(struct ivpu_device *vdev, u32 ssid)
+{
+	struct ivpu_mmu_info *mmu = vdev->mmu;
+	struct ivpu_mmu_cdtab *cdtab = &mmu->cdtab;
+	u64 *entry;
+	u64 val;
+
+	if (ssid > IVPU_MMU_CDTAB_ENT_COUNT)
+		return -EINVAL;
+
+	entry = cdtab->base + (ssid * IVPU_MMU_CDTAB_ENT_SIZE);
+
+	val = READ_ONCE(entry[0]);
+	val &= ~IVPU_MMU_CD_0_R;
+	WRITE_ONCE(entry[0], val);
+
+	if (!ivpu_is_force_snoop_enabled(vdev))
+		clflush_cache_range(entry, IVPU_MMU_CDTAB_ENT_SIZE);
+
+	ivpu_mmu_cmdq_write_cfgi_all(vdev);
+
+	return 0;
+}
+
 void ivpu_mmu_irq_evtq_handler(struct ivpu_device *vdev)
 {
+	struct ivpu_file_priv *file_priv;
+	u32 last_ssid = -1;
 	u32 *event;
 	u32 ssid;
 
 	ivpu_dbg(vdev, IRQ, "MMU event queue\n");
 
-	while ((event = ivpu_mmu_get_event(vdev)) != NULL) {
-		ivpu_mmu_dump_event(vdev, event);
-
+	while ((event = ivpu_mmu_get_event(vdev))) {
 		ssid = FIELD_GET(IVPU_MMU_EVT_SSID_MASK, event[0]);
+
+		if (ssid == last_ssid)
+			continue;
+
+		xa_lock(&vdev->context_xa);
+		file_priv = xa_load(&vdev->context_xa, ssid);
+		if (file_priv) {
+			if (file_priv->has_mmu_faults) {
+				event = NULL;
+			} else {
+				ivpu_mmu_disable_events(vdev, ssid);
+				file_priv->has_mmu_faults = true;
+			}
+		}
+		xa_unlock(&vdev->context_xa);
+
+		if (event)
+			ivpu_mmu_dump_event(vdev, event);
+
 		if (ssid == IVPU_GLOBAL_CONTEXT_MMU_SSID) {
 			ivpu_pm_trigger_recovery(vdev, "MMU event");
 			return;
 		}
-
-		ivpu_mmu_user_context_mark_invalid(vdev, ssid);
 		REGV_WR32(IVPU_MMU_REG_EVTQ_CONS_SEC, vdev->mmu->evtq.cons);
 	}
 
--- a/drivers/accel/ivpu/ivpu_mmu_context.c
+++ b/drivers/accel/ivpu/ivpu_mmu_context.c
@@ -635,16 +635,3 @@ void ivpu_mmu_reserved_context_fini(stru
 	ivpu_mmu_cd_clear(vdev, vdev->rctx.id);
 	ivpu_mmu_context_fini(vdev, &vdev->rctx);
 }
-
-void ivpu_mmu_user_context_mark_invalid(struct ivpu_device *vdev, u32 ssid)
-{
-	struct ivpu_file_priv *file_priv;
-
-	xa_lock(&vdev->context_xa);
-
-	file_priv = xa_load(&vdev->context_xa, ssid);
-	if (file_priv)
-		file_priv->has_mmu_faults = true;
-
-	xa_unlock(&vdev->context_xa);
-}
--- a/drivers/accel/ivpu/ivpu_mmu_context.h
+++ b/drivers/accel/ivpu/ivpu_mmu_context.h
@@ -37,8 +37,6 @@ void ivpu_mmu_global_context_fini(struct
 int ivpu_mmu_reserved_context_init(struct ivpu_device *vdev);
 void ivpu_mmu_reserved_context_fini(struct ivpu_device *vdev);
 
-void ivpu_mmu_user_context_mark_invalid(struct ivpu_device *vdev, u32 ssid);
-
 int ivpu_mmu_context_insert_node(struct ivpu_mmu_context *ctx, const struct ivpu_addr_range *range,
 				 u64 size, struct drm_mm_node *node);
 void ivpu_mmu_context_remove_node(struct ivpu_mmu_context *ctx, struct drm_mm_node *node);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 138/145] accel/ivpu: Move parts of MMU event IRQ handling to thread handler
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (136 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 137/145] accel/ivpu: Dump only first MMU fault from single context Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 139/145] accel/ivpu: Fix missing MMU events from reserved SSID Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Karol Wachowski, Maciej Falkowski,
	Jacek Lawrynowicz

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Karol Wachowski <karol.wachowski@intel.com>

commit 4480912f3f8b8a1fbb5ae12c5c547fd094ec4197 upstream.

To prevent looping infinitely in MMU event handler we stop
generating new events by removing 'R' (record) bit from context
descriptor, but to ensure this change has effect KMD has to perform
configuration invalidation followed by sync command.

Because of that move parts of the interrupt handler that can take longer
to a thread not to block in interrupt handler for too long.
This includes:
 * disabling event queue for the time KMD updates MMU event queue consumer
   to ensure proper synchronization between MMU and KMD

 * removal of 'R' (record) bit from context descriptor to ensure no more
   faults are recorded until that context is destroyed

Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250107173238.381120-8-maciej.falkowski@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/accel/ivpu/ivpu_job.c |    7 ++-
 drivers/accel/ivpu/ivpu_mmu.c |   93 +++++++++++++++++++++++++++---------------
 drivers/accel/ivpu/ivpu_mmu.h |    2 
 3 files changed, 69 insertions(+), 33 deletions(-)

--- a/drivers/accel/ivpu/ivpu_job.c
+++ b/drivers/accel/ivpu/ivpu_job.c
@@ -17,6 +17,7 @@
 #include "ivpu_ipc.h"
 #include "ivpu_job.h"
 #include "ivpu_jsm_msg.h"
+#include "ivpu_mmu.h"
 #include "ivpu_pm.h"
 #include "ivpu_trace.h"
 #include "vpu_boot_api.h"
@@ -360,12 +361,16 @@ void ivpu_context_abort_locked(struct iv
 	struct ivpu_device *vdev = file_priv->vdev;
 
 	lockdep_assert_held(&file_priv->lock);
+	ivpu_dbg(vdev, JOB, "Context ID: %u abort\n", file_priv->ctx.id);
 
 	ivpu_cmdq_fini_all(file_priv);
 
 	if (vdev->fw->sched_mode == VPU_SCHEDULING_MODE_OS)
 		ivpu_jsm_context_release(vdev, file_priv->ctx.id);
 
+	ivpu_mmu_disable_ssid_events(vdev, file_priv->ctx.id);
+	ivpu_mmu_discard_events(vdev);
+
 	file_priv->aborted = true;
 }
 
@@ -849,8 +854,8 @@ void ivpu_context_abort_work_fn(struct w
 {
 	struct ivpu_device *vdev = container_of(work, struct ivpu_device, context_abort_work);
 	struct ivpu_file_priv *file_priv;
-	unsigned long ctx_id;
 	struct ivpu_job *job;
+	unsigned long ctx_id;
 	unsigned long id;
 
 	if (vdev->fw->sched_mode == VPU_SCHEDULING_MODE_HW)
--- a/drivers/accel/ivpu/ivpu_mmu.c
+++ b/drivers/accel/ivpu/ivpu_mmu.c
@@ -20,6 +20,12 @@
 #define IVPU_MMU_REG_CR0		      0x00200020u
 #define IVPU_MMU_REG_CR0ACK		      0x00200024u
 #define IVPU_MMU_REG_CR0ACK_VAL_MASK	      GENMASK(31, 0)
+#define IVPU_MMU_REG_CR0_ATSCHK_MASK	      BIT(4)
+#define IVPU_MMU_REG_CR0_CMDQEN_MASK	      BIT(3)
+#define IVPU_MMU_REG_CR0_EVTQEN_MASK	      BIT(2)
+#define IVPU_MMU_REG_CR0_PRIQEN_MASK	      BIT(1)
+#define IVPU_MMU_REG_CR0_SMMUEN_MASK	      BIT(0)
+
 #define IVPU_MMU_REG_CR1		      0x00200028u
 #define IVPU_MMU_REG_CR2		      0x0020002cu
 #define IVPU_MMU_REG_IRQ_CTRL		      0x00200050u
@@ -141,12 +147,6 @@
 #define IVPU_MMU_IRQ_EVTQ_EN		BIT(2)
 #define IVPU_MMU_IRQ_GERROR_EN		BIT(0)
 
-#define IVPU_MMU_CR0_ATSCHK		BIT(4)
-#define IVPU_MMU_CR0_CMDQEN		BIT(3)
-#define IVPU_MMU_CR0_EVTQEN		BIT(2)
-#define IVPU_MMU_CR0_PRIQEN		BIT(1)
-#define IVPU_MMU_CR0_SMMUEN		BIT(0)
-
 #define IVPU_MMU_CR1_TABLE_SH		GENMASK(11, 10)
 #define IVPU_MMU_CR1_TABLE_OC		GENMASK(9, 8)
 #define IVPU_MMU_CR1_TABLE_IC		GENMASK(7, 6)
@@ -596,7 +596,7 @@ static int ivpu_mmu_reset(struct ivpu_de
 	REGV_WR32(IVPU_MMU_REG_CMDQ_PROD, 0);
 	REGV_WR32(IVPU_MMU_REG_CMDQ_CONS, 0);
 
-	val = IVPU_MMU_CR0_CMDQEN;
+	val = REG_SET_FLD(IVPU_MMU_REG_CR0, CMDQEN, 0);
 	ret = ivpu_mmu_reg_write_cr0(vdev, val);
 	if (ret)
 		return ret;
@@ -617,12 +617,12 @@ static int ivpu_mmu_reset(struct ivpu_de
 	REGV_WR32(IVPU_MMU_REG_EVTQ_PROD_SEC, 0);
 	REGV_WR32(IVPU_MMU_REG_EVTQ_CONS_SEC, 0);
 
-	val |= IVPU_MMU_CR0_EVTQEN;
+	val = REG_SET_FLD(IVPU_MMU_REG_CR0, EVTQEN, val);
 	ret = ivpu_mmu_reg_write_cr0(vdev, val);
 	if (ret)
 		return ret;
 
-	val |= IVPU_MMU_CR0_ATSCHK;
+	val = REG_SET_FLD(IVPU_MMU_REG_CR0, ATSCHK, val);
 	ret = ivpu_mmu_reg_write_cr0(vdev, val);
 	if (ret)
 		return ret;
@@ -631,7 +631,7 @@ static int ivpu_mmu_reset(struct ivpu_de
 	if (ret)
 		return ret;
 
-	val |= IVPU_MMU_CR0_SMMUEN;
+	val = REG_SET_FLD(IVPU_MMU_REG_CR0, SMMUEN, val);
 	return ivpu_mmu_reg_write_cr0(vdev, val);
 }
 
@@ -870,7 +870,47 @@ static u32 *ivpu_mmu_get_event(struct iv
 	return evt;
 }
 
-static int ivpu_mmu_disable_events(struct ivpu_device *vdev, u32 ssid)
+static int ivpu_mmu_evtq_set(struct ivpu_device *vdev, bool enable)
+{
+	u32 val = REGV_RD32(IVPU_MMU_REG_CR0);
+
+	if (enable)
+		val = REG_SET_FLD(IVPU_MMU_REG_CR0, EVTQEN, val);
+	else
+		val = REG_CLR_FLD(IVPU_MMU_REG_CR0, EVTQEN, val);
+	REGV_WR32(IVPU_MMU_REG_CR0, val);
+
+	return REGV_POLL_FLD(IVPU_MMU_REG_CR0ACK, VAL, val, IVPU_MMU_REG_TIMEOUT_US);
+}
+
+static int ivpu_mmu_evtq_enable(struct ivpu_device *vdev)
+{
+	return ivpu_mmu_evtq_set(vdev, true);
+}
+
+static int ivpu_mmu_evtq_disable(struct ivpu_device *vdev)
+{
+	return ivpu_mmu_evtq_set(vdev, false);
+}
+
+void ivpu_mmu_discard_events(struct ivpu_device *vdev)
+{
+	/*
+	 * Disable event queue (stop MMU from updating the producer)
+	 * to allow synchronization of consumer and producer indexes
+	 */
+	ivpu_mmu_evtq_disable(vdev);
+
+	vdev->mmu->evtq.cons = REGV_RD32(IVPU_MMU_REG_EVTQ_PROD_SEC);
+	REGV_WR32(IVPU_MMU_REG_EVTQ_CONS_SEC, vdev->mmu->evtq.cons);
+	vdev->mmu->evtq.prod = REGV_RD32(IVPU_MMU_REG_EVTQ_PROD_SEC);
+
+	ivpu_mmu_evtq_enable(vdev);
+
+	drm_WARN_ON_ONCE(&vdev->drm, vdev->mmu->evtq.cons != vdev->mmu->evtq.prod);
+}
+
+int ivpu_mmu_disable_ssid_events(struct ivpu_device *vdev, u32 ssid)
 {
 	struct ivpu_mmu_info *mmu = vdev->mmu;
 	struct ivpu_mmu_cdtab *cdtab = &mmu->cdtab;
@@ -890,6 +930,7 @@ static int ivpu_mmu_disable_events(struc
 		clflush_cache_range(entry, IVPU_MMU_CDTAB_ENT_SIZE);
 
 	ivpu_mmu_cmdq_write_cfgi_all(vdev);
+	ivpu_mmu_cmdq_sync(vdev);
 
 	return 0;
 }
@@ -897,38 +938,26 @@ static int ivpu_mmu_disable_events(struc
 void ivpu_mmu_irq_evtq_handler(struct ivpu_device *vdev)
 {
 	struct ivpu_file_priv *file_priv;
-	u32 last_ssid = -1;
 	u32 *event;
 	u32 ssid;
 
 	ivpu_dbg(vdev, IRQ, "MMU event queue\n");
 
 	while ((event = ivpu_mmu_get_event(vdev))) {
-		ssid = FIELD_GET(IVPU_MMU_EVT_SSID_MASK, event[0]);
-
-		if (ssid == last_ssid)
-			continue;
+		ssid = FIELD_GET(IVPU_MMU_EVT_SSID_MASK, *event);
+		if (ssid == IVPU_GLOBAL_CONTEXT_MMU_SSID) {
+			ivpu_mmu_dump_event(vdev, event);
+			ivpu_pm_trigger_recovery(vdev, "MMU event");
+			return;
+		}
 
-		xa_lock(&vdev->context_xa);
 		file_priv = xa_load(&vdev->context_xa, ssid);
 		if (file_priv) {
-			if (file_priv->has_mmu_faults) {
-				event = NULL;
-			} else {
-				ivpu_mmu_disable_events(vdev, ssid);
-				file_priv->has_mmu_faults = true;
+			if (!READ_ONCE(file_priv->has_mmu_faults)) {
+				ivpu_mmu_dump_event(vdev, event);
+				WRITE_ONCE(file_priv->has_mmu_faults, true);
 			}
 		}
-		xa_unlock(&vdev->context_xa);
-
-		if (event)
-			ivpu_mmu_dump_event(vdev, event);
-
-		if (ssid == IVPU_GLOBAL_CONTEXT_MMU_SSID) {
-			ivpu_pm_trigger_recovery(vdev, "MMU event");
-			return;
-		}
-		REGV_WR32(IVPU_MMU_REG_EVTQ_CONS_SEC, vdev->mmu->evtq.cons);
 	}
 
 	queue_work(system_wq, &vdev->context_abort_work);
--- a/drivers/accel/ivpu/ivpu_mmu.h
+++ b/drivers/accel/ivpu/ivpu_mmu.h
@@ -47,5 +47,7 @@ int ivpu_mmu_invalidate_tlb(struct ivpu_
 void ivpu_mmu_irq_evtq_handler(struct ivpu_device *vdev);
 void ivpu_mmu_irq_gerr_handler(struct ivpu_device *vdev);
 void ivpu_mmu_evtq_dump(struct ivpu_device *vdev);
+void ivpu_mmu_discard_events(struct ivpu_device *vdev);
+int ivpu_mmu_disable_ssid_events(struct ivpu_device *vdev, u32 ssid);
 
 #endif /* __IVPU_MMU_H__ */



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 139/145] accel/ivpu: Fix missing MMU events from reserved SSID
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (137 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 138/145] accel/ivpu: Move parts of MMU event IRQ handling to thread handler Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 140/145] accel/ivpu: Fix missing MMU events if file_priv is unbound Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Karol Wachowski, Maciej Falkowski,
	Jacek Lawrynowicz

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Karol Wachowski <karol.wachowski@intel.com>

commit 353b8f48390d36b39276ff6af61464ec64cd4d5c upstream.

Generate recovery when fault from reserved context is detected.
Add Abort (A) bit to reserved (1) SSID to ensure NPU also receives a fault.

There is no way to create a file_priv with reserved SSID
but it is still possible to receive MMU faults from that SSID
as it is a default NPU HW setting. Such situation will occur if
FW freed context related resources but still performed access to DRAM.

Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250107173238.381120-9-maciej.falkowski@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/accel/ivpu/ivpu_mmu.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/accel/ivpu/ivpu_mmu.c
+++ b/drivers/accel/ivpu/ivpu_mmu.c
@@ -725,8 +725,8 @@ static int ivpu_mmu_cdtab_entry_set(stru
 	cd[2] = 0;
 	cd[3] = 0x0000000000007444;
 
-	/* For global context generate memory fault on VPU */
-	if (ssid == IVPU_GLOBAL_CONTEXT_MMU_SSID)
+	/* For global and reserved contexts generate memory fault on VPU */
+	if (ssid == IVPU_GLOBAL_CONTEXT_MMU_SSID || ssid == IVPU_RESERVED_CONTEXT_MMU_SSID)
 		cd[0] |= IVPU_MMU_CD_0_A;
 
 	if (valid)
@@ -945,7 +945,8 @@ void ivpu_mmu_irq_evtq_handler(struct iv
 
 	while ((event = ivpu_mmu_get_event(vdev))) {
 		ssid = FIELD_GET(IVPU_MMU_EVT_SSID_MASK, *event);
-		if (ssid == IVPU_GLOBAL_CONTEXT_MMU_SSID) {
+		if (ssid == IVPU_GLOBAL_CONTEXT_MMU_SSID ||
+		    ssid == IVPU_RESERVED_CONTEXT_MMU_SSID) {
 			ivpu_mmu_dump_event(vdev, event);
 			ivpu_pm_trigger_recovery(vdev, "MMU event");
 			return;



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 140/145] accel/ivpu: Fix missing MMU events if file_priv is unbound
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (138 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 139/145] accel/ivpu: Fix missing MMU events from reserved SSID Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 141/145] accel/ivpu: Flush pending jobs of devices workqueues Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Jacek Lawrynowicz, Karol Wachowski,
	Jeffrey Hugo

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Karol Wachowski <karol.wachowski@intel.com>

commit 2f5bbea1807a064a1e4c1b385c8cea4f37bb4b17 upstream.

Move the ivpu_mmu_discard_events() function to the common portion of
the abort work function. This ensures it is called only once, even if
there are no faulty contexts in context_xa, to guarantee that MMU events
are discarded and new events are not missed.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-4-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/accel/ivpu/ivpu_job.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/drivers/accel/ivpu/ivpu_job.c
+++ b/drivers/accel/ivpu/ivpu_job.c
@@ -369,7 +369,6 @@ void ivpu_context_abort_locked(struct iv
 		ivpu_jsm_context_release(vdev, file_priv->ctx.id);
 
 	ivpu_mmu_disable_ssid_events(vdev, file_priv->ctx.id);
-	ivpu_mmu_discard_events(vdev);
 
 	file_priv->aborted = true;
 }
@@ -872,6 +871,13 @@ void ivpu_context_abort_work_fn(struct w
 	}
 	mutex_unlock(&vdev->context_list_lock);
 
+	/*
+	 * We will not receive new MMU event interrupts until existing events are discarded
+	 * however, we want to discard these events only after aborting the faulty context
+	 * to avoid generating new faults from that context
+	 */
+	ivpu_mmu_discard_events(vdev);
+
 	if (vdev->fw->sched_mode != VPU_SCHEDULING_MODE_HW)
 		return;
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 141/145] accel/ivpu: Flush pending jobs of devices workqueues
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (139 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 140/145] accel/ivpu: Fix missing MMU events if file_priv is unbound Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 142/145] drm/xe/gsc: do not flush the GSC worker from the reset path Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Maciej Falkowski, Lizhi Hou,
	Jeff Hugo, Jacek Lawrynowicz

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Maciej Falkowski <maciej.falkowski@linux.intel.com>

commit 683e9fa1c885a0cffbc10b459a7eee9df92af1c1 upstream.

Use flush_work() instead of cancel_work_sync() for driver IRQ
workqueues to guarantee that remaining pending work
will be handled.

This resolves two issues that were encountered where a driver was left
in an incorrect state as the bottom-half was canceled:

1. Cancelling context-abort of a job that is still executing and
   is causing translation faults which is going to cause additional TDRs

2. Cancelling bottom-half of a DCT (duty-cycle throttling) request
   which will cause a device to not be adjusted to an external frequency
   request.

Fixes: bc3e5f48b7ee ("accel/ivpu: Use workqueue for IRQ handling")
Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://lore.kernel.org/r/20250401155755.4049156-1-maciej.falkowski@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/accel/ivpu/ivpu_drv.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -420,9 +420,9 @@ void ivpu_prepare_for_reset(struct ivpu_
 {
 	ivpu_hw_irq_disable(vdev);
 	disable_irq(vdev->irq);
-	cancel_work_sync(&vdev->irq_ipc_work);
-	cancel_work_sync(&vdev->irq_dct_work);
-	cancel_work_sync(&vdev->context_abort_work);
+	flush_work(&vdev->irq_ipc_work);
+	flush_work(&vdev->irq_dct_work);
+	flush_work(&vdev->context_abort_work);
 	ivpu_ipc_disable(vdev);
 	ivpu_mmu_disable(vdev);
 }



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 142/145] drm/xe/gsc: do not flush the GSC worker from the reset path
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (140 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 141/145] accel/ivpu: Flush pending jobs of devices workqueues Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 143/145] mm/page_alloc: fix race condition in unaccepted memory handling Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Daniele Ceraolo Spurio,
	John Harrison, Alan Previn, Julia Filipchuk, Lucas De Marchi

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

commit 03552d8ac0afcc080c339faa0b726e2c0e9361cb upstream.

The workqueue used for the reset worker is marked as WQ_MEM_RECLAIM,
while the GSC one isn't (and can't be as we need to do memory
allocations in the gsc worker). Therefore, we can't flush the latter
from the former.

The reason why we had such a flush was to avoid interrupting either
the GSC FW load or in progress GSC proxy operations. GSC proxy
operations fall into 2 categories:

1) GSC proxy init: this only happens once immediately after GSC FW load
   and does not support being interrupted. The only way to recover from
   an interruption of the proxy init is to do an FLR and re-load the GSC.

2) GSC proxy request: this can happen in response to a request that
   the driver sends to the GSC. If this is interrupted, the GSC FW will
   timeout and the driver request will be failed, but overall the GSC
   will keep working fine.

Flushing the work allowed us to avoid interruption in both cases (unless
the hang came from the GSC engine itself, in which case we're toast
anyway). However, a failure on a proxy request is tolerable if we're in
a scenario where we're triggering a GT reset (i.e., something is already
gone pretty wrong), so what we really need to avoid is interrupting
the init flow, which we can do by polling on the register that reports
when the proxy init is complete (as that ensure us that all the load and
init operations have been completed).

Note that during suspend we still want to do a flush of the worker to
make sure it completes any operations involving the HW before the power
is cut.

v2: fix spelling in commit msg, rename waiter function (Julia)

Fixes: dd0e89e5edc2 ("drm/xe/gsc: GSC FW load")
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4830
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: <stable@vger.kernel.org> # v6.8+
Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com>
Link: https://lore.kernel.org/r/20250502155104.2201469-1-daniele.ceraolospurio@intel.com
(cherry picked from commit 12370bfcc4f0bdf70279ec5b570eb298963422b5)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/xe/xe_gsc.c       |   22 ++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_gsc.h       |    1 +
 drivers/gpu/drm/xe/xe_gsc_proxy.c |   11 +++++++++++
 drivers/gpu/drm/xe/xe_gsc_proxy.h |    1 +
 drivers/gpu/drm/xe/xe_gt.c        |    2 +-
 drivers/gpu/drm/xe/xe_uc.c        |    8 +++++++-
 drivers/gpu/drm/xe/xe_uc.h        |    1 +
 7 files changed, 44 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/xe/xe_gsc.c
+++ b/drivers/gpu/drm/xe/xe_gsc.c
@@ -564,6 +564,28 @@ void xe_gsc_remove(struct xe_gsc *gsc)
 	xe_gsc_proxy_remove(gsc);
 }
 
+void xe_gsc_stop_prepare(struct xe_gsc *gsc)
+{
+	struct xe_gt *gt = gsc_to_gt(gsc);
+	int ret;
+
+	if (!xe_uc_fw_is_loadable(&gsc->fw) || xe_uc_fw_is_in_error_state(&gsc->fw))
+		return;
+
+	xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GSC);
+
+	/*
+	 * If the GSC FW load or the proxy init are interrupted, the only way
+	 * to recover it is to do an FLR and reload the GSC from scratch.
+	 * Therefore, let's wait for the init to complete before stopping
+	 * operations. The proxy init is the last step, so we can just wait on
+	 * that
+	 */
+	ret = xe_gsc_wait_for_proxy_init_done(gsc);
+	if (ret)
+		xe_gt_err(gt, "failed to wait for GSC init completion before uc stop\n");
+}
+
 /*
  * wa_14015076503: if the GSC FW is loaded, we need to alert it before doing a
  * GSC engine reset by writing a notification bit in the GS1 register and then
--- a/drivers/gpu/drm/xe/xe_gsc.h
+++ b/drivers/gpu/drm/xe/xe_gsc.h
@@ -16,6 +16,7 @@ struct xe_hw_engine;
 int xe_gsc_init(struct xe_gsc *gsc);
 int xe_gsc_init_post_hwconfig(struct xe_gsc *gsc);
 void xe_gsc_wait_for_worker_completion(struct xe_gsc *gsc);
+void xe_gsc_stop_prepare(struct xe_gsc *gsc);
 void xe_gsc_load_start(struct xe_gsc *gsc);
 void xe_gsc_remove(struct xe_gsc *gsc);
 void xe_gsc_hwe_irq_handler(struct xe_hw_engine *hwe, u16 intr_vec);
--- a/drivers/gpu/drm/xe/xe_gsc_proxy.c
+++ b/drivers/gpu/drm/xe/xe_gsc_proxy.c
@@ -71,6 +71,17 @@ bool xe_gsc_proxy_init_done(struct xe_gs
 	       HECI1_FWSTS1_PROXY_STATE_NORMAL;
 }
 
+int xe_gsc_wait_for_proxy_init_done(struct xe_gsc *gsc)
+{
+	struct xe_gt *gt = gsc_to_gt(gsc);
+
+	/* Proxy init can take up to 500ms, so wait double that for safety */
+	return xe_mmio_wait32(&gt->mmio, HECI_FWSTS1(MTL_GSC_HECI1_BASE),
+			      HECI1_FWSTS1_CURRENT_STATE,
+			      HECI1_FWSTS1_PROXY_STATE_NORMAL,
+			      USEC_PER_SEC, NULL, false);
+}
+
 static void __gsc_proxy_irq_rmw(struct xe_gsc *gsc, u32 clr, u32 set)
 {
 	struct xe_gt *gt = gsc_to_gt(gsc);
--- a/drivers/gpu/drm/xe/xe_gsc_proxy.h
+++ b/drivers/gpu/drm/xe/xe_gsc_proxy.h
@@ -13,6 +13,7 @@ struct xe_gsc;
 int xe_gsc_proxy_init(struct xe_gsc *gsc);
 bool xe_gsc_proxy_init_done(struct xe_gsc *gsc);
 void xe_gsc_proxy_remove(struct xe_gsc *gsc);
+int xe_gsc_wait_for_proxy_init_done(struct xe_gsc *gsc);
 int xe_gsc_proxy_start(struct xe_gsc *gsc);
 
 int xe_gsc_proxy_request_handler(struct xe_gsc *gsc);
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -862,7 +862,7 @@ void xe_gt_suspend_prepare(struct xe_gt
 
 	fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
 
-	xe_uc_stop_prepare(&gt->uc);
+	xe_uc_suspend_prepare(&gt->uc);
 
 	xe_force_wake_put(gt_to_fw(gt), fw_ref);
 }
--- a/drivers/gpu/drm/xe/xe_uc.c
+++ b/drivers/gpu/drm/xe/xe_uc.c
@@ -241,7 +241,7 @@ void xe_uc_gucrc_disable(struct xe_uc *u
 
 void xe_uc_stop_prepare(struct xe_uc *uc)
 {
-	xe_gsc_wait_for_worker_completion(&uc->gsc);
+	xe_gsc_stop_prepare(&uc->gsc);
 	xe_guc_stop_prepare(&uc->guc);
 }
 
@@ -275,6 +275,12 @@ again:
 		goto again;
 }
 
+void xe_uc_suspend_prepare(struct xe_uc *uc)
+{
+	xe_gsc_wait_for_worker_completion(&uc->gsc);
+	xe_guc_stop_prepare(&uc->guc);
+}
+
 int xe_uc_suspend(struct xe_uc *uc)
 {
 	/* GuC submission not enabled, nothing to do */
--- a/drivers/gpu/drm/xe/xe_uc.h
+++ b/drivers/gpu/drm/xe/xe_uc.h
@@ -18,6 +18,7 @@ int xe_uc_reset_prepare(struct xe_uc *uc
 void xe_uc_stop_prepare(struct xe_uc *uc);
 void xe_uc_stop(struct xe_uc *uc);
 int xe_uc_start(struct xe_uc *uc);
+void xe_uc_suspend_prepare(struct xe_uc *uc);
 int xe_uc_suspend(struct xe_uc *uc);
 int xe_uc_sanitize_reset(struct xe_uc *uc);
 void xe_uc_remove(struct xe_uc *uc);



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 143/145] mm/page_alloc: fix race condition in unaccepted memory handling
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (141 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 142/145] drm/xe/gsc: do not flush the GSC worker from the reset path Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 144/145] perf tools: Fix build error for LoongArch Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, Kirill A. Shutemov, Borislav Petkov,
	Thomas Gleixner, Vlastimil Babka, Suren Baghdasaryan,
	Michal Hocko, Brendan Jackman, Johannes Weiner, Andrew Morton

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

commit fefc075182275057ce607effaa3daa9e6e3bdc73 upstream.

The page allocator tracks the number of zones that have unaccepted memory
using static_branch_enc/dec() and uses that static branch in hot paths to
determine if it needs to deal with unaccepted memory.

Borislav and Thomas pointed out that the tracking is racy: operations on
static_branch are not serialized against adding/removing unaccepted pages
to/from the zone.

Sanity checks inside static_branch machinery detects it:

WARNING: CPU: 0 PID: 10 at kernel/jump_label.c:276 __static_key_slow_dec_cpuslocked+0x8e/0xa0

The comment around the WARN() explains the problem:

	/*
	 * Warn about the '-1' case though; since that means a
	 * decrement is concurrent with a first (0->1) increment. IOW
	 * people are trying to disable something that wasn't yet fully
	 * enabled. This suggests an ordering problem on the user side.
	 */

The effect of this static_branch optimization is only visible on
microbenchmark.

Instead of adding more complexity around it, remove it altogether.

Link: https://lkml.kernel.org/r/20250506133207.1009676-1-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory")
Link: https://lore.kernel.org/all/20250506092445.GBaBnVXXyvnazly6iF@fat_crate.local
Reported-by: Borislav Petkov <bp@alien8.de>
Tested-by: Borislav Petkov (AMD) <bp@alien8.de>
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: <stable@vger.kernel.org>	[6.5+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 mm/page_alloc.c |   23 -----------------------
 1 file changed, 23 deletions(-)

--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6951,9 +6951,6 @@ bool has_managed_dma(void)
 
 #ifdef CONFIG_UNACCEPTED_MEMORY
 
-/* Counts number of zones with unaccepted pages. */
-static DEFINE_STATIC_KEY_FALSE(zones_with_unaccepted_pages);
-
 static bool lazy_accept = true;
 
 static int __init accept_memory_parse(char *p)
@@ -6980,11 +6977,7 @@ static bool page_contains_unaccepted(str
 static void __accept_page(struct zone *zone, unsigned long *flags,
 			  struct page *page)
 {
-	bool last;
-
 	list_del(&page->lru);
-	last = list_empty(&zone->unaccepted_pages);
-
 	account_freepages(zone, -MAX_ORDER_NR_PAGES, MIGRATE_MOVABLE);
 	__mod_zone_page_state(zone, NR_UNACCEPTED, -MAX_ORDER_NR_PAGES);
 	__ClearPageUnaccepted(page);
@@ -6993,9 +6986,6 @@ static void __accept_page(struct zone *z
 	accept_memory(page_to_phys(page), PAGE_SIZE << MAX_PAGE_ORDER);
 
 	__free_pages_ok(page, MAX_PAGE_ORDER, FPI_TO_TAIL);
-
-	if (last)
-		static_branch_dec(&zones_with_unaccepted_pages);
 }
 
 void accept_page(struct page *page)
@@ -7032,19 +7022,11 @@ static bool try_to_accept_memory_one(str
 	return true;
 }
 
-static inline bool has_unaccepted_memory(void)
-{
-	return static_branch_unlikely(&zones_with_unaccepted_pages);
-}
-
 static bool cond_accept_memory(struct zone *zone, unsigned int order)
 {
 	long to_accept, wmark;
 	bool ret = false;
 
-	if (!has_unaccepted_memory())
-		return false;
-
 	if (list_empty(&zone->unaccepted_pages))
 		return false;
 
@@ -7078,22 +7060,17 @@ static bool __free_unaccepted(struct pag
 {
 	struct zone *zone = page_zone(page);
 	unsigned long flags;
-	bool first = false;
 
 	if (!lazy_accept)
 		return false;
 
 	spin_lock_irqsave(&zone->lock, flags);
-	first = list_empty(&zone->unaccepted_pages);
 	list_add_tail(&page->lru, &zone->unaccepted_pages);
 	account_freepages(zone, MAX_ORDER_NR_PAGES, MIGRATE_MOVABLE);
 	__mod_zone_page_state(zone, NR_UNACCEPTED, MAX_ORDER_NR_PAGES);
 	__SetPageUnaccepted(page);
 	spin_unlock_irqrestore(&zone->lock, flags);
 
-	if (first)
-		static_branch_inc(&zones_with_unaccepted_pages);
-
 	return true;
 }
 



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 144/145] perf tools: Fix build error for LoongArch
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (142 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 143/145] mm/page_alloc: fix race condition in unaccepted memory handling Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 13:51 ` [PATCH 6.14 145/145] phy: tegra: xusb: remove a stray unlock Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Tiezhu Yang

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tiezhu Yang <yangtiezhu@loongson.cn>

There exists the following error when building perf tools on LoongArch:

  CC      util/syscalltbl.o
In file included from util/syscalltbl.c:16:
tools/perf/arch/loongarch/include/syscall_table.h:2:10: fatal error: asm/syscall_table_64.h: No such file or directory
    2 | #include <asm/syscall_table_64.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

This is because the generated syscall header is syscalls_64.h rather
than syscall_table_64.h. The above problem was introduced from v6.14,
then the header syscall_table.h has been removed from mainline tree
in commit af472d3c4454 ("perf syscalltbl: Remove syscall_table.h"),
just fix it only for the linux-6.14.y branch of stable tree.

By the way, no need to fix the mainline tree and there is no upstream
git id for this patch.

How to reproduce:

  git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
  cd linux && git checkout origin/linux-6.14.y
  make JOBS=1 -C tools/perf

Fixes: fa70857a27e5 ("perf tools loongarch: Use syscall table")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 tools/perf/arch/loongarch/include/syscall_table.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tools/perf/arch/loongarch/include/syscall_table.h
+++ b/tools/perf/arch/loongarch/include/syscall_table.h
@@ -1,2 +1,2 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-#include <asm/syscall_table_64.h>
+#include <asm/syscalls_64.h>



^ permalink raw reply	[flat|nested] 165+ messages in thread

* [PATCH 6.14 145/145] phy: tegra: xusb: remove a stray unlock
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (143 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 144/145] perf tools: Fix build error for LoongArch Greg Kroah-Hartman
@ 2025-05-20 13:51 ` Greg Kroah-Hartman
  2025-05-20 14:57 ` [PATCH 6.14 000/145] 6.14.8-rc1 review Ronald Warsow
                   ` (11 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-20 13:51 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, patches, Dan Carpenter, Jon Hunter,
	Vinod Koul

6.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <dan.carpenter@linaro.org>

commit 83c178470e0bf690d34c8c08440f2421b82e881c upstream.

We used to take a lock in tegra186_utmi_bias_pad_power_on() but now we
have moved the lock into the caller.  Unfortunately, when we moved the
lock this unlock was left behind and it results in a double unlock.
Delete it now.

Fixes: b47158fb4295 ("phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/aAjmR6To4EnvRl4G@stanley.mountain
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/phy/tegra/xusb-tegra186.c |    2 --
 1 file changed, 2 deletions(-)

--- a/drivers/phy/tegra/xusb-tegra186.c
+++ b/drivers/phy/tegra/xusb-tegra186.c
@@ -656,8 +656,6 @@ static void tegra186_utmi_bias_pad_power
 	} else {
 		clk_disable_unprepare(priv->usb2_trk_clk);
 	}
-
-	mutex_unlock(&padctl->lock);
 }
 
 static void tegra186_utmi_bias_pad_power_off(struct tegra_xusb_padctl *padctl)



^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (144 preceding siblings ...)
  2025-05-20 13:51 ` [PATCH 6.14 145/145] phy: tegra: xusb: remove a stray unlock Greg Kroah-Hartman
@ 2025-05-20 14:57 ` Ronald Warsow
  2025-05-20 16:46   ` Luna Jernberg
  2025-05-20 18:57 ` Florian Fainelli
                   ` (10 subsequent siblings)
  156 siblings, 1 reply; 165+ messages in thread
From: Ronald Warsow @ 2025-05-20 14:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, stable
  Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
	conor, hargar, broonie

Hi Greg

no regressions here on x86_64 (RKL, Intel 11th Gen. CPU)

Thanks

Tested-by: Ronald Warsow <rwarsow@gmx.de>


^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 14:57 ` [PATCH 6.14 000/145] 6.14.8-rc1 review Ronald Warsow
@ 2025-05-20 16:46   ` Luna Jernberg
  0 siblings, 0 replies; 165+ messages in thread
From: Luna Jernberg @ 2025-05-20 16:46 UTC (permalink / raw)
  To: Ronald Warsow, Christian Heusel, Luna Jernberg
  Cc: Greg Kroah-Hartman, stable, patches, linux-kernel, torvalds, akpm,
	linux, shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, conor, hargar, broonie

Tested-by: Luna Jernberg <droidbittin@gmail.com>

AMD Ryzen 5 5600 6-Core Processor:
https://www.inet.se/produkt/5304697/amd-ryzen-5-5600-3-5-ghz-35mb on a
https://www.gigabyte.com/Motherboard/B550-AORUS-ELITE-V2-rev-12
https://www.inet.se/produkt/1903406/gigabyte-b550-aorus-elite-v2
motherboard :)

running Arch Linux with the testing repos enabled:
https://archlinux.org/ https://archboot.com/
https://wiki.archlinux.org/title/Arch_Testing_Team

and the amdgpu thing is fixed :)

Den tis 20 maj 2025 kl 16:57 skrev Ronald Warsow <rwarsow@gmx.de>:
>
> Hi Greg
>
> no regressions here on x86_64 (RKL, Intel 11th Gen. CPU)
>
> Thanks
>
> Tested-by: Ronald Warsow <rwarsow@gmx.de>
>
>

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (145 preceding siblings ...)
  2025-05-20 14:57 ` [PATCH 6.14 000/145] 6.14.8-rc1 review Ronald Warsow
@ 2025-05-20 18:57 ` Florian Fainelli
  2025-05-20 19:26 ` Miguel Ojeda
                   ` (9 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Florian Fainelli @ 2025-05-20 18:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, stable
  Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, sudipm.mukherjee, srw, rwarsow,
	conor, hargar, broonie

On 5/20/25 06:49, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h

On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on 
BMIPS_GENERIC:

Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (146 preceding siblings ...)
  2025-05-20 18:57 ` Florian Fainelli
@ 2025-05-20 19:26 ` Miguel Ojeda
  2025-05-20 21:12 ` Shuah Khan
                   ` (8 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Miguel Ojeda @ 2025-05-20 19:26 UTC (permalink / raw)
  To: gregkh
  Cc: akpm, broonie, conor, f.fainelli, hargar, jonathanh, linux-kernel,
	linux, lkft-triage, patches, patches, pavel, rwarsow, shuah, srw,
	stable, sudipm.mukherjee, torvalds, Miguel Ojeda

On Tue, 20 May 2025 15:49:30 +0200 Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> Anything received after that time might be too late.

Boot-tested under QEMU for Rust x86_64, arm64 and riscv64; built-tested
for loongarch64:

Tested-by: Miguel Ojeda <ojeda@kernel.org>

Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (147 preceding siblings ...)
  2025-05-20 19:26 ` Miguel Ojeda
@ 2025-05-20 21:12 ` Shuah Khan
  2025-05-20 21:34 ` Eric Naim
                   ` (7 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Shuah Khan @ 2025-05-20 21:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, stable
  Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
	rwarsow, conor, hargar, broonie, Shuah Khan

On 5/20/25 07:49, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

Compiled and booted on my test system. No dmesg regressions.

Tested-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (148 preceding siblings ...)
  2025-05-20 21:12 ` Shuah Khan
@ 2025-05-20 21:34 ` Eric Naim
  2025-05-21  2:42   ` Mario Limonciello
  2025-05-21  1:25 ` Ron Economos
                   ` (6 subsequent siblings)
  156 siblings, 1 reply; 165+ messages in thread
From: Eric Naim @ 2025-05-20 21:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman, stable
  Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
	rwarsow, conor, hargar, broonie, David.Wu3, alexander.deucher,
	mario.limonciello

[-- Attachment #1: Type: text/plain, Size: 8795 bytes --]

Hi Greg,

On 5/20/25 21:49, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 
> -------------
> Pseudo-Shortlog of commits:
> 
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>     Linux 6.14.8-rc1
> 
> Dan Carpenter <dan.carpenter@linaro.org>
>     phy: tegra: xusb: remove a stray unlock
> 
> Tiezhu Yang <yangtiezhu@loongson.cn>
>     perf tools: Fix build error for LoongArch
> 
> Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>     mm/page_alloc: fix race condition in unaccepted memory handling
> 
> Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>     drm/xe/gsc: do not flush the GSC worker from the reset path
> 
> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>     accel/ivpu: Flush pending jobs of device's workqueues
> 
> Karol Wachowski <karol.wachowski@intel.com>
>     accel/ivpu: Fix missing MMU events if file_priv is unbound
> 
> Karol Wachowski <karol.wachowski@intel.com>
>     accel/ivpu: Fix missing MMU events from reserved SSID
> 
> Karol Wachowski <karol.wachowski@intel.com>
>     accel/ivpu: Move parts of MMU event IRQ handling to thread handler
> 
> Karol Wachowski <karol.wachowski@intel.com>
>     accel/ivpu: Dump only first MMU fault from single context
> 
> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>     accel/ivpu: Use workqueue for IRQ handling
> 
> Shuai Xue <xueshuai@linux.alibaba.com>
>     dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
> 
> Shuai Xue <xueshuai@linux.alibaba.com>
>     dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
> 
> Shuai Xue <xueshuai@linux.alibaba.com>
>     dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
> 
> Shuai Xue <xueshuai@linux.alibaba.com>
>     dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
> 
> Shuai Xue <xueshuai@linux.alibaba.com>
>     dmaengine: idxd: Add missing cleanups in cleanup internals
> 
> Shuai Xue <xueshuai@linux.alibaba.com>
>     dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
> 
> Shuai Xue <xueshuai@linux.alibaba.com>
>     dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
> 
> Shuai Xue <xueshuai@linux.alibaba.com>
>     dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
> 
> Shuai Xue <xueshuai@linux.alibaba.com>
>     dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
> 
> Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
>     dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
> 
> Ronald Wahl <ronald.wahl@legrand.com>
>     dmaengine: ti: k3-udma: Add missing locking
> 
> Barry Song <baohua@kernel.org>
>     mm: userfaultfd: correct dirty flags set for both present and swap pte
> 
> Wupeng Ma <mawupeng1@huawei.com>
>     mm: hugetlb: fix incorrect fallback for subpool
> 
> hexue <xue01.he@samsung.com>
>     io_uring/uring_cmd: fix hybrid polling initialization issue
> 
> Jens Axboe <axboe@kernel.dk>
>     io_uring/memmap: don't use page_address() on a highmem page
> 
> Nathan Chancellor <nathan@kernel.org>
>     net: qede: Initialize qede_ll_ops with designated initializer
> 
> Steven Rostedt <rostedt@goodmis.org>
>     ring-buffer: Fix persistent buffer when commit page is the reader page
> 
> Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
>     wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
> 
> Fedor Pchelkin <pchelkin@ispras.ru>
>     wifi: mt76: disable napi on driver removal
> 
> Jarkko Sakkinen <jarkko@kernel.org>
>     tpm: Mask TPM RC in tpm2_start_auth_session()
> 
> Aaron Kling <webgeek1234@gmail.com>
>     spi: tegra114: Use value to check for invalid delays
> 
> Jethro Donaldson <devel@jro.nz>
>     smb: client: fix memory leak during error handling for POSIX mkdir
> 
> Steve Siwinski <ssiwinski@atto.com>
>     scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
> 
> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>     phy: renesas: rcar-gen3-usb2: Set timing registers only once
> 
> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>     phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
> 
> Oleksij Rempel <o.rempel@pengutronix.de>
>     net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
> 
> Oleksij Rempel <o.rempel@pengutronix.de>
>     net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches
> 
> Ma Ke <make24@iscas.ac.cn>
>     phy: Fix error handling in tegra_xusb_port_init
> 
> Wayne Chang <waynec@nvidia.com>
>     phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
> 
> Steven Rostedt <rostedt@goodmis.org>
>     tracing: samples: Initialize trace_array_printk() with the correct function
> 
> Ashish Kalra <ashish.kalra@amd.com>
>     x86/sev: Make sure pages are not skipped during kdump
> 
> Ashish Kalra <ashish.kalra@amd.com>
>     x86/sev: Do not touch VMSA pages during SNP guest memory kdump
> 
> pengdonglin <pengdonglin@xiaomi.com>
>     ftrace: Fix preemption accounting for stacktrace filter command
> 
> pengdonglin <pengdonglin@xiaomi.com>
>     ftrace: Fix preemption accounting for stacktrace trigger command
> 
> Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>     i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
> 
> Nathan Chancellor <nathan@kernel.org>
>     kbuild: Disable -Wdefault-const-init-unsafe
> 
> Michael Kelley <mhklinux@outlook.com>
>     Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
> 
> Michael Kelley <mhklinux@outlook.com>
>     Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
> 
> Michael Kelley <mhklinux@outlook.com>
>     hv_netvsc: Remove rmsg_pgcnt
> 
> Michael Kelley <mhklinux@outlook.com>
>     hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
> 
> Michael Kelley <mhklinux@outlook.com>
>     hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
> 
> Dragan Simic <dsimic@manjaro.org>
>     arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
> 
> Sam Edwards <cfsworks@gmail.com>
>     arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
> 
> Christian Hewitt <christianshewitt@gmail.com>
>     arm64: dts: amlogic: dreambox: fix missing clkc_audio node
> 
> Hyejeong Choi <hjeong.choi@samsung.com>
>     dma-buf: insert memory barrier before updating num_fences
> 
> Nicolas Chauvet <kwizart@gmail.com>
>     ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
> 
> Christian Heusel <christian@heusel.eu>
>     ALSA: usb-audio: Add sample rate quirk for Audioengine D1
> 
> Wentao Liang <vulab@iscas.ac.cn>
>     ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
> 
> Jeremy Linton <jeremy.linton@arm.com>
>     ACPI: PPTT: Fix processor subtable walk
> 
> Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>     gpio: pca953x: fix IRQ storm on system wake up
> 
> Alexey Makhalov <alexey.makhalov@broadcom.com>
>     MAINTAINERS: Update Alexey Makhalov's email address
> 
> Wayne Lin <Wayne.Lin@amd.com>
>     drm/amd/display: Avoid flooding unnecessary info messages
> 
> Wayne Lin <Wayne.Lin@amd.com>
>     drm/amd/display: Correct the reply value when AUX write incomplete
> 
> Philip Yang <Philip.Yang@amd.com>
>     drm/amdgpu: csa unmap use uninterruptible lock
> 
> Tim Huang <tim.huang@amd.com>
>     drm/amdgpu: fix incorrect MALL size for GFX1151
> 
> David (Ming Qiang) Wu <David.Wu3@amd.com>
>     drm/amdgpu: read back register after written for VCN v4.0.5
> 

This commit seems to breaking a couple of devices with the Phoenix APU, most notably the Ryzen AI chips. Note that this commit in mainline seems to work as intended, and after doing a little bit of digging, [1] landed in 6.15 and so this cherrypick may not be so trivial after all. Attached is a kernel trace highlighting the breakage caused by this commit, along with [2] for the full log.

Also adding Alex, David and Mario to Ccs.

-- 
Regards,
  Eric

[1] https://lore.kernel.org/20250131165741.1798488-6-alexander.deucher@amd.com/
[2] https://paste.cachyos.org/p/d853a3c.log

[-- Attachment #2: dmesg.log --]
[-- Type: text/x-log, Size: 5457 bytes --]

[    6.555330] BUG: kernel NULL pointer dereference, address: 0000000000000004
[    6.555356] #PF: supervisor read access in kernel mode
[    6.555369] #PF: error_code(0x0000) - not-present page
[    6.555383] PGD 0 P4D 0 
[    6.555392] Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
[    6.555405] CPU: 14 UID: 0 PID: 309 Comm: (udev-worker) Tainted: G           OE      6.14.8-rc1-1home #1 060382169f0a0ecf708a88bba8302caae5301755
[    6.555429] Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
[    6.555441] Hardware name: ASUSTeK COMPUTER INC. ROG Zephyrus G16 GA605WV_GA605WV/GA605WV, BIOS GA605WV.310 12/23/2024
[    6.555458] RIP: 0010:vcn_v4_0_5_set_powergating_state+0xb40/0x38c0 [amdgpu]
[    6.555702] Code: 00 31 d2 48 89 ef e8 4f 8c df ff 0f b6 85 79 ee 02 00 41 83 c4 01 41 39 c4 0f 8c 6a f5 ff ff 49 63 c4 48 8b 84 c5 20 8c 04 00 <8b> 70 04 81 c6 85 00 00 00 f6 85 58 bd 04 00 04 74 0e 48 83 bd 30
[    6.555733] RSP: 0018:ffffbd0880dd7760 EFLAGS: 00010246
[    6.555746] RAX: 0000000000000000 RBX: ffff9feb2d200000 RCX: 0000000040000c48
[    6.555761] RDX: ffffbd088601f9c8 RSI: 0000000000007e72 RDI: ffff9feb2d200000
[    6.555776] RBP: ffff9feb2d200000 R08: 0000000000000000 R09: 0000000000000014
[    6.555790] R10: ffff9feb16a44280 R11: 0000000000000001 R12: 0000000000000001
[    6.555805] R13: 0000000000000001 R14: 000000000000000b R15: 0000000000000000
[    6.555820] FS:  00007f9941779880(0000) GS:ffff9ff161d00000(0000) knlGS:0000000000000000
[    6.555836] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    6.555849] CR2: 0000000000000004 CR3: 0000000110f51000 CR4: 0000000000f50ef0
[    6.555864] PKRU: 55555554
[    6.555872] Call Trace:
[    6.555879]  <TASK>
[    6.555885]  amdgpu_device_ip_set_powergating_state+0x5d/0xb0 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.556017]  ? amdgpu_dpm_switch_power_profile+0x82/0xa0 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.556206]  amdgpu_vcn_ring_begin_use+0x64/0x1a0 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.556361]  amdgpu_ring_alloc+0x40/0x60 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.556764]  amdgpu_vcn_dec_sw_ring_test_ring+0x39/0xf0 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.557160]  amdgpu_ring_test_helper+0x1f/0xa0 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.557547]  vcn_v4_0_5_hw_init+0x75/0xa0 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.557944]  amdgpu_device_init.cold+0x172a/0x224d [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.558406]  amdgpu_driver_load_kms+0x15/0x70 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.558804]  amdgpu_pci_probe+0x1e4/0x500 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.559202]  ? __pm_runtime_resume+0x5f/0x90
[    6.559486]  local_pci_probe+0x3f/0x90
[    6.559769]  pci_device_probe+0xdb/0x290
[    6.560042]  ? sysfs_do_create_link_sd+0x6d/0xd0
[    6.560313]  really_probe+0xdb/0x340
[    6.560578]  ? pm_runtime_barrier+0x55/0x90
[    6.560836]  __driver_probe_device+0x78/0x140
[    6.561085]  driver_probe_device+0x1f/0xa0
[    6.561329]  ? __pfx___driver_attach+0x10/0x10
[    6.561567]  __driver_attach+0xcb/0x1e0
[    6.561796]  bus_for_each_dev+0x87/0xe0
[    6.562018]  bus_add_driver+0x10b/0x1f0
[    6.562237]  ? __pfx_amdgpu_init+0x10/0x10 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.562579]  driver_register+0x75/0xe0
[    6.562804]  ? amdgpu_init+0x4b/0xff0 [amdgpu 788a8b249190c55408e8d6b1f21dc0022c40cb44]
[    6.563155]  do_one_initcall+0x59/0x310
[    6.563394]  do_init_module+0x62/0x240
[    6.563627]  init_module_from_file+0x8b/0xe0
[    6.563857]  idempotent_init_module+0x115/0x310
[    6.564085]  __x64_sys_finit_module+0x67/0xc0
[    6.564308]  do_syscall_64+0x7b/0x190
[    6.564534]  ? __pfx_page_put_link+0x10/0x10
[    6.564763]  ? alloc_fd+0x12d/0x190
[    6.564983]  ? do_sys_openat2+0x96/0xe0
[    6.565195]  ? syscall_exit_to_user_mode+0x37/0x1c0
[    6.565403]  ? do_syscall_64+0x87/0x190
[    6.565604]  ? __x64_sys_pread64+0xab/0xd0
[    6.565799]  ? syscall_exit_to_user_mode+0x37/0x1c0
[    6.565990]  ? do_syscall_64+0x87/0x190
[    6.566174]  ? irqentry_exit_to_user_mode+0x2c/0x1b0
[    6.566356]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[    6.566535] RIP: 0033:0x7f99420c2cdd
[    6.566707] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fb bf 0c 00 f7 d8 64 89 01 48
[    6.567073] RSP: 002b:00007fff5e8bab68 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[    6.567268] RAX: ffffffffffffffda RBX: 000055a3ce82bf70 RCX: 00007f99420c2cdd
[    6.567465] RDX: 0000000000000004 RSI: 000055a3ce82a940 RDI: 000000000000001f
[    6.567662] RBP: 00007fff5e8bac00 R08: 0000000000000000 R09: 000055a3ce82eda0
[    6.567860] R10: 0000000000000000 R11: 0000000000000246 R12: 000055a3ce82a940
[    6.568058] R13: 0000000000020000 R14: 000055a3ce829e00 R15: 000055a3ce82bf70
[    6.568256]  </TASK>
[    6.568446] Modules linked in: amdgpu(+) amdxcp i2c_algo_bit drm_exec gpu_sched sdhci_pci drm_suballoc_helper sdhci_uhs2 drm_panel_backlight_quirks sdhci drm_buddy nvme cqhci drm_display_helper nvme_core mmc_core cec nvme_auth hid_asus asus_wmi sparse_keymap i8042 serio platform_profile rfkill hid_generic nvidia_drm(OE) drm_ttm_helper ttm usbhid nvidia_uvm(OE) nvidia_modeset(OE) video wmi nvidia(OE)
[    6.569337] CR2: 0000000000000004

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (149 preceding siblings ...)
  2025-05-20 21:34 ` Eric Naim
@ 2025-05-21  1:25 ` Ron Economos
  2025-05-21  8:06 ` Takeshi Ogasawara
                   ` (5 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Ron Economos @ 2025-05-21  1:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, stable
  Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
	rwarsow, conor, hargar, broonie

On 5/20/25 06:49, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

Built and booted successfully on RISC-V RV64 (HiFive Unmatched).

Tested-by: Ron Economos <re@w6rz.net>


^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 21:34 ` Eric Naim
@ 2025-05-21  2:42   ` Mario Limonciello
  2025-05-21  5:35     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 165+ messages in thread
From: Mario Limonciello @ 2025-05-21  2:42 UTC (permalink / raw)
  To: Eric Naim, Greg Kroah-Hartman, stable
  Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
	rwarsow, conor, hargar, broonie, David.Wu3, alexander.deucher

On 5/20/2025 4:34 PM, Eric Naim wrote:
> Hi Greg,
> 
> On 5/20/25 21:49, Greg Kroah-Hartman wrote:
>> This is the start of the stable review cycle for the 6.14.8 release.
>> There are 145 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
>> Anything received after that time might be too late.
>>
>> The whole patch series can be found in one patch at:
>> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
>> or in the git tree and branch at:
>> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
>> and the diffstat can be found below.
>>
>> thanks,
>>
>> greg k-h
>>
>> -------------
>> Pseudo-Shortlog of commits:
>>
>> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>      Linux 6.14.8-rc1
>>
>> Dan Carpenter <dan.carpenter@linaro.org>
>>      phy: tegra: xusb: remove a stray unlock
>>
>> Tiezhu Yang <yangtiezhu@loongson.cn>
>>      perf tools: Fix build error for LoongArch
>>
>> Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>>      mm/page_alloc: fix race condition in unaccepted memory handling
>>
>> Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>      drm/xe/gsc: do not flush the GSC worker from the reset path
>>
>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>>      accel/ivpu: Flush pending jobs of device's workqueues
>>
>> Karol Wachowski <karol.wachowski@intel.com>
>>      accel/ivpu: Fix missing MMU events if file_priv is unbound
>>
>> Karol Wachowski <karol.wachowski@intel.com>
>>      accel/ivpu: Fix missing MMU events from reserved SSID
>>
>> Karol Wachowski <karol.wachowski@intel.com>
>>      accel/ivpu: Move parts of MMU event IRQ handling to thread handler
>>
>> Karol Wachowski <karol.wachowski@intel.com>
>>      accel/ivpu: Dump only first MMU fault from single context
>>
>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>>      accel/ivpu: Use workqueue for IRQ handling
>>
>> Shuai Xue <xueshuai@linux.alibaba.com>
>>      dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
>>
>> Shuai Xue <xueshuai@linux.alibaba.com>
>>      dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
>>
>> Shuai Xue <xueshuai@linux.alibaba.com>
>>      dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
>>
>> Shuai Xue <xueshuai@linux.alibaba.com>
>>      dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
>>
>> Shuai Xue <xueshuai@linux.alibaba.com>
>>      dmaengine: idxd: Add missing cleanups in cleanup internals
>>
>> Shuai Xue <xueshuai@linux.alibaba.com>
>>      dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
>>
>> Shuai Xue <xueshuai@linux.alibaba.com>
>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
>>
>> Shuai Xue <xueshuai@linux.alibaba.com>
>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
>>
>> Shuai Xue <xueshuai@linux.alibaba.com>
>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
>>
>> Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
>>      dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
>>
>> Ronald Wahl <ronald.wahl@legrand.com>
>>      dmaengine: ti: k3-udma: Add missing locking
>>
>> Barry Song <baohua@kernel.org>
>>      mm: userfaultfd: correct dirty flags set for both present and swap pte
>>
>> Wupeng Ma <mawupeng1@huawei.com>
>>      mm: hugetlb: fix incorrect fallback for subpool
>>
>> hexue <xue01.he@samsung.com>
>>      io_uring/uring_cmd: fix hybrid polling initialization issue
>>
>> Jens Axboe <axboe@kernel.dk>
>>      io_uring/memmap: don't use page_address() on a highmem page
>>
>> Nathan Chancellor <nathan@kernel.org>
>>      net: qede: Initialize qede_ll_ops with designated initializer
>>
>> Steven Rostedt <rostedt@goodmis.org>
>>      ring-buffer: Fix persistent buffer when commit page is the reader page
>>
>> Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
>>      wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
>>
>> Fedor Pchelkin <pchelkin@ispras.ru>
>>      wifi: mt76: disable napi on driver removal
>>
>> Jarkko Sakkinen <jarkko@kernel.org>
>>      tpm: Mask TPM RC in tpm2_start_auth_session()
>>
>> Aaron Kling <webgeek1234@gmail.com>
>>      spi: tegra114: Use value to check for invalid delays
>>
>> Jethro Donaldson <devel@jro.nz>
>>      smb: client: fix memory leak during error handling for POSIX mkdir
>>
>> Steve Siwinski <ssiwinski@atto.com>
>>      scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
>>
>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>      phy: renesas: rcar-gen3-usb2: Set timing registers only once
>>
>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>      phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
>>
>> Oleksij Rempel <o.rempel@pengutronix.de>
>>      net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
>>
>> Oleksij Rempel <o.rempel@pengutronix.de>
>>      net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches
>>
>> Ma Ke <make24@iscas.ac.cn>
>>      phy: Fix error handling in tegra_xusb_port_init
>>
>> Wayne Chang <waynec@nvidia.com>
>>      phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
>>
>> Steven Rostedt <rostedt@goodmis.org>
>>      tracing: samples: Initialize trace_array_printk() with the correct function
>>
>> Ashish Kalra <ashish.kalra@amd.com>
>>      x86/sev: Make sure pages are not skipped during kdump
>>
>> Ashish Kalra <ashish.kalra@amd.com>
>>      x86/sev: Do not touch VMSA pages during SNP guest memory kdump
>>
>> pengdonglin <pengdonglin@xiaomi.com>
>>      ftrace: Fix preemption accounting for stacktrace filter command
>>
>> pengdonglin <pengdonglin@xiaomi.com>
>>      ftrace: Fix preemption accounting for stacktrace trigger command
>>
>> Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>>      i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
>>
>> Nathan Chancellor <nathan@kernel.org>
>>      kbuild: Disable -Wdefault-const-init-unsafe
>>
>> Michael Kelley <mhklinux@outlook.com>
>>      Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
>>
>> Michael Kelley <mhklinux@outlook.com>
>>      Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
>>
>> Michael Kelley <mhklinux@outlook.com>
>>      hv_netvsc: Remove rmsg_pgcnt
>>
>> Michael Kelley <mhklinux@outlook.com>
>>      hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
>>
>> Michael Kelley <mhklinux@outlook.com>
>>      hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
>>
>> Dragan Simic <dsimic@manjaro.org>
>>      arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
>>
>> Sam Edwards <cfsworks@gmail.com>
>>      arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
>>
>> Christian Hewitt <christianshewitt@gmail.com>
>>      arm64: dts: amlogic: dreambox: fix missing clkc_audio node
>>
>> Hyejeong Choi <hjeong.choi@samsung.com>
>>      dma-buf: insert memory barrier before updating num_fences
>>
>> Nicolas Chauvet <kwizart@gmail.com>
>>      ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
>>
>> Christian Heusel <christian@heusel.eu>
>>      ALSA: usb-audio: Add sample rate quirk for Audioengine D1
>>
>> Wentao Liang <vulab@iscas.ac.cn>
>>      ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
>>
>> Jeremy Linton <jeremy.linton@arm.com>
>>      ACPI: PPTT: Fix processor subtable walk
>>
>> Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>>      gpio: pca953x: fix IRQ storm on system wake up
>>
>> Alexey Makhalov <alexey.makhalov@broadcom.com>
>>      MAINTAINERS: Update Alexey Makhalov's email address
>>
>> Wayne Lin <Wayne.Lin@amd.com>
>>      drm/amd/display: Avoid flooding unnecessary info messages
>>
>> Wayne Lin <Wayne.Lin@amd.com>
>>      drm/amd/display: Correct the reply value when AUX write incomplete
>>
>> Philip Yang <Philip.Yang@amd.com>
>>      drm/amdgpu: csa unmap use uninterruptible lock
>>
>> Tim Huang <tim.huang@amd.com>
>>      drm/amdgpu: fix incorrect MALL size for GFX1151
>>
>> David (Ming Qiang) Wu <David.Wu3@amd.com>
>>      drm/amdgpu: read back register after written for VCN v4.0.5
>>
> 
> This commit seems to breaking a couple of devices with the Phoenix APU, most notably the Ryzen AI chips. Note that this commit in mainline seems to work as intended, and after doing a little bit of digging, [1] landed in 6.15 and so this cherrypick may not be so trivial after all. Attached is a kernel trace highlighting the breakage caused by this commit, along with [2] for the full log.
> 
> Also adding Alex, David and Mario to Ccs.
> 

Just a minor correction - VCN 4.0.5 is on Strix.  So this report is not 
likely from a Phoenix APU.

Nonetheless I agree; I suspect backporting 
ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c will help the issue.



^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-21  2:42   ` Mario Limonciello
@ 2025-05-21  5:35     ` Greg Kroah-Hartman
  2025-05-21 14:13       ` Eric Naim
  0 siblings, 1 reply; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-21  5:35 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Eric Naim, stable, patches, linux-kernel, torvalds, akpm, linux,
	shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie, David.Wu3,
	alexander.deucher

On Tue, May 20, 2025 at 09:42:13PM -0500, Mario Limonciello wrote:
> On 5/20/2025 4:34 PM, Eric Naim wrote:
> > Hi Greg,
> > 
> > On 5/20/25 21:49, Greg Kroah-Hartman wrote:
> > > This is the start of the stable review cycle for the 6.14.8 release.
> > > There are 145 patches in this series, all will be posted as a response
> > > to this one.  If anyone has any issues with these being applied, please
> > > let me know.
> > > 
> > > Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> > > Anything received after that time might be too late.
> > > 
> > > The whole patch series can be found in one patch at:
> > > 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> > > or in the git tree and branch at:
> > > 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> > > and the diffstat can be found below.
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > > 
> > > -------------
> > > Pseudo-Shortlog of commits:
> > > 
> > > Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > >      Linux 6.14.8-rc1
> > > 
> > > Dan Carpenter <dan.carpenter@linaro.org>
> > >      phy: tegra: xusb: remove a stray unlock
> > > 
> > > Tiezhu Yang <yangtiezhu@loongson.cn>
> > >      perf tools: Fix build error for LoongArch
> > > 
> > > Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > >      mm/page_alloc: fix race condition in unaccepted memory handling
> > > 
> > > Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > >      drm/xe/gsc: do not flush the GSC worker from the reset path
> > > 
> > > Maciej Falkowski <maciej.falkowski@linux.intel.com>
> > >      accel/ivpu: Flush pending jobs of device's workqueues
> > > 
> > > Karol Wachowski <karol.wachowski@intel.com>
> > >      accel/ivpu: Fix missing MMU events if file_priv is unbound
> > > 
> > > Karol Wachowski <karol.wachowski@intel.com>
> > >      accel/ivpu: Fix missing MMU events from reserved SSID
> > > 
> > > Karol Wachowski <karol.wachowski@intel.com>
> > >      accel/ivpu: Move parts of MMU event IRQ handling to thread handler
> > > 
> > > Karol Wachowski <karol.wachowski@intel.com>
> > >      accel/ivpu: Dump only first MMU fault from single context
> > > 
> > > Maciej Falkowski <maciej.falkowski@linux.intel.com>
> > >      accel/ivpu: Use workqueue for IRQ handling
> > > 
> > > Shuai Xue <xueshuai@linux.alibaba.com>
> > >      dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
> > > 
> > > Shuai Xue <xueshuai@linux.alibaba.com>
> > >      dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
> > > 
> > > Shuai Xue <xueshuai@linux.alibaba.com>
> > >      dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
> > > 
> > > Shuai Xue <xueshuai@linux.alibaba.com>
> > >      dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
> > > 
> > > Shuai Xue <xueshuai@linux.alibaba.com>
> > >      dmaengine: idxd: Add missing cleanups in cleanup internals
> > > 
> > > Shuai Xue <xueshuai@linux.alibaba.com>
> > >      dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
> > > 
> > > Shuai Xue <xueshuai@linux.alibaba.com>
> > >      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
> > > 
> > > Shuai Xue <xueshuai@linux.alibaba.com>
> > >      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
> > > 
> > > Shuai Xue <xueshuai@linux.alibaba.com>
> > >      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
> > > 
> > > Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
> > >      dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
> > > 
> > > Ronald Wahl <ronald.wahl@legrand.com>
> > >      dmaengine: ti: k3-udma: Add missing locking
> > > 
> > > Barry Song <baohua@kernel.org>
> > >      mm: userfaultfd: correct dirty flags set for both present and swap pte
> > > 
> > > Wupeng Ma <mawupeng1@huawei.com>
> > >      mm: hugetlb: fix incorrect fallback for subpool
> > > 
> > > hexue <xue01.he@samsung.com>
> > >      io_uring/uring_cmd: fix hybrid polling initialization issue
> > > 
> > > Jens Axboe <axboe@kernel.dk>
> > >      io_uring/memmap: don't use page_address() on a highmem page
> > > 
> > > Nathan Chancellor <nathan@kernel.org>
> > >      net: qede: Initialize qede_ll_ops with designated initializer
> > > 
> > > Steven Rostedt <rostedt@goodmis.org>
> > >      ring-buffer: Fix persistent buffer when commit page is the reader page
> > > 
> > > Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
> > >      wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
> > > 
> > > Fedor Pchelkin <pchelkin@ispras.ru>
> > >      wifi: mt76: disable napi on driver removal
> > > 
> > > Jarkko Sakkinen <jarkko@kernel.org>
> > >      tpm: Mask TPM RC in tpm2_start_auth_session()
> > > 
> > > Aaron Kling <webgeek1234@gmail.com>
> > >      spi: tegra114: Use value to check for invalid delays
> > > 
> > > Jethro Donaldson <devel@jro.nz>
> > >      smb: client: fix memory leak during error handling for POSIX mkdir
> > > 
> > > Steve Siwinski <ssiwinski@atto.com>
> > >      scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
> > > 
> > > Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> > >      phy: renesas: rcar-gen3-usb2: Set timing registers only once
> > > 
> > > Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> > >      phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
> > > 
> > > Oleksij Rempel <o.rempel@pengutronix.de>
> > >      net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
> > > 
> > > Oleksij Rempel <o.rempel@pengutronix.de>
> > >      net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches
> > > 
> > > Ma Ke <make24@iscas.ac.cn>
> > >      phy: Fix error handling in tegra_xusb_port_init
> > > 
> > > Wayne Chang <waynec@nvidia.com>
> > >      phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
> > > 
> > > Steven Rostedt <rostedt@goodmis.org>
> > >      tracing: samples: Initialize trace_array_printk() with the correct function
> > > 
> > > Ashish Kalra <ashish.kalra@amd.com>
> > >      x86/sev: Make sure pages are not skipped during kdump
> > > 
> > > Ashish Kalra <ashish.kalra@amd.com>
> > >      x86/sev: Do not touch VMSA pages during SNP guest memory kdump
> > > 
> > > pengdonglin <pengdonglin@xiaomi.com>
> > >      ftrace: Fix preemption accounting for stacktrace filter command
> > > 
> > > pengdonglin <pengdonglin@xiaomi.com>
> > >      ftrace: Fix preemption accounting for stacktrace trigger command
> > > 
> > > Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > >      i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
> > > 
> > > Nathan Chancellor <nathan@kernel.org>
> > >      kbuild: Disable -Wdefault-const-init-unsafe
> > > 
> > > Michael Kelley <mhklinux@outlook.com>
> > >      Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
> > > 
> > > Michael Kelley <mhklinux@outlook.com>
> > >      Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
> > > 
> > > Michael Kelley <mhklinux@outlook.com>
> > >      hv_netvsc: Remove rmsg_pgcnt
> > > 
> > > Michael Kelley <mhklinux@outlook.com>
> > >      hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
> > > 
> > > Michael Kelley <mhklinux@outlook.com>
> > >      hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
> > > 
> > > Dragan Simic <dsimic@manjaro.org>
> > >      arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
> > > 
> > > Sam Edwards <cfsworks@gmail.com>
> > >      arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
> > > 
> > > Christian Hewitt <christianshewitt@gmail.com>
> > >      arm64: dts: amlogic: dreambox: fix missing clkc_audio node
> > > 
> > > Hyejeong Choi <hjeong.choi@samsung.com>
> > >      dma-buf: insert memory barrier before updating num_fences
> > > 
> > > Nicolas Chauvet <kwizart@gmail.com>
> > >      ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
> > > 
> > > Christian Heusel <christian@heusel.eu>
> > >      ALSA: usb-audio: Add sample rate quirk for Audioengine D1
> > > 
> > > Wentao Liang <vulab@iscas.ac.cn>
> > >      ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
> > > 
> > > Jeremy Linton <jeremy.linton@arm.com>
> > >      ACPI: PPTT: Fix processor subtable walk
> > > 
> > > Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > >      gpio: pca953x: fix IRQ storm on system wake up
> > > 
> > > Alexey Makhalov <alexey.makhalov@broadcom.com>
> > >      MAINTAINERS: Update Alexey Makhalov's email address
> > > 
> > > Wayne Lin <Wayne.Lin@amd.com>
> > >      drm/amd/display: Avoid flooding unnecessary info messages
> > > 
> > > Wayne Lin <Wayne.Lin@amd.com>
> > >      drm/amd/display: Correct the reply value when AUX write incomplete
> > > 
> > > Philip Yang <Philip.Yang@amd.com>
> > >      drm/amdgpu: csa unmap use uninterruptible lock
> > > 
> > > Tim Huang <tim.huang@amd.com>
> > >      drm/amdgpu: fix incorrect MALL size for GFX1151
> > > 
> > > David (Ming Qiang) Wu <David.Wu3@amd.com>
> > >      drm/amdgpu: read back register after written for VCN v4.0.5
> > > 
> > 
> > This commit seems to breaking a couple of devices with the Phoenix APU, most notably the Ryzen AI chips. Note that this commit in mainline seems to work as intended, and after doing a little bit of digging, [1] landed in 6.15 and so this cherrypick may not be so trivial after all. Attached is a kernel trace highlighting the breakage caused by this commit, along with [2] for the full log.
> > 
> > Also adding Alex, David and Mario to Ccs.
> > 
> 
> Just a minor correction - VCN 4.0.5 is on Strix.  So this report is not
> likely from a Phoenix APU.
> 
> Nonetheless I agree; I suspect backporting
> ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c will help the issue.

If it is required, someone is going to need to provide a working
version, as that does not apply cleanly as-is.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (150 preceding siblings ...)
  2025-05-21  1:25 ` Ron Economos
@ 2025-05-21  8:06 ` Takeshi Ogasawara
  2025-05-21  8:31 ` Jon Hunter
                   ` (4 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Takeshi Ogasawara @ 2025-05-21  8:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
	patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie

Hi Greg

On Tue, May 20, 2025 at 11:24 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
>         https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> or in the git tree and branch at:
>         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>

6.14.8-rc1 tested.

Build successfully completed.
Boot successfully completed.
No dmesg regressions.
Video output normal.
Sound output normal.

Lenovo ThinkPad X1 Carbon Gen10(Intel i7-1260P(x86_64) arch linux)

[    0.000000] Linux version 6.14.8-rc1rv-g75456e272f58
(takeshi@ThinkPadX1Gen10J0764) (gcc (GCC) 15.1.1 20250425, GNU ld (GNU
Binutils) 2.44.0) #1 SMP PREEMPT_DYNAMIC Wed May 21 14:31:31 JST 2025

Thanks

Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (151 preceding siblings ...)
  2025-05-21  8:06 ` Takeshi Ogasawara
@ 2025-05-21  8:31 ` Jon Hunter
  2025-05-21  9:24 ` Naresh Kamboju
                   ` (3 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Jon Hunter @ 2025-05-21  8:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Greg Kroah-Hartman, patches, linux-kernel, torvalds, akpm, linux,
	shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie,
	linux-tegra, stable

On Tue, 20 May 2025 15:49:30 +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h

All tests passing for Tegra ...

Test results for stable-v6.14:
    10 builds:	10 pass, 0 fail
    28 boots:	28 pass, 0 fail
    116 tests:	116 pass, 0 fail

Linux version:	6.14.8-rc1-g75456e272f58
Boards tested:	tegra124-jetson-tk1, tegra186-p2771-0000,
                tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
                tegra194-p3509-0000+p3668-0000, tegra20-ventana,
                tegra210-p2371-2180, tegra210-p3450-0000,
                tegra30-cardhu-a04

Tested-by: Jon Hunter <jonathanh@nvidia.com>

Jon

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (152 preceding siblings ...)
  2025-05-21  8:31 ` Jon Hunter
@ 2025-05-21  9:24 ` Naresh Kamboju
  2025-05-21 18:00 ` Peter Schneider
                   ` (2 subsequent siblings)
  156 siblings, 0 replies; 165+ messages in thread
From: Naresh Kamboju @ 2025-05-21  9:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
	patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie

On Tue, 20 May 2025 at 19:44, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
>         https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> or in the git tree and branch at:
>         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>

## Build
* kernel: 6.14.8-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: 75456e272f58170ba9694debd95bb643fc199e6d
* git describe: v6.14.7-146-g75456e272f58
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.14.y/build/v6.14.7-146-g75456e272f58

## Test Regressions (compared to v6.14.6-198-g6f7a299729d3)

## Metric Regressions (compared to v6.14.6-198-g6f7a299729d3)

## Test Fixes (compared to v6.14.6-198-g6f7a299729d3)

## Metric Fixes (compared to v6.14.6-198-g6f7a299729d3)

## Test result summary
total: 238113, pass: 213864, fail: 4515, skip: 19096, xfail: 638

## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 139 total, 137 passed, 2 failed
* arm64: 57 total, 56 passed, 1 failed
* i386: 18 total, 16 passed, 2 failed
* mips: 34 total, 33 passed, 1 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 40 total, 40 passed, 0 failed
* riscv: 25 total, 22 passed, 3 failed
* s390: 22 total, 22 passed, 0 failed
* sh: 5 total, 5 passed, 0 failed
* sparc: 4 total, 3 passed, 1 failed
* x86_64: 49 total, 42 passed, 7 failed

## Test suites summary
* boot
* commands
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-kvm
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mm
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-rust
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-x86
* kunit
* kvm-unit-tests
* lava
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-build-clang
* log-parser-build-gcc
* log-parser-test
* ltp-capability
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* modules
* perf
* rcutorture
* rt-tests-cyclicdeadline
* rt-tests-pi-stress
* rt-tests-pmqtest
* rt-tests-rt-migrate-test
* rt-tests-signaltest

--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-21  5:35     ` Greg Kroah-Hartman
@ 2025-05-21 14:13       ` Eric Naim
  2025-05-21 16:25         ` Greg Kroah-Hartman
  0 siblings, 1 reply; 165+ messages in thread
From: Eric Naim @ 2025-05-21 14:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mario Limonciello
  Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
	patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie, David.Wu3,
	alexander.deucher

On 5/21/25 13:35, Greg Kroah-Hartman wrote:
> On Tue, May 20, 2025 at 09:42:13PM -0500, Mario Limonciello wrote:
>> On 5/20/2025 4:34 PM, Eric Naim wrote:
>>> Hi Greg,
>>>
>>> On 5/20/25 21:49, Greg Kroah-Hartman wrote:
>>>> This is the start of the stable review cycle for the 6.14.8 release.
>>>> There are 145 patches in this series, all will be posted as a response
>>>> to this one.  If anyone has any issues with these being applied, please
>>>> let me know.
>>>>
>>>> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
>>>> Anything received after that time might be too late.
>>>>
>>>> The whole patch series can be found in one patch at:
>>>> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
>>>> or in the git tree and branch at:
>>>> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
>>>> and the diffstat can be found below.
>>>>
>>>> thanks,
>>>>
>>>> greg k-h
>>>>
>>>> -------------
>>>> Pseudo-Shortlog of commits:
>>>>
>>>> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>>      Linux 6.14.8-rc1
>>>>
>>>> Dan Carpenter <dan.carpenter@linaro.org>
>>>>      phy: tegra: xusb: remove a stray unlock
>>>>
>>>> Tiezhu Yang <yangtiezhu@loongson.cn>
>>>>      perf tools: Fix build error for LoongArch
>>>>
>>>> Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>>>>      mm/page_alloc: fix race condition in unaccepted memory handling
>>>>
>>>> Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>>>      drm/xe/gsc: do not flush the GSC worker from the reset path
>>>>
>>>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>>>>      accel/ivpu: Flush pending jobs of device's workqueues
>>>>
>>>> Karol Wachowski <karol.wachowski@intel.com>
>>>>      accel/ivpu: Fix missing MMU events if file_priv is unbound
>>>>
>>>> Karol Wachowski <karol.wachowski@intel.com>
>>>>      accel/ivpu: Fix missing MMU events from reserved SSID
>>>>
>>>> Karol Wachowski <karol.wachowski@intel.com>
>>>>      accel/ivpu: Move parts of MMU event IRQ handling to thread handler
>>>>
>>>> Karol Wachowski <karol.wachowski@intel.com>
>>>>      accel/ivpu: Dump only first MMU fault from single context
>>>>
>>>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>>>>      accel/ivpu: Use workqueue for IRQ handling
>>>>
>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>      dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
>>>>
>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
>>>>
>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
>>>>
>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>      dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
>>>>
>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>      dmaengine: idxd: Add missing cleanups in cleanup internals
>>>>
>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>      dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
>>>>
>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
>>>>
>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
>>>>
>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
>>>>
>>>> Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
>>>>      dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
>>>>
>>>> Ronald Wahl <ronald.wahl@legrand.com>
>>>>      dmaengine: ti: k3-udma: Add missing locking
>>>>
>>>> Barry Song <baohua@kernel.org>
>>>>      mm: userfaultfd: correct dirty flags set for both present and swap pte
>>>>
>>>> Wupeng Ma <mawupeng1@huawei.com>
>>>>      mm: hugetlb: fix incorrect fallback for subpool
>>>>
>>>> hexue <xue01.he@samsung.com>
>>>>      io_uring/uring_cmd: fix hybrid polling initialization issue
>>>>
>>>> Jens Axboe <axboe@kernel.dk>
>>>>      io_uring/memmap: don't use page_address() on a highmem page
>>>>
>>>> Nathan Chancellor <nathan@kernel.org>
>>>>      net: qede: Initialize qede_ll_ops with designated initializer
>>>>
>>>> Steven Rostedt <rostedt@goodmis.org>
>>>>      ring-buffer: Fix persistent buffer when commit page is the reader page
>>>>
>>>> Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
>>>>      wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
>>>>
>>>> Fedor Pchelkin <pchelkin@ispras.ru>
>>>>      wifi: mt76: disable napi on driver removal
>>>>
>>>> Jarkko Sakkinen <jarkko@kernel.org>
>>>>      tpm: Mask TPM RC in tpm2_start_auth_session()
>>>>
>>>> Aaron Kling <webgeek1234@gmail.com>
>>>>      spi: tegra114: Use value to check for invalid delays
>>>>
>>>> Jethro Donaldson <devel@jro.nz>
>>>>      smb: client: fix memory leak during error handling for POSIX mkdir
>>>>
>>>> Steve Siwinski <ssiwinski@atto.com>
>>>>      scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
>>>>
>>>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>>      phy: renesas: rcar-gen3-usb2: Set timing registers only once
>>>>
>>>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>>      phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
>>>>
>>>> Oleksij Rempel <o.rempel@pengutronix.de>
>>>>      net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
>>>>
>>>> Oleksij Rempel <o.rempel@pengutronix.de>
>>>>      net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches
>>>>
>>>> Ma Ke <make24@iscas.ac.cn>
>>>>      phy: Fix error handling in tegra_xusb_port_init
>>>>
>>>> Wayne Chang <waynec@nvidia.com>
>>>>      phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
>>>>
>>>> Steven Rostedt <rostedt@goodmis.org>
>>>>      tracing: samples: Initialize trace_array_printk() with the correct function
>>>>
>>>> Ashish Kalra <ashish.kalra@amd.com>
>>>>      x86/sev: Make sure pages are not skipped during kdump
>>>>
>>>> Ashish Kalra <ashish.kalra@amd.com>
>>>>      x86/sev: Do not touch VMSA pages during SNP guest memory kdump
>>>>
>>>> pengdonglin <pengdonglin@xiaomi.com>
>>>>      ftrace: Fix preemption accounting for stacktrace filter command
>>>>
>>>> pengdonglin <pengdonglin@xiaomi.com>
>>>>      ftrace: Fix preemption accounting for stacktrace trigger command
>>>>
>>>> Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>>>>      i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
>>>>
>>>> Nathan Chancellor <nathan@kernel.org>
>>>>      kbuild: Disable -Wdefault-const-init-unsafe
>>>>
>>>> Michael Kelley <mhklinux@outlook.com>
>>>>      Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
>>>>
>>>> Michael Kelley <mhklinux@outlook.com>
>>>>      Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
>>>>
>>>> Michael Kelley <mhklinux@outlook.com>
>>>>      hv_netvsc: Remove rmsg_pgcnt
>>>>
>>>> Michael Kelley <mhklinux@outlook.com>
>>>>      hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
>>>>
>>>> Michael Kelley <mhklinux@outlook.com>
>>>>      hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
>>>>
>>>> Dragan Simic <dsimic@manjaro.org>
>>>>      arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
>>>>
>>>> Sam Edwards <cfsworks@gmail.com>
>>>>      arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
>>>>
>>>> Christian Hewitt <christianshewitt@gmail.com>
>>>>      arm64: dts: amlogic: dreambox: fix missing clkc_audio node
>>>>
>>>> Hyejeong Choi <hjeong.choi@samsung.com>
>>>>      dma-buf: insert memory barrier before updating num_fences
>>>>
>>>> Nicolas Chauvet <kwizart@gmail.com>
>>>>      ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
>>>>
>>>> Christian Heusel <christian@heusel.eu>
>>>>      ALSA: usb-audio: Add sample rate quirk for Audioengine D1
>>>>
>>>> Wentao Liang <vulab@iscas.ac.cn>
>>>>      ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
>>>>
>>>> Jeremy Linton <jeremy.linton@arm.com>
>>>>      ACPI: PPTT: Fix processor subtable walk
>>>>
>>>> Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>>>>      gpio: pca953x: fix IRQ storm on system wake up
>>>>
>>>> Alexey Makhalov <alexey.makhalov@broadcom.com>
>>>>      MAINTAINERS: Update Alexey Makhalov's email address
>>>>
>>>> Wayne Lin <Wayne.Lin@amd.com>
>>>>      drm/amd/display: Avoid flooding unnecessary info messages
>>>>
>>>> Wayne Lin <Wayne.Lin@amd.com>
>>>>      drm/amd/display: Correct the reply value when AUX write incomplete
>>>>
>>>> Philip Yang <Philip.Yang@amd.com>
>>>>      drm/amdgpu: csa unmap use uninterruptible lock
>>>>
>>>> Tim Huang <tim.huang@amd.com>
>>>>      drm/amdgpu: fix incorrect MALL size for GFX1151
>>>>
>>>> David (Ming Qiang) Wu <David.Wu3@amd.com>
>>>>      drm/amdgpu: read back register after written for VCN v4.0.5
>>>>
>>>
>>> This commit seems to breaking a couple of devices with the Phoenix APU, most notably the Ryzen AI chips. Note that this commit in mainline seems to work as intended, and after doing a little bit of digging, [1] landed in 6.15 and so this cherrypick may not be so trivial after all. Attached is a kernel trace highlighting the breakage caused by this commit, along with [2] for the full log.
>>>
>>> Also adding Alex, David and Mario to Ccs.
>>>
>>
>> Just a minor correction - VCN 4.0.5 is on Strix.  So this report is not
>> likely from a Phoenix APU.
>>
>> Nonetheless I agree; I suspect backporting
>> ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c will help the issue.
> 
> If it is required, someone is going to need to provide a working
> version, as that does not apply cleanly as-is.
> 
> thanks,
> 
> greg k-h

Hi Greg,

I finally got someone to test the mentioned commit, and I (or they) can confirm that ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c is indeed the missing commit needed for "drm/amdgpu: read back register after written for VCN v4.0.5".

I don't know if this will help, but I got everything to apply cleanly by first applying ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c, then cherry-picking the mainline version of "drm/amdgpu: read back register after written for VCN v4.0.5" [1] since the one in stable-rc seems to have been adjusted for the stable tree and made it conflict.

-- 
Regards,
  Eric

[1] ee7360fc27d6045510f8fe459b5649b2af27811a

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-21 14:13       ` Eric Naim
@ 2025-05-21 16:25         ` Greg Kroah-Hartman
  2025-05-21 16:59           ` Eric Naim
  0 siblings, 1 reply; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-21 16:25 UTC (permalink / raw)
  To: Eric Naim
  Cc: Mario Limonciello, stable, patches, linux-kernel, torvalds, akpm,
	linux, shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie, David.Wu3,
	alexander.deucher

On Wed, May 21, 2025 at 10:13:45PM +0800, Eric Naim wrote:
> On 5/21/25 13:35, Greg Kroah-Hartman wrote:
> > On Tue, May 20, 2025 at 09:42:13PM -0500, Mario Limonciello wrote:
> >> On 5/20/2025 4:34 PM, Eric Naim wrote:
> >>> Hi Greg,
> >>>
> >>> On 5/20/25 21:49, Greg Kroah-Hartman wrote:
> >>>> This is the start of the stable review cycle for the 6.14.8 release.
> >>>> There are 145 patches in this series, all will be posted as a response
> >>>> to this one.  If anyone has any issues with these being applied, please
> >>>> let me know.
> >>>>
> >>>> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> >>>> Anything received after that time might be too late.
> >>>>
> >>>> The whole patch series can be found in one patch at:
> >>>> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> >>>> or in the git tree and branch at:
> >>>> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> >>>> and the diffstat can be found below.
> >>>>
> >>>> thanks,
> >>>>
> >>>> greg k-h
> >>>>
> >>>> -------------
> >>>> Pseudo-Shortlog of commits:
> >>>>
> >>>> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >>>>      Linux 6.14.8-rc1
> >>>>
> >>>> Dan Carpenter <dan.carpenter@linaro.org>
> >>>>      phy: tegra: xusb: remove a stray unlock
> >>>>
> >>>> Tiezhu Yang <yangtiezhu@loongson.cn>
> >>>>      perf tools: Fix build error for LoongArch
> >>>>
> >>>> Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> >>>>      mm/page_alloc: fix race condition in unaccepted memory handling
> >>>>
> >>>> Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> >>>>      drm/xe/gsc: do not flush the GSC worker from the reset path
> >>>>
> >>>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
> >>>>      accel/ivpu: Flush pending jobs of device's workqueues
> >>>>
> >>>> Karol Wachowski <karol.wachowski@intel.com>
> >>>>      accel/ivpu: Fix missing MMU events if file_priv is unbound
> >>>>
> >>>> Karol Wachowski <karol.wachowski@intel.com>
> >>>>      accel/ivpu: Fix missing MMU events from reserved SSID
> >>>>
> >>>> Karol Wachowski <karol.wachowski@intel.com>
> >>>>      accel/ivpu: Move parts of MMU event IRQ handling to thread handler
> >>>>
> >>>> Karol Wachowski <karol.wachowski@intel.com>
> >>>>      accel/ivpu: Dump only first MMU fault from single context
> >>>>
> >>>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
> >>>>      accel/ivpu: Use workqueue for IRQ handling
> >>>>
> >>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>      dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
> >>>>
> >>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
> >>>>
> >>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
> >>>>
> >>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>      dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
> >>>>
> >>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>      dmaengine: idxd: Add missing cleanups in cleanup internals
> >>>>
> >>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>      dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
> >>>>
> >>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
> >>>>
> >>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
> >>>>
> >>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
> >>>>
> >>>> Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
> >>>>      dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
> >>>>
> >>>> Ronald Wahl <ronald.wahl@legrand.com>
> >>>>      dmaengine: ti: k3-udma: Add missing locking
> >>>>
> >>>> Barry Song <baohua@kernel.org>
> >>>>      mm: userfaultfd: correct dirty flags set for both present and swap pte
> >>>>
> >>>> Wupeng Ma <mawupeng1@huawei.com>
> >>>>      mm: hugetlb: fix incorrect fallback for subpool
> >>>>
> >>>> hexue <xue01.he@samsung.com>
> >>>>      io_uring/uring_cmd: fix hybrid polling initialization issue
> >>>>
> >>>> Jens Axboe <axboe@kernel.dk>
> >>>>      io_uring/memmap: don't use page_address() on a highmem page
> >>>>
> >>>> Nathan Chancellor <nathan@kernel.org>
> >>>>      net: qede: Initialize qede_ll_ops with designated initializer
> >>>>
> >>>> Steven Rostedt <rostedt@goodmis.org>
> >>>>      ring-buffer: Fix persistent buffer when commit page is the reader page
> >>>>
> >>>> Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
> >>>>      wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
> >>>>
> >>>> Fedor Pchelkin <pchelkin@ispras.ru>
> >>>>      wifi: mt76: disable napi on driver removal
> >>>>
> >>>> Jarkko Sakkinen <jarkko@kernel.org>
> >>>>      tpm: Mask TPM RC in tpm2_start_auth_session()
> >>>>
> >>>> Aaron Kling <webgeek1234@gmail.com>
> >>>>      spi: tegra114: Use value to check for invalid delays
> >>>>
> >>>> Jethro Donaldson <devel@jro.nz>
> >>>>      smb: client: fix memory leak during error handling for POSIX mkdir
> >>>>
> >>>> Steve Siwinski <ssiwinski@atto.com>
> >>>>      scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
> >>>>
> >>>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> >>>>      phy: renesas: rcar-gen3-usb2: Set timing registers only once
> >>>>
> >>>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> >>>>      phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
> >>>>
> >>>> Oleksij Rempel <o.rempel@pengutronix.de>
> >>>>      net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
> >>>>
> >>>> Oleksij Rempel <o.rempel@pengutronix.de>
> >>>>      net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches
> >>>>
> >>>> Ma Ke <make24@iscas.ac.cn>
> >>>>      phy: Fix error handling in tegra_xusb_port_init
> >>>>
> >>>> Wayne Chang <waynec@nvidia.com>
> >>>>      phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
> >>>>
> >>>> Steven Rostedt <rostedt@goodmis.org>
> >>>>      tracing: samples: Initialize trace_array_printk() with the correct function
> >>>>
> >>>> Ashish Kalra <ashish.kalra@amd.com>
> >>>>      x86/sev: Make sure pages are not skipped during kdump
> >>>>
> >>>> Ashish Kalra <ashish.kalra@amd.com>
> >>>>      x86/sev: Do not touch VMSA pages during SNP guest memory kdump
> >>>>
> >>>> pengdonglin <pengdonglin@xiaomi.com>
> >>>>      ftrace: Fix preemption accounting for stacktrace filter command
> >>>>
> >>>> pengdonglin <pengdonglin@xiaomi.com>
> >>>>      ftrace: Fix preemption accounting for stacktrace trigger command
> >>>>
> >>>> Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> >>>>      i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
> >>>>
> >>>> Nathan Chancellor <nathan@kernel.org>
> >>>>      kbuild: Disable -Wdefault-const-init-unsafe
> >>>>
> >>>> Michael Kelley <mhklinux@outlook.com>
> >>>>      Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
> >>>>
> >>>> Michael Kelley <mhklinux@outlook.com>
> >>>>      Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
> >>>>
> >>>> Michael Kelley <mhklinux@outlook.com>
> >>>>      hv_netvsc: Remove rmsg_pgcnt
> >>>>
> >>>> Michael Kelley <mhklinux@outlook.com>
> >>>>      hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
> >>>>
> >>>> Michael Kelley <mhklinux@outlook.com>
> >>>>      hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
> >>>>
> >>>> Dragan Simic <dsimic@manjaro.org>
> >>>>      arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
> >>>>
> >>>> Sam Edwards <cfsworks@gmail.com>
> >>>>      arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
> >>>>
> >>>> Christian Hewitt <christianshewitt@gmail.com>
> >>>>      arm64: dts: amlogic: dreambox: fix missing clkc_audio node
> >>>>
> >>>> Hyejeong Choi <hjeong.choi@samsung.com>
> >>>>      dma-buf: insert memory barrier before updating num_fences
> >>>>
> >>>> Nicolas Chauvet <kwizart@gmail.com>
> >>>>      ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
> >>>>
> >>>> Christian Heusel <christian@heusel.eu>
> >>>>      ALSA: usb-audio: Add sample rate quirk for Audioengine D1
> >>>>
> >>>> Wentao Liang <vulab@iscas.ac.cn>
> >>>>      ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
> >>>>
> >>>> Jeremy Linton <jeremy.linton@arm.com>
> >>>>      ACPI: PPTT: Fix processor subtable walk
> >>>>
> >>>> Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> >>>>      gpio: pca953x: fix IRQ storm on system wake up
> >>>>
> >>>> Alexey Makhalov <alexey.makhalov@broadcom.com>
> >>>>      MAINTAINERS: Update Alexey Makhalov's email address
> >>>>
> >>>> Wayne Lin <Wayne.Lin@amd.com>
> >>>>      drm/amd/display: Avoid flooding unnecessary info messages
> >>>>
> >>>> Wayne Lin <Wayne.Lin@amd.com>
> >>>>      drm/amd/display: Correct the reply value when AUX write incomplete
> >>>>
> >>>> Philip Yang <Philip.Yang@amd.com>
> >>>>      drm/amdgpu: csa unmap use uninterruptible lock
> >>>>
> >>>> Tim Huang <tim.huang@amd.com>
> >>>>      drm/amdgpu: fix incorrect MALL size for GFX1151
> >>>>
> >>>> David (Ming Qiang) Wu <David.Wu3@amd.com>
> >>>>      drm/amdgpu: read back register after written for VCN v4.0.5
> >>>>
> >>>
> >>> This commit seems to breaking a couple of devices with the Phoenix APU, most notably the Ryzen AI chips. Note that this commit in mainline seems to work as intended, and after doing a little bit of digging, [1] landed in 6.15 and so this cherrypick may not be so trivial after all. Attached is a kernel trace highlighting the breakage caused by this commit, along with [2] for the full log.
> >>>
> >>> Also adding Alex, David and Mario to Ccs.
> >>>
> >>
> >> Just a minor correction - VCN 4.0.5 is on Strix.  So this report is not
> >> likely from a Phoenix APU.
> >>
> >> Nonetheless I agree; I suspect backporting
> >> ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c will help the issue.
> > 
> > If it is required, someone is going to need to provide a working
> > version, as that does not apply cleanly as-is.
> > 
> > thanks,
> > 
> > greg k-h
> 
> Hi Greg,
> 
> I finally got someone to test the mentioned commit, and I (or they) can confirm that ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c is indeed the missing commit needed for "drm/amdgpu: read back register after written for VCN v4.0.5".
> 
> I don't know if this will help, but I got everything to apply cleanly by first applying ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c, then cherry-picking the mainline version of "drm/amdgpu: read back register after written for VCN v4.0.5" [1] since the one in stable-rc seems to have been adjusted for the stable tree and made it conflict.

I don't see the conflict that happened here, as I only apply patches
"cleanly".  But I trust you that things are odd here.

> -- 
> Regards,
>   Eric
> 
> [1] ee7360fc27d6045510f8fe459b5649b2af27811a

Ick.  Ok, let me go drop this commit from the tree now, and then can you
resubmit both of these as a tested series for them to be included
properly?

I'll do the same for both 6.12.y and 6.14.y now.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-21 16:25         ` Greg Kroah-Hartman
@ 2025-05-21 16:59           ` Eric Naim
  2025-05-21 17:10             ` Greg Kroah-Hartman
  0 siblings, 1 reply; 165+ messages in thread
From: Eric Naim @ 2025-05-21 16:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mario Limonciello, stable, patches, linux-kernel, torvalds, akpm,
	linux, shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie, David.Wu3,
	alexander.deucher

On 5/22/25 00:25, Greg Kroah-Hartman wrote:
> On Wed, May 21, 2025 at 10:13:45PM +0800, Eric Naim wrote:
>> On 5/21/25 13:35, Greg Kroah-Hartman wrote:
>>> On Tue, May 20, 2025 at 09:42:13PM -0500, Mario Limonciello wrote:
>>>> On 5/20/2025 4:34 PM, Eric Naim wrote:
>>>>> Hi Greg,
>>>>>
>>>>> On 5/20/25 21:49, Greg Kroah-Hartman wrote:
>>>>>> This is the start of the stable review cycle for the 6.14.8 release.
>>>>>> There are 145 patches in this series, all will be posted as a response
>>>>>> to this one.  If anyone has any issues with these being applied, please
>>>>>> let me know.
>>>>>>
>>>>>> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
>>>>>> Anything received after that time might be too late.
>>>>>>
>>>>>> The whole patch series can be found in one patch at:
>>>>>> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
>>>>>> or in the git tree and branch at:
>>>>>> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
>>>>>> and the diffstat can be found below.
>>>>>>
>>>>>> thanks,
>>>>>>
>>>>>> greg k-h
>>>>>>
>>>>>> -------------
>>>>>> Pseudo-Shortlog of commits:
>>>>>>
>>>>>> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>>>>      Linux 6.14.8-rc1
>>>>>>
>>>>>> Dan Carpenter <dan.carpenter@linaro.org>
>>>>>>      phy: tegra: xusb: remove a stray unlock
>>>>>>
>>>>>> Tiezhu Yang <yangtiezhu@loongson.cn>
>>>>>>      perf tools: Fix build error for LoongArch
>>>>>>
>>>>>> Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>>>>>>      mm/page_alloc: fix race condition in unaccepted memory handling
>>>>>>
>>>>>> Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>>>>>      drm/xe/gsc: do not flush the GSC worker from the reset path
>>>>>>
>>>>>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>>>>>>      accel/ivpu: Flush pending jobs of device's workqueues
>>>>>>
>>>>>> Karol Wachowski <karol.wachowski@intel.com>
>>>>>>      accel/ivpu: Fix missing MMU events if file_priv is unbound
>>>>>>
>>>>>> Karol Wachowski <karol.wachowski@intel.com>
>>>>>>      accel/ivpu: Fix missing MMU events from reserved SSID
>>>>>>
>>>>>> Karol Wachowski <karol.wachowski@intel.com>
>>>>>>      accel/ivpu: Move parts of MMU event IRQ handling to thread handler
>>>>>>
>>>>>> Karol Wachowski <karol.wachowski@intel.com>
>>>>>>      accel/ivpu: Dump only first MMU fault from single context
>>>>>>
>>>>>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>>>>>>      accel/ivpu: Use workqueue for IRQ handling
>>>>>>
>>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>>>      dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
>>>>>>
>>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
>>>>>>
>>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
>>>>>>
>>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>>>      dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
>>>>>>
>>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>>>      dmaengine: idxd: Add missing cleanups in cleanup internals
>>>>>>
>>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>>>      dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
>>>>>>
>>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
>>>>>>
>>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
>>>>>>
>>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
>>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
>>>>>>
>>>>>> Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
>>>>>>      dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
>>>>>>
>>>>>> Ronald Wahl <ronald.wahl@legrand.com>
>>>>>>      dmaengine: ti: k3-udma: Add missing locking
>>>>>>
>>>>>> Barry Song <baohua@kernel.org>
>>>>>>      mm: userfaultfd: correct dirty flags set for both present and swap pte
>>>>>>
>>>>>> Wupeng Ma <mawupeng1@huawei.com>
>>>>>>      mm: hugetlb: fix incorrect fallback for subpool
>>>>>>
>>>>>> hexue <xue01.he@samsung.com>
>>>>>>      io_uring/uring_cmd: fix hybrid polling initialization issue
>>>>>>
>>>>>> Jens Axboe <axboe@kernel.dk>
>>>>>>      io_uring/memmap: don't use page_address() on a highmem page
>>>>>>
>>>>>> Nathan Chancellor <nathan@kernel.org>
>>>>>>      net: qede: Initialize qede_ll_ops with designated initializer
>>>>>>
>>>>>> Steven Rostedt <rostedt@goodmis.org>
>>>>>>      ring-buffer: Fix persistent buffer when commit page is the reader page
>>>>>>
>>>>>> Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
>>>>>>      wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
>>>>>>
>>>>>> Fedor Pchelkin <pchelkin@ispras.ru>
>>>>>>      wifi: mt76: disable napi on driver removal
>>>>>>
>>>>>> Jarkko Sakkinen <jarkko@kernel.org>
>>>>>>      tpm: Mask TPM RC in tpm2_start_auth_session()
>>>>>>
>>>>>> Aaron Kling <webgeek1234@gmail.com>
>>>>>>      spi: tegra114: Use value to check for invalid delays
>>>>>>
>>>>>> Jethro Donaldson <devel@jro.nz>
>>>>>>      smb: client: fix memory leak during error handling for POSIX mkdir
>>>>>>
>>>>>> Steve Siwinski <ssiwinski@atto.com>
>>>>>>      scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
>>>>>>
>>>>>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>>>>      phy: renesas: rcar-gen3-usb2: Set timing registers only once
>>>>>>
>>>>>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>>>>      phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
>>>>>>
>>>>>> Oleksij Rempel <o.rempel@pengutronix.de>
>>>>>>      net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
>>>>>>
>>>>>> Oleksij Rempel <o.rempel@pengutronix.de>
>>>>>>      net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches
>>>>>>
>>>>>> Ma Ke <make24@iscas.ac.cn>
>>>>>>      phy: Fix error handling in tegra_xusb_port_init
>>>>>>
>>>>>> Wayne Chang <waynec@nvidia.com>
>>>>>>      phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
>>>>>>
>>>>>> Steven Rostedt <rostedt@goodmis.org>
>>>>>>      tracing: samples: Initialize trace_array_printk() with the correct function
>>>>>>
>>>>>> Ashish Kalra <ashish.kalra@amd.com>
>>>>>>      x86/sev: Make sure pages are not skipped during kdump
>>>>>>
>>>>>> Ashish Kalra <ashish.kalra@amd.com>
>>>>>>      x86/sev: Do not touch VMSA pages during SNP guest memory kdump
>>>>>>
>>>>>> pengdonglin <pengdonglin@xiaomi.com>
>>>>>>      ftrace: Fix preemption accounting for stacktrace filter command
>>>>>>
>>>>>> pengdonglin <pengdonglin@xiaomi.com>
>>>>>>      ftrace: Fix preemption accounting for stacktrace trigger command
>>>>>>
>>>>>> Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>>>>>>      i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
>>>>>>
>>>>>> Nathan Chancellor <nathan@kernel.org>
>>>>>>      kbuild: Disable -Wdefault-const-init-unsafe
>>>>>>
>>>>>> Michael Kelley <mhklinux@outlook.com>
>>>>>>      Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
>>>>>>
>>>>>> Michael Kelley <mhklinux@outlook.com>
>>>>>>      Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
>>>>>>
>>>>>> Michael Kelley <mhklinux@outlook.com>
>>>>>>      hv_netvsc: Remove rmsg_pgcnt
>>>>>>
>>>>>> Michael Kelley <mhklinux@outlook.com>
>>>>>>      hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
>>>>>>
>>>>>> Michael Kelley <mhklinux@outlook.com>
>>>>>>      hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
>>>>>>
>>>>>> Dragan Simic <dsimic@manjaro.org>
>>>>>>      arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
>>>>>>
>>>>>> Sam Edwards <cfsworks@gmail.com>
>>>>>>      arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
>>>>>>
>>>>>> Christian Hewitt <christianshewitt@gmail.com>
>>>>>>      arm64: dts: amlogic: dreambox: fix missing clkc_audio node
>>>>>>
>>>>>> Hyejeong Choi <hjeong.choi@samsung.com>
>>>>>>      dma-buf: insert memory barrier before updating num_fences
>>>>>>
>>>>>> Nicolas Chauvet <kwizart@gmail.com>
>>>>>>      ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
>>>>>>
>>>>>> Christian Heusel <christian@heusel.eu>
>>>>>>      ALSA: usb-audio: Add sample rate quirk for Audioengine D1
>>>>>>
>>>>>> Wentao Liang <vulab@iscas.ac.cn>
>>>>>>      ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
>>>>>>
>>>>>> Jeremy Linton <jeremy.linton@arm.com>
>>>>>>      ACPI: PPTT: Fix processor subtable walk
>>>>>>
>>>>>> Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>>>>>>      gpio: pca953x: fix IRQ storm on system wake up
>>>>>>
>>>>>> Alexey Makhalov <alexey.makhalov@broadcom.com>
>>>>>>      MAINTAINERS: Update Alexey Makhalov's email address
>>>>>>
>>>>>> Wayne Lin <Wayne.Lin@amd.com>
>>>>>>      drm/amd/display: Avoid flooding unnecessary info messages
>>>>>>
>>>>>> Wayne Lin <Wayne.Lin@amd.com>
>>>>>>      drm/amd/display: Correct the reply value when AUX write incomplete
>>>>>>
>>>>>> Philip Yang <Philip.Yang@amd.com>
>>>>>>      drm/amdgpu: csa unmap use uninterruptible lock
>>>>>>
>>>>>> Tim Huang <tim.huang@amd.com>
>>>>>>      drm/amdgpu: fix incorrect MALL size for GFX1151
>>>>>>
>>>>>> David (Ming Qiang) Wu <David.Wu3@amd.com>
>>>>>>      drm/amdgpu: read back register after written for VCN v4.0.5
>>>>>>
>>>>>
>>>>> This commit seems to breaking a couple of devices with the Phoenix APU, most notably the Ryzen AI chips. Note that this commit in mainline seems to work as intended, and after doing a little bit of digging, [1] landed in 6.15 and so this cherrypick may not be so trivial after all. Attached is a kernel trace highlighting the breakage caused by this commit, along with [2] for the full log.
>>>>>
>>>>> Also adding Alex, David and Mario to Ccs.
>>>>>
>>>>
>>>> Just a minor correction - VCN 4.0.5 is on Strix.  So this report is not
>>>> likely from a Phoenix APU.
>>>>
>>>> Nonetheless I agree; I suspect backporting
>>>> ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c will help the issue.
>>>
>>> If it is required, someone is going to need to provide a working
>>> version, as that does not apply cleanly as-is.
>>>
>>> thanks,
>>>
>>> greg k-h
>>
>> Hi Greg,
>>
>> I finally got someone to test the mentioned commit, and I (or they) can confirm that ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c is indeed the missing commit needed for "drm/amdgpu: read back register after written for VCN v4.0.5".
>>
>> I don't know if this will help, but I got everything to apply cleanly by first applying ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c, then cherry-picking the mainline version of "drm/amdgpu: read back register after written for VCN v4.0.5" [1] since the one in stable-rc seems to have been adjusted for the stable tree and made it conflict.
> 
> I don't see the conflict that happened here, as I only apply patches
> "cleanly".  But I trust you that things are odd here.
> 
>> -- 
>> Regards,
>>   Eric
>>
>> [1] ee7360fc27d6045510f8fe459b5649b2af27811a
> 
> Ick.  Ok, let me go drop this commit from the tree now, and then can you
> resubmit both of these as a tested series for them to be included
> properly?
> 
> I'll do the same for both 6.12.y and 6.14.y now.
> 
> thanks,
> 
> greg k-h

Hi,

I've sent it over at [1]. I hope I did it correctly as this is the first time I'm formally sending over a patch (even if it's not mine). Please let me know if I did anything wrong and things that I can do to correct them :). I've also opted to add a `Tested-by` tag in response to "a tested series". Reminder that I only built the kernels, and had another user test that build since I don't have an affected device, so feel free to drop it if its wrong.

-- 
Regards,
  Eric

[1] https://lore.kernel.org/stable/20250521165421.293820-1-dnaim@cachyos.org

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-21 16:59           ` Eric Naim
@ 2025-05-21 17:10             ` Greg Kroah-Hartman
  0 siblings, 0 replies; 165+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-21 17:10 UTC (permalink / raw)
  To: Eric Naim
  Cc: Mario Limonciello, stable, patches, linux-kernel, torvalds, akpm,
	linux, shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie, David.Wu3,
	alexander.deucher

On Thu, May 22, 2025 at 12:59:10AM +0800, Eric Naim wrote:
> On 5/22/25 00:25, Greg Kroah-Hartman wrote:
> > On Wed, May 21, 2025 at 10:13:45PM +0800, Eric Naim wrote:
> >> On 5/21/25 13:35, Greg Kroah-Hartman wrote:
> >>> On Tue, May 20, 2025 at 09:42:13PM -0500, Mario Limonciello wrote:
> >>>> On 5/20/2025 4:34 PM, Eric Naim wrote:
> >>>>> Hi Greg,
> >>>>>
> >>>>> On 5/20/25 21:49, Greg Kroah-Hartman wrote:
> >>>>>> This is the start of the stable review cycle for the 6.14.8 release.
> >>>>>> There are 145 patches in this series, all will be posted as a response
> >>>>>> to this one.  If anyone has any issues with these being applied, please
> >>>>>> let me know.
> >>>>>>
> >>>>>> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> >>>>>> Anything received after that time might be too late.
> >>>>>>
> >>>>>> The whole patch series can be found in one patch at:
> >>>>>> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> >>>>>> or in the git tree and branch at:
> >>>>>> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> >>>>>> and the diffstat can be found below.
> >>>>>>
> >>>>>> thanks,
> >>>>>>
> >>>>>> greg k-h
> >>>>>>
> >>>>>> -------------
> >>>>>> Pseudo-Shortlog of commits:
> >>>>>>
> >>>>>> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >>>>>>      Linux 6.14.8-rc1
> >>>>>>
> >>>>>> Dan Carpenter <dan.carpenter@linaro.org>
> >>>>>>      phy: tegra: xusb: remove a stray unlock
> >>>>>>
> >>>>>> Tiezhu Yang <yangtiezhu@loongson.cn>
> >>>>>>      perf tools: Fix build error for LoongArch
> >>>>>>
> >>>>>> Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> >>>>>>      mm/page_alloc: fix race condition in unaccepted memory handling
> >>>>>>
> >>>>>> Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> >>>>>>      drm/xe/gsc: do not flush the GSC worker from the reset path
> >>>>>>
> >>>>>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
> >>>>>>      accel/ivpu: Flush pending jobs of device's workqueues
> >>>>>>
> >>>>>> Karol Wachowski <karol.wachowski@intel.com>
> >>>>>>      accel/ivpu: Fix missing MMU events if file_priv is unbound
> >>>>>>
> >>>>>> Karol Wachowski <karol.wachowski@intel.com>
> >>>>>>      accel/ivpu: Fix missing MMU events from reserved SSID
> >>>>>>
> >>>>>> Karol Wachowski <karol.wachowski@intel.com>
> >>>>>>      accel/ivpu: Move parts of MMU event IRQ handling to thread handler
> >>>>>>
> >>>>>> Karol Wachowski <karol.wachowski@intel.com>
> >>>>>>      accel/ivpu: Dump only first MMU fault from single context
> >>>>>>
> >>>>>> Maciej Falkowski <maciej.falkowski@linux.intel.com>
> >>>>>>      accel/ivpu: Use workqueue for IRQ handling
> >>>>>>
> >>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>>>      dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
> >>>>>>
> >>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
> >>>>>>
> >>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
> >>>>>>
> >>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>>>      dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
> >>>>>>
> >>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>>>      dmaengine: idxd: Add missing cleanups in cleanup internals
> >>>>>>
> >>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>>>      dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
> >>>>>>
> >>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
> >>>>>>
> >>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
> >>>>>>
> >>>>>> Shuai Xue <xueshuai@linux.alibaba.com>
> >>>>>>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
> >>>>>>
> >>>>>> Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
> >>>>>>      dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
> >>>>>>
> >>>>>> Ronald Wahl <ronald.wahl@legrand.com>
> >>>>>>      dmaengine: ti: k3-udma: Add missing locking
> >>>>>>
> >>>>>> Barry Song <baohua@kernel.org>
> >>>>>>      mm: userfaultfd: correct dirty flags set for both present and swap pte
> >>>>>>
> >>>>>> Wupeng Ma <mawupeng1@huawei.com>
> >>>>>>      mm: hugetlb: fix incorrect fallback for subpool
> >>>>>>
> >>>>>> hexue <xue01.he@samsung.com>
> >>>>>>      io_uring/uring_cmd: fix hybrid polling initialization issue
> >>>>>>
> >>>>>> Jens Axboe <axboe@kernel.dk>
> >>>>>>      io_uring/memmap: don't use page_address() on a highmem page
> >>>>>>
> >>>>>> Nathan Chancellor <nathan@kernel.org>
> >>>>>>      net: qede: Initialize qede_ll_ops with designated initializer
> >>>>>>
> >>>>>> Steven Rostedt <rostedt@goodmis.org>
> >>>>>>      ring-buffer: Fix persistent buffer when commit page is the reader page
> >>>>>>
> >>>>>> Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
> >>>>>>      wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
> >>>>>>
> >>>>>> Fedor Pchelkin <pchelkin@ispras.ru>
> >>>>>>      wifi: mt76: disable napi on driver removal
> >>>>>>
> >>>>>> Jarkko Sakkinen <jarkko@kernel.org>
> >>>>>>      tpm: Mask TPM RC in tpm2_start_auth_session()
> >>>>>>
> >>>>>> Aaron Kling <webgeek1234@gmail.com>
> >>>>>>      spi: tegra114: Use value to check for invalid delays
> >>>>>>
> >>>>>> Jethro Donaldson <devel@jro.nz>
> >>>>>>      smb: client: fix memory leak during error handling for POSIX mkdir
> >>>>>>
> >>>>>> Steve Siwinski <ssiwinski@atto.com>
> >>>>>>      scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
> >>>>>>
> >>>>>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> >>>>>>      phy: renesas: rcar-gen3-usb2: Set timing registers only once
> >>>>>>
> >>>>>> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> >>>>>>      phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
> >>>>>>
> >>>>>> Oleksij Rempel <o.rempel@pengutronix.de>
> >>>>>>      net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
> >>>>>>
> >>>>>> Oleksij Rempel <o.rempel@pengutronix.de>
> >>>>>>      net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches
> >>>>>>
> >>>>>> Ma Ke <make24@iscas.ac.cn>
> >>>>>>      phy: Fix error handling in tegra_xusb_port_init
> >>>>>>
> >>>>>> Wayne Chang <waynec@nvidia.com>
> >>>>>>      phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
> >>>>>>
> >>>>>> Steven Rostedt <rostedt@goodmis.org>
> >>>>>>      tracing: samples: Initialize trace_array_printk() with the correct function
> >>>>>>
> >>>>>> Ashish Kalra <ashish.kalra@amd.com>
> >>>>>>      x86/sev: Make sure pages are not skipped during kdump
> >>>>>>
> >>>>>> Ashish Kalra <ashish.kalra@amd.com>
> >>>>>>      x86/sev: Do not touch VMSA pages during SNP guest memory kdump
> >>>>>>
> >>>>>> pengdonglin <pengdonglin@xiaomi.com>
> >>>>>>      ftrace: Fix preemption accounting for stacktrace filter command
> >>>>>>
> >>>>>> pengdonglin <pengdonglin@xiaomi.com>
> >>>>>>      ftrace: Fix preemption accounting for stacktrace trigger command
> >>>>>>
> >>>>>> Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> >>>>>>      i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
> >>>>>>
> >>>>>> Nathan Chancellor <nathan@kernel.org>
> >>>>>>      kbuild: Disable -Wdefault-const-init-unsafe
> >>>>>>
> >>>>>> Michael Kelley <mhklinux@outlook.com>
> >>>>>>      Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
> >>>>>>
> >>>>>> Michael Kelley <mhklinux@outlook.com>
> >>>>>>      Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
> >>>>>>
> >>>>>> Michael Kelley <mhklinux@outlook.com>
> >>>>>>      hv_netvsc: Remove rmsg_pgcnt
> >>>>>>
> >>>>>> Michael Kelley <mhklinux@outlook.com>
> >>>>>>      hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
> >>>>>>
> >>>>>> Michael Kelley <mhklinux@outlook.com>
> >>>>>>      hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
> >>>>>>
> >>>>>> Dragan Simic <dsimic@manjaro.org>
> >>>>>>      arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
> >>>>>>
> >>>>>> Sam Edwards <cfsworks@gmail.com>
> >>>>>>      arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
> >>>>>>
> >>>>>> Christian Hewitt <christianshewitt@gmail.com>
> >>>>>>      arm64: dts: amlogic: dreambox: fix missing clkc_audio node
> >>>>>>
> >>>>>> Hyejeong Choi <hjeong.choi@samsung.com>
> >>>>>>      dma-buf: insert memory barrier before updating num_fences
> >>>>>>
> >>>>>> Nicolas Chauvet <kwizart@gmail.com>
> >>>>>>      ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
> >>>>>>
> >>>>>> Christian Heusel <christian@heusel.eu>
> >>>>>>      ALSA: usb-audio: Add sample rate quirk for Audioengine D1
> >>>>>>
> >>>>>> Wentao Liang <vulab@iscas.ac.cn>
> >>>>>>      ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
> >>>>>>
> >>>>>> Jeremy Linton <jeremy.linton@arm.com>
> >>>>>>      ACPI: PPTT: Fix processor subtable walk
> >>>>>>
> >>>>>> Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> >>>>>>      gpio: pca953x: fix IRQ storm on system wake up
> >>>>>>
> >>>>>> Alexey Makhalov <alexey.makhalov@broadcom.com>
> >>>>>>      MAINTAINERS: Update Alexey Makhalov's email address
> >>>>>>
> >>>>>> Wayne Lin <Wayne.Lin@amd.com>
> >>>>>>      drm/amd/display: Avoid flooding unnecessary info messages
> >>>>>>
> >>>>>> Wayne Lin <Wayne.Lin@amd.com>
> >>>>>>      drm/amd/display: Correct the reply value when AUX write incomplete
> >>>>>>
> >>>>>> Philip Yang <Philip.Yang@amd.com>
> >>>>>>      drm/amdgpu: csa unmap use uninterruptible lock
> >>>>>>
> >>>>>> Tim Huang <tim.huang@amd.com>
> >>>>>>      drm/amdgpu: fix incorrect MALL size for GFX1151
> >>>>>>
> >>>>>> David (Ming Qiang) Wu <David.Wu3@amd.com>
> >>>>>>      drm/amdgpu: read back register after written for VCN v4.0.5
> >>>>>>
> >>>>>
> >>>>> This commit seems to breaking a couple of devices with the Phoenix APU, most notably the Ryzen AI chips. Note that this commit in mainline seems to work as intended, and after doing a little bit of digging, [1] landed in 6.15 and so this cherrypick may not be so trivial after all. Attached is a kernel trace highlighting the breakage caused by this commit, along with [2] for the full log.
> >>>>>
> >>>>> Also adding Alex, David and Mario to Ccs.
> >>>>>
> >>>>
> >>>> Just a minor correction - VCN 4.0.5 is on Strix.  So this report is not
> >>>> likely from a Phoenix APU.
> >>>>
> >>>> Nonetheless I agree; I suspect backporting
> >>>> ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c will help the issue.
> >>>
> >>> If it is required, someone is going to need to provide a working
> >>> version, as that does not apply cleanly as-is.
> >>>
> >>> thanks,
> >>>
> >>> greg k-h
> >>
> >> Hi Greg,
> >>
> >> I finally got someone to test the mentioned commit, and I (or they) can confirm that ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c is indeed the missing commit needed for "drm/amdgpu: read back register after written for VCN v4.0.5".
> >>
> >> I don't know if this will help, but I got everything to apply cleanly by first applying ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c, then cherry-picking the mainline version of "drm/amdgpu: read back register after written for VCN v4.0.5" [1] since the one in stable-rc seems to have been adjusted for the stable tree and made it conflict.
> > 
> > I don't see the conflict that happened here, as I only apply patches
> > "cleanly".  But I trust you that things are odd here.
> > 
> >> -- 
> >> Regards,
> >>   Eric
> >>
> >> [1] ee7360fc27d6045510f8fe459b5649b2af27811a
> > 
> > Ick.  Ok, let me go drop this commit from the tree now, and then can you
> > resubmit both of these as a tested series for them to be included
> > properly?
> > 
> > I'll do the same for both 6.12.y and 6.14.y now.
> > 
> > thanks,
> > 
> > greg k-h
> 
> Hi,
> 
> I've sent it over at [1]. I hope I did it correctly as this is the first time I'm formally sending over a patch (even if it's not mine). Please let me know if I did anything wrong and things that I can do to correct them :). I've also opted to add a `Tested-by` tag in response to "a tested series". Reminder that I only built the kernels, and had another user test that build since I don't have an affected device, so feel free to drop it if its wrong.

Looks good, I'll queue them up after this round of releases goes out,
thanks!

greg k-h

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (153 preceding siblings ...)
  2025-05-21  9:24 ` Naresh Kamboju
@ 2025-05-21 18:00 ` Peter Schneider
  2025-05-21 18:16 ` Mark Brown
  2025-05-22  5:00 ` Hardik Garg
  156 siblings, 0 replies; 165+ messages in thread
From: Peter Schneider @ 2025-05-21 18:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, stable
  Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
	rwarsow, conor, hargar, broonie

Am 20.05.2025 um 15:49 schrieb Greg Kroah-Hartman:
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.

Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg 
oddities or regressions found.

Tested-by: Peter Schneider <pschneider1968@googlemail.com>


Beste Grüße,
Peter Schneider

-- 
Climb the mountain not to plant your flag, but to embrace the challenge,
enjoy the air and behold the view. Climb it so you can see the world,
not so the world can see you.                    -- David McCullough Jr.

OpenPGP:  0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244
Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc
https://keys.mailvelope.com/pks/lookup?op=get&search=pschneider1968@googlemail.com
https://keys.mailvelope.com/pks/lookup?op=get&search=pschneider1968@gmail.com

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (154 preceding siblings ...)
  2025-05-21 18:00 ` Peter Schneider
@ 2025-05-21 18:16 ` Mark Brown
  2025-05-22  5:00 ` Hardik Garg
  156 siblings, 0 replies; 165+ messages in thread
From: Mark Brown @ 2025-05-21 18:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
	patches, lkft-triage, pavel, jonathanh, f.fainelli,
	sudipm.mukherjee, srw, rwarsow, conor, hargar

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

On Tue, May 20, 2025 at 03:49:30PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.

Tested-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 165+ messages in thread

* Re: [PATCH 6.14 000/145] 6.14.8-rc1 review
  2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
                   ` (155 preceding siblings ...)
  2025-05-21 18:16 ` Mark Brown
@ 2025-05-22  5:00 ` Hardik Garg
  156 siblings, 0 replies; 165+ messages in thread
From: Hardik Garg @ 2025-05-22  5:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, stable
  Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
	rwarsow, conor, hargar, broonie

The kernel, bpf tool and perf tool builds fine for v6.14.8-rc1 on x86
and arm64 Azure VM.


Tested-by: Hardik Garg <hargar@linux.microsoft.com>


Thanks,
Hardik

On 5/20/2025 6:49 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.14.8 release.
> There are 145 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 22 May 2025 12:57:37 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.8-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.14.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
> -------------
> Pseudo-Shortlog of commits:
>
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>      Linux 6.14.8-rc1
>
> Dan Carpenter <dan.carpenter@linaro.org>
>      phy: tegra: xusb: remove a stray unlock
>
> Tiezhu Yang <yangtiezhu@loongson.cn>
>      perf tools: Fix build error for LoongArch
>
> Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>      mm/page_alloc: fix race condition in unaccepted memory handling
>
> Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>      drm/xe/gsc: do not flush the GSC worker from the reset path
>
> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>      accel/ivpu: Flush pending jobs of device's workqueues
>
> Karol Wachowski <karol.wachowski@intel.com>
>      accel/ivpu: Fix missing MMU events if file_priv is unbound
>
> Karol Wachowski <karol.wachowski@intel.com>
>      accel/ivpu: Fix missing MMU events from reserved SSID
>
> Karol Wachowski <karol.wachowski@intel.com>
>      accel/ivpu: Move parts of MMU event IRQ handling to thread handler
>
> Karol Wachowski <karol.wachowski@intel.com>
>      accel/ivpu: Dump only first MMU fault from single context
>
> Maciej Falkowski <maciej.falkowski@linux.intel.com>
>      accel/ivpu: Use workqueue for IRQ handling
>
> Shuai Xue <xueshuai@linux.alibaba.com>
>      dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
>
> Shuai Xue <xueshuai@linux.alibaba.com>
>      dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
>
> Shuai Xue <xueshuai@linux.alibaba.com>
>      dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
>
> Shuai Xue <xueshuai@linux.alibaba.com>
>      dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
>
> Shuai Xue <xueshuai@linux.alibaba.com>
>      dmaengine: idxd: Add missing cleanups in cleanup internals
>
> Shuai Xue <xueshuai@linux.alibaba.com>
>      dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
>
> Shuai Xue <xueshuai@linux.alibaba.com>
>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
>
> Shuai Xue <xueshuai@linux.alibaba.com>
>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
>
> Shuai Xue <xueshuai@linux.alibaba.com>
>      dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
>
> Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
>      dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
>
> Ronald Wahl <ronald.wahl@legrand.com>
>      dmaengine: ti: k3-udma: Add missing locking
>
> Barry Song <baohua@kernel.org>
>      mm: userfaultfd: correct dirty flags set for both present and swap pte
>
> Wupeng Ma <mawupeng1@huawei.com>
>      mm: hugetlb: fix incorrect fallback for subpool
>
> hexue <xue01.he@samsung.com>
>      io_uring/uring_cmd: fix hybrid polling initialization issue
>
> Jens Axboe <axboe@kernel.dk>
>      io_uring/memmap: don't use page_address() on a highmem page
>
> Nathan Chancellor <nathan@kernel.org>
>      net: qede: Initialize qede_ll_ops with designated initializer
>
> Steven Rostedt <rostedt@goodmis.org>
>      ring-buffer: Fix persistent buffer when commit page is the reader page
>
> Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
>      wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
>
> Fedor Pchelkin <pchelkin@ispras.ru>
>      wifi: mt76: disable napi on driver removal
>
> Jarkko Sakkinen <jarkko@kernel.org>
>      tpm: Mask TPM RC in tpm2_start_auth_session()
>
> Aaron Kling <webgeek1234@gmail.com>
>      spi: tegra114: Use value to check for invalid delays
>
> Jethro Donaldson <devel@jro.nz>
>      smb: client: fix memory leak during error handling for POSIX mkdir
>
> Steve Siwinski <ssiwinski@atto.com>
>      scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
>
> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>      phy: renesas: rcar-gen3-usb2: Set timing registers only once
>
> Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>      phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
>
> Oleksij Rempel <o.rempel@pengutronix.de>
>      net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
>
> Oleksij Rempel <o.rempel@pengutronix.de>
>      net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches
>
> Ma Ke <make24@iscas.ac.cn>
>      phy: Fix error handling in tegra_xusb_port_init
>
> Wayne Chang <waynec@nvidia.com>
>      phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking
>
> Steven Rostedt <rostedt@goodmis.org>
>      tracing: samples: Initialize trace_array_printk() with the correct function
>
> Ashish Kalra <ashish.kalra@amd.com>
>      x86/sev: Make sure pages are not skipped during kdump
>
> Ashish Kalra <ashish.kalra@amd.com>
>      x86/sev: Do not touch VMSA pages during SNP guest memory kdump
>
> pengdonglin <pengdonglin@xiaomi.com>
>      ftrace: Fix preemption accounting for stacktrace filter command
>
> pengdonglin <pengdonglin@xiaomi.com>
>      ftrace: Fix preemption accounting for stacktrace trigger command
>
> Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>      i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
>
> Nathan Chancellor <nathan@kernel.org>
>      kbuild: Disable -Wdefault-const-init-unsafe
>
> Michael Kelley <mhklinux@outlook.com>
>      Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
>
> Michael Kelley <mhklinux@outlook.com>
>      Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
>
> Michael Kelley <mhklinux@outlook.com>
>      hv_netvsc: Remove rmsg_pgcnt
>
> Michael Kelley <mhklinux@outlook.com>
>      hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
>
> Michael Kelley <mhklinux@outlook.com>
>      hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
>
> Dragan Simic <dsimic@manjaro.org>
>      arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi
>
> Sam Edwards <cfsworks@gmail.com>
>      arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
>
> Christian Hewitt <christianshewitt@gmail.com>
>      arm64: dts: amlogic: dreambox: fix missing clkc_audio node
>
> Hyejeong Choi <hjeong.choi@samsung.com>
>      dma-buf: insert memory barrier before updating num_fences
>
> Nicolas Chauvet <kwizart@gmail.com>
>      ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
>
> Christian Heusel <christian@heusel.eu>
>      ALSA: usb-audio: Add sample rate quirk for Audioengine D1
>
> Wentao Liang <vulab@iscas.ac.cn>
>      ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
>
> Jeremy Linton <jeremy.linton@arm.com>
>      ACPI: PPTT: Fix processor subtable walk
>
> Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>      gpio: pca953x: fix IRQ storm on system wake up
>
> Alexey Makhalov <alexey.makhalov@broadcom.com>
>      MAINTAINERS: Update Alexey Makhalov's email address
>
> Wayne Lin <Wayne.Lin@amd.com>
>      drm/amd/display: Avoid flooding unnecessary info messages
>
> Wayne Lin <Wayne.Lin@amd.com>
>      drm/amd/display: Correct the reply value when AUX write incomplete
>
> Philip Yang <Philip.Yang@amd.com>
>      drm/amdgpu: csa unmap use uninterruptible lock
>
> Tim Huang <tim.huang@amd.com>
>      drm/amdgpu: fix incorrect MALL size for GFX1151
>
> David (Ming Qiang) Wu <David.Wu3@amd.com>
>      drm/amdgpu: read back register after written for VCN v4.0.5
>
> Fabio Estevam <festevam@denx.de>
>      drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc()
>
> Melissa Wen <mwen@igalia.com>
>      Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor"
>
> Kyoji Ogasawara <sawara04.o@gmail.com>
>      btrfs: add back warning for mount option commit values exceeding 300
>
> Boris Burkov <boris@bur.io>
>      btrfs: fix folio leak in submit_one_async_extent()
>
> Filipe Manana <fdmanana@suse.com>
>      btrfs: fix discard worker infinite loop after disabling discard
>
> Tiezhu Yang <yangtiezhu@loongson.cn>
>      LoongArch: uprobes: Remove redundant code about resume_era
>
> Tiezhu Yang <yangtiezhu@loongson.cn>
>      LoongArch: uprobes: Remove user_{en,dis}able_single_step()
>
> Huacai Chen <chenhuacai@kernel.org>
>      LoongArch: Fix MAX_REG_OFFSET calculation
>
> Huacai Chen <chenhuacai@kernel.org>
>      LoongArch: Save and restore CSR.CNTC for hibernation
>
> Huacai Chen <chenhuacai@kernel.org>
>      LoongArch: Move __arch_cpu_idle() to .cpuidle.text section
>
> Tianyang Zhang <zhangtianyang@loongson.cn>
>      LoongArch: Prevent cond_resched() occurring within kernel-fpu
>
> Mario Limonciello <mario.limonciello@amd.com>
>      HID: amd_sfh: Fix SRA sensor when it's the only sensor
>
> Rong Zhang <i@rong.moe>
>      HID: bpf: abort dispatch if device destroyed
>
> Max Kellermann <max.kellermann@ionos.com>
>      fs/eventpoll: fix endless busy loop after timeout has expired
>
> Jan Kara <jack@suse.cz>
>      udf: Make sure i_lenExtents is uptodate on inode eviction
>
> Tejun Heo <tj@kernel.org>
>      sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator
>
> Thomas Weißschuh <linux@weissschuh.net>
>      Revert "kbuild, rust: use -fremap-path-prefix to make paths relative"
>
> Nathan Lynch <nathan.lynch@amd.com>
>      dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted"
>
> Trond Myklebust <trond.myklebust@hammerspace.com>
>      NFSv4/pnfs: Reset the layout state after a layoutreturn
>
> Ming Lei <ming.lei@redhat.com>
>      ublk: fix dead loop when canceling io command
>
> Gerhard Engleder <gerhard@engleder-embedded.com>
>      tsnep: fix timestamping with a stacked DSA driver
>
> Pengtao He <hept.hept.hept@gmail.com>
>      net/tls: fix kernel panic when alloc_page failed
>
> Ido Schimmel <idosch@nvidia.com>
>      mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices
>
> Kees Cook <kees@kernel.org>
>      wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request
>
> Subbaraya Sundeep <sbhatta@marvell.com>
>      octeontx2-pf: Do not reallocate all ntuple filters
>
> Hariprasad Kelam <hkelam@marvell.com>
>      octeontx2-af: Fix CGX Receive counters
>
> Bo-Cun Chen <bc-bocun.chen@mediatek.com>
>      net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability
>
> Subbaraya Sundeep <sbhatta@marvell.com>
>      octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy
>
> Jakub Kicinski <kuba@kernel.org>
>      netlink: specs: tc: all actions are indexed arrays
>
> Jakub Kicinski <kuba@kernel.org>
>      netlink: specs: tc: fix a couple of attribute names
>
> Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>      drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value
>
> Jens Axboe <axboe@kernel.dk>
>      io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo()
>
> Hariprasad Kelam <hkelam@marvell.com>
>      octeontx2-pf: Fix ethtool support for SDP representors
>
> Cosmin Tanislav <demonsingur@gmail.com>
>      regulator: max20086: fix invalid memory access
>
> Abdun Nihaal <abdun.nihaal@gmail.com>
>      qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd()
>
> Carolina Jubran <cjubran@nvidia.com>
>      net/mlx5e: Disable MACsec offload for uplink representor profile
>
> Konstantin Shkolnyy <kshk@linux.ibm.com>
>      vsock/test: Fix occasional failure in SIOCOUTQ tests
>
> Melissa Wen <mwen@igalia.com>
>      drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp
>
> Jonas Gorski <jonas.gorski@gmail.com>
>      net: dsa: b53: prevent standalone from trying to forward to other ports
>
> Geert Uytterhoeven <geert+renesas@glider.be>
>      ALSA: sh: SND_AICA should depend on SH_DMA_API
>
> Keith Busch <kbusch@kernel.org>
>      nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable
>
> Kees Cook <kees@kernel.org>
>      nvme-pci: make nvme_pci_npages_prp() __always_inline
>
> Vladimir Oltean <vladimir.oltean@nxp.com>
>      net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING
>
> Mathieu Othacehe <othacehe@gnu.org>
>      net: cadence: macb: Fix a possible deadlock in macb_halt_tx.
>
> Takashi Iwai <tiwai@suse.de>
>      ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info
>
> Takashi Iwai <tiwai@suse.de>
>      ALSA: seq: Fix delivery of UMP events to group ports
>
> Andrew Jeffery <andrew@codeconstruct.com.au>
>      net: mctp: Ensure keys maintain only one ref to corresponding dev
>
> Cosmin Ratiu <cratiu@nvidia.com>
>      tests/ncdevmem: Fix double-free of queue array
>
> Matt Johnston <matt@codeconstruct.com.au>
>      net: mctp: Don't access ifa_index when missing
>
> Hangbin Liu <liuhangbin@gmail.com>
>      tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing
>
> I Hsin Cheng <richard120310@gmail.com>
>      drm/meson: Use 1000ULL when operating with mode->clock
>
> Cong Wang <xiyou.wangcong@gmail.com>
>      net_sched: Flush gso_skb list too during ->change()
>
> Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>      Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags
>
> Zhu Yanjun <yanjun.zhu@linux.dev>
>      RDMA/core: Fix "KASAN: slab-use-after-free Read in ib_register_device" problem
>
> Geert Uytterhoeven <geert+renesas@glider.be>
>      spi: loopback-test: Do not split 1024-byte hexdumps
>
> Trond Myklebust <trond.myklebust@hammerspace.com>
>      NFS/localio: Fix a race in nfs_local_open_fh()
>
> Li Lingfeng <lilingfeng3@huawei.com>
>      nfs: handle failure of nfs_get_lock_context in unlock path
>
> Henry Martin <bsdhenrymartin@gmail.com>
>      HID: uclogic: Add NULL check in uclogic_input_configured()
>
> Qasim Ijaz <qasdev00@gmail.com>
>      HID: thrustmaster: fix memory leak in thrustmaster_interrupts()
>
> Zhu Yanjun <yanjun.zhu@linux.dev>
>      RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug
>
> David Lechner <dlechner@baylibre.com>
>      iio: adc: ad7606: check for NULL before calling sw_mode_config()
>
> Guillaume Stols <gstols@baylibre.com>
>      iio: adc: ad7606: move software functions into common file
>
> Guillaume Stols <gstols@baylibre.com>
>      iio: adc: ad7606: move the software mode configuration
>
> Michal Suchanek <msuchanek@suse.de>
>      tpm: tis: Double the timeout B to 4s
>
> Masami Hiramatsu (Google) <mhiramat@kernel.org>
>      tracing: probes: Fix a possible race in trace_probe_log APIs
>
> Breno Leitao <leitao@debian.org>
>      tracing: fprobe: Fix RCU warning message in list traversal
>
> Waiman Long <longman@redhat.com>
>      cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks
>
> Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
>      arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout
>
> Hans de Goede <hdegoede@redhat.com>
>      platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection
>
> Runhua He <hua@aosc.io>
>      platform/x86/amd/pmc: Declare quirk_spurious_8042 for MECHREVO Wujie 14XA (GX4HRXL)
>
> Kees Cook <kees@kernel.org>
>      binfmt_elf: Move brk for static PIE even if ASLR disabled
>
> Ze Huang <huangze@whut.edu.cn>
>      riscv: dts: sophgo: fix DMA data-width configuration for CV18xx
>
> Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
>      arm64: dts: rockchip: fix Sige5 RTC interrupt pin
>
> Suma Hegde <suma.hegde@amd.com>
>      platform/x86/amd/hsmp: Make amd_hsmp and hsmp_acpi as mutually exclusive drivers
>
> Yazen Ghannam <yazen.ghannam@amd.com>
>      x86/amd_node, platform/x86/amd/hsmp: Have HSMP use SMN through AMD_NODE
>
> Mario Limonciello <mario.limonciello@amd.com>
>      drivers/platform/x86/amd: pmf: Check for invalid Smart PC Policies
>
> Mario Limonciello <mario.limonciello@amd.com>
>      drivers/platform/x86/amd: pmf: Check for invalid sideloaded Smart PC Policies
>
> Stephen Smalley <stephen.smalley.work@gmail.com>
>      fs/xattr.c: fix simple_xattr_list to always include security.* xattrs
>
> Tom Vincent <linux@tlvince.com>
>      arm64: dts: rockchip: Assign RT5616 MCLK rate on rk3588-friendlyelec-cm3588
>
>
> -------------
>
> Diffstat:
>
>   Documentation/netlink/specs/tc.yaml                |  10 +-
>   MAINTAINERS                                        |   6 +-
>   Makefile                                           |   5 +-
>   .../boot/dts/amlogic/meson-g12b-dreambox.dtsi      |   4 +
>   arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi  |  12 +-
>   .../boot/dts/rockchip/rk3576-armsom-sige5.dts      |   2 +-
>   .../dts/rockchip/rk3588-friendlyelec-cm3588.dtsi   |   4 +
>   .../arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi |   2 +
>   arch/arm64/boot/dts/rockchip/rk3588j.dtsi          |  53 ++---
>   arch/loongarch/include/asm/ptrace.h                |   2 +-
>   arch/loongarch/include/asm/uprobes.h               |   1 -
>   arch/loongarch/kernel/genex.S                      |   7 +-
>   arch/loongarch/kernel/kfpu.c                       |  22 +-
>   arch/loongarch/kernel/time.c                       |   2 +-
>   arch/loongarch/kernel/uprobes.c                    |  11 +-
>   arch/loongarch/power/hibernate.c                   |   3 +
>   arch/riscv/boot/dts/sophgo/cv18xx.dtsi             |   2 +-
>   arch/x86/coco/sev/core.c                           | 255 +++++++++++++--------
>   arch/x86/include/asm/amd_nb.h                      |   1 -
>   arch/x86/include/asm/amd_node.h                    |  13 ++
>   arch/x86/kernel/amd_nb.c                           |   1 -
>   arch/x86/kernel/amd_node.c                         |   9 +
>   block/bio.c                                        |   2 +-
>   drivers/accel/ivpu/ivpu_drv.c                      |  39 +---
>   drivers/accel/ivpu/ivpu_drv.h                      |   5 +-
>   drivers/accel/ivpu/ivpu_hw.c                       |   5 -
>   drivers/accel/ivpu/ivpu_hw.h                       |   9 -
>   drivers/accel/ivpu/ivpu_hw_btrs.c                  |   3 +-
>   drivers/accel/ivpu/ivpu_ipc.c                      |   7 +-
>   drivers/accel/ivpu/ivpu_ipc.h                      |   2 +-
>   drivers/accel/ivpu/ivpu_job.c                      |  15 +-
>   drivers/accel/ivpu/ivpu_job.h                      |   2 +-
>   drivers/accel/ivpu/ivpu_mmu.c                      | 109 +++++++--
>   drivers/accel/ivpu/ivpu_mmu.h                      |   2 +
>   drivers/accel/ivpu/ivpu_mmu_context.c              |  13 --
>   drivers/accel/ivpu/ivpu_mmu_context.h              |   2 -
>   drivers/accel/ivpu/ivpu_pm.c                       |   3 +-
>   drivers/accel/ivpu/ivpu_pm.h                       |   2 +-
>   drivers/acpi/pptt.c                                |  11 +-
>   drivers/block/ublk_drv.c                           |   2 +-
>   drivers/char/tpm/tpm2-sessions.c                   |  20 +-
>   drivers/char/tpm/tpm_tis_core.h                    |   2 +-
>   drivers/dma-buf/dma-resv.c                         |   5 +-
>   drivers/dma/dmatest.c                              |   6 +-
>   drivers/dma/idxd/init.c                            | 159 +++++++++----
>   drivers/dma/ti/k3-udma.c                           |  10 +-
>   drivers/gpio/gpio-pca953x.c                        |   6 +
>   drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c            |   2 +-
>   drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c             |  12 +
>   drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c            |   8 +
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |   3 +-
>   .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c    |  16 +-
>   .../drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c  |   5 +-
>   .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c  |   6 +-
>   drivers/gpu/drm/meson/meson_encoder_hdmi.c         |   4 +-
>   drivers/gpu/drm/tiny/panel-mipi-dbi.c              |   5 +-
>   drivers/gpu/drm/xe/instructions/xe_mi_commands.h   |   4 +
>   drivers/gpu/drm/xe/xe_gsc.c                        |  22 ++
>   drivers/gpu/drm/xe/xe_gsc.h                        |   1 +
>   drivers/gpu/drm/xe/xe_gsc_proxy.c                  |  11 +
>   drivers/gpu/drm/xe/xe_gsc_proxy.h                  |   1 +
>   drivers/gpu/drm/xe/xe_gt.c                         |   2 +-
>   drivers/gpu/drm/xe/xe_lrc.c                        |   2 +-
>   drivers/gpu/drm/xe/xe_ring_ops.c                   |   7 +-
>   drivers/gpu/drm/xe/xe_uc.c                         |   8 +-
>   drivers/gpu/drm/xe/xe_uc.h                         |   1 +
>   drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c      |   7 +-
>   drivers/hid/bpf/hid_bpf_dispatch.c                 |   9 +
>   drivers/hid/hid-thrustmaster.c                     |   1 +
>   drivers/hid/hid-uclogic-core.c                     |   7 +-
>   drivers/hv/channel.c                               |  65 +-----
>   drivers/i2c/busses/i2c-designware-pcidrv.c         |   4 +-
>   drivers/iio/adc/ad7606.c                           | 154 +++++++++++--
>   drivers/iio/adc/ad7606.h                           |  37 ++-
>   drivers/iio/adc/ad7606_spi.c                       | 137 +----------
>   drivers/infiniband/core/device.c                   |   6 +-
>   drivers/infiniband/sw/rxe/rxe_cq.c                 |   5 +-
>   drivers/net/dsa/b53/b53_common.c                   |  33 +++
>   drivers/net/dsa/b53/b53_regs.h                     |  14 ++
>   drivers/net/dsa/microchip/ksz_common.c             | 137 ++++++++---
>   drivers/net/dsa/sja1105/sja1105_main.c             |   6 +-
>   drivers/net/ethernet/cadence/macb_main.c           |  19 +-
>   drivers/net/ethernet/engleder/tsnep_main.c         |  30 ++-
>   drivers/net/ethernet/marvell/octeontx2/af/cgx.c    |   5 +
>   .../ethernet/marvell/octeontx2/nic/cn10k_macsec.c  |   3 +-
>   .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   1 +
>   .../ethernet/marvell/octeontx2/nic/otx2_devlink.c  |   1 +
>   .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c  |  10 +-
>   .../ethernet/marvell/octeontx2/nic/otx2_flows.c    |   3 +-
>   drivers/net/ethernet/mediatek/mtk_eth_soc.c        |   2 +-
>   drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |   4 +
>   .../net/ethernet/mellanox/mlxsw/spectrum_router.c  |   3 +
>   drivers/net/ethernet/qlogic/qede/qede_main.c       |   2 +-
>   .../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c   |   7 +-
>   drivers/net/hyperv/hyperv_net.h                    |  13 +-
>   drivers/net/hyperv/netvsc.c                        |  57 ++++-
>   drivers/net/hyperv/netvsc_drv.c                    |  62 ++---
>   drivers/net/hyperv/rndis_filter.c                  |  24 +-
>   drivers/net/phy/micrel.c                           |   7 -
>   drivers/net/wireless/mediatek/mt76/dma.c           |   1 +
>   drivers/net/wireless/mediatek/mt76/mt7925/mcu.c    |   4 +-
>   drivers/nvme/host/pci.c                            |   4 +-
>   drivers/phy/renesas/phy-rcar-gen3-usb2.c           |  38 ++-
>   drivers/phy/tegra/xusb-tegra186.c                  |  46 ++--
>   drivers/phy/tegra/xusb.c                           |   8 +-
>   drivers/platform/x86/amd/hsmp/Kconfig              |   2 +-
>   drivers/platform/x86/amd/hsmp/acpi.c               |  10 +-
>   drivers/platform/x86/amd/hsmp/hsmp.c               |   1 -
>   drivers/platform/x86/amd/hsmp/hsmp.h               |   4 +-
>   drivers/platform/x86/amd/hsmp/plat.c               |  42 ++--
>   drivers/platform/x86/amd/pmc/pmc-quirks.c          |   7 +
>   drivers/platform/x86/amd/pmf/tee-if.c              |  23 +-
>   drivers/platform/x86/asus-wmi.c                    |   3 +-
>   drivers/regulator/max20086-regulator.c             |   7 +-
>   drivers/scsi/sd_zbc.c                              |   6 +-
>   drivers/scsi/storvsc_drv.c                         |   1 +
>   drivers/spi/spi-loopback-test.c                    |   2 +-
>   drivers/spi/spi-tegra114.c                         |   6 +-
>   drivers/usb/gadget/function/f_midi2.c              |   2 +-
>   fs/binfmt_elf.c                                    |  71 ++++--
>   fs/btrfs/discard.c                                 |  17 +-
>   fs/btrfs/fs.h                                      |   1 +
>   fs/btrfs/inode.c                                   |   7 +
>   fs/btrfs/super.c                                   |   4 +
>   fs/eventpoll.c                                     |   7 +-
>   fs/nfs/localio.c                                   |   2 +-
>   fs/nfs/nfs4proc.c                                  |   9 +-
>   fs/nfs/pnfs.c                                      |   9 +
>   fs/smb/client/smb2pdu.c                            |   2 +-
>   fs/udf/truncate.c                                  |   2 +-
>   fs/xattr.c                                         |  24 ++
>   include/linux/bio.h                                |   1 +
>   include/linux/hyperv.h                             |   7 -
>   include/linux/micrel_phy.h                         |   1 -
>   include/linux/tpm.h                                |  21 +-
>   include/net/sch_generic.h                          |  15 ++
>   include/sound/ump_msg.h                            |   4 +-
>   io_uring/fdinfo.c                                  |  48 ++--
>   io_uring/memmap.c                                  |   2 +-
>   io_uring/uring_cmd.c                               |   5 +
>   kernel/cgroup/cpuset.c                             |   6 +-
>   kernel/sched/ext.c                                 |   6 +
>   kernel/trace/fprobe.c                              |   3 +-
>   kernel/trace/ring_buffer.c                         |   8 +-
>   kernel/trace/trace_dynevent.c                      |  16 +-
>   kernel/trace/trace_dynevent.h                      |   1 +
>   kernel/trace/trace_events_trigger.c                |   2 +-
>   kernel/trace/trace_functions.c                     |   6 +-
>   kernel/trace/trace_kprobe.c                        |   2 +-
>   kernel/trace/trace_probe.c                         |   9 +
>   kernel/trace/trace_uprobe.c                        |   2 +-
>   mm/hugetlb.c                                       |  28 ++-
>   mm/page_alloc.c                                    |  23 --
>   mm/userfaultfd.c                                   |  12 +-
>   net/bluetooth/mgmt.c                               |   9 +-
>   net/mac80211/main.c                                |   6 +-
>   net/mctp/device.c                                  |  15 +-
>   net/mctp/route.c                                   |   4 +-
>   net/sched/sch_codel.c                              |   2 +-
>   net/sched/sch_fq.c                                 |   2 +-
>   net/sched/sch_fq_codel.c                           |   2 +-
>   net/sched/sch_fq_pie.c                             |   2 +-
>   net/sched/sch_hhf.c                                |   2 +-
>   net/sched/sch_pie.c                                |   2 +-
>   net/tls/tls_strp.c                                 |   3 +-
>   samples/ftrace/sample-trace-array.c                |   2 +-
>   scripts/Makefile.extrawarn                         |  12 +
>   sound/core/seq/seq_clientmgr.c                     |  52 +++--
>   sound/core/seq/seq_ump_convert.c                   |  18 ++
>   sound/core/seq/seq_ump_convert.h                   |   1 +
>   sound/pci/es1968.c                                 |   6 +-
>   sound/sh/Kconfig                                   |   2 +-
>   sound/usb/quirks.c                                 |   4 +
>   tools/net/ynl/pyynl/ethtool.py                     |  22 +-
>   tools/perf/arch/loongarch/include/syscall_table.h  |   2 +-
>   tools/testing/selftests/drivers/net/hw/ncdevmem.c  |  55 ++---
>   tools/testing/vsock/vsock_test.c                   |  28 ++-
>   177 files changed, 1689 insertions(+), 1027 deletions(-)
>
>

^ permalink raw reply	[flat|nested] 165+ messages in thread

end of thread, other threads:[~2025-05-22  5:00 UTC | newest]

Thread overview: 165+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-20 13:49 [PATCH 6.14 000/145] 6.14.8-rc1 review Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 001/145] arm64: dts: rockchip: Assign RT5616 MCLK rate on rk3588-friendlyelec-cm3588 Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 002/145] fs/xattr.c: fix simple_xattr_list to always include security.* xattrs Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 003/145] drivers/platform/x86/amd: pmf: Check for invalid sideloaded Smart PC Policies Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 004/145] drivers/platform/x86/amd: pmf: Check for invalid " Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 005/145] x86/amd_node, platform/x86/amd/hsmp: Have HSMP use SMN through AMD_NODE Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 006/145] platform/x86/amd/hsmp: Make amd_hsmp and hsmp_acpi as mutually exclusive drivers Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 007/145] arm64: dts: rockchip: fix Sige5 RTC interrupt pin Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 008/145] riscv: dts: sophgo: fix DMA data-width configuration for CV18xx Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 009/145] binfmt_elf: Move brk for static PIE even if ASLR disabled Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 010/145] platform/x86/amd/pmc: Declare quirk_spurious_8042 for MECHREVO Wujie 14XA (GX4HRXL) Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 011/145] platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 012/145] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 013/145] cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 014/145] tracing: fprobe: Fix RCU warning message in list traversal Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 015/145] tracing: probes: Fix a possible race in trace_probe_log APIs Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 016/145] tpm: tis: Double the timeout B to 4s Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 017/145] iio: adc: ad7606: move the software mode configuration Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 018/145] iio: adc: ad7606: move software functions into common file Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 019/145] iio: adc: ad7606: check for NULL before calling sw_mode_config() Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 020/145] RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 021/145] HID: thrustmaster: fix memory leak in thrustmaster_interrupts() Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 022/145] HID: uclogic: Add NULL check in uclogic_input_configured() Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 023/145] nfs: handle failure of nfs_get_lock_context in unlock path Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 024/145] NFS/localio: Fix a race in nfs_local_open_fh() Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 025/145] spi: loopback-test: Do not split 1024-byte hexdumps Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 026/145] RDMA/core: Fix "KASAN: slab-use-after-free Read in ib_register_device" problem Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 027/145] Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 028/145] net_sched: Flush gso_skb list too during ->change() Greg Kroah-Hartman
2025-05-20 13:49 ` [PATCH 6.14 029/145] drm/meson: Use 1000ULL when operating with mode->clock Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 030/145] tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 031/145] net: mctp: Dont access ifa_index when missing Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 032/145] tests/ncdevmem: Fix double-free of queue array Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 033/145] net: mctp: Ensure keys maintain only one ref to corresponding dev Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 034/145] ALSA: seq: Fix delivery of UMP events to group ports Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 035/145] ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 036/145] net: cadence: macb: Fix a possible deadlock in macb_halt_tx Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 037/145] net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 038/145] nvme-pci: make nvme_pci_npages_prp() __always_inline Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 039/145] nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 040/145] ALSA: sh: SND_AICA should depend on SH_DMA_API Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 041/145] net: dsa: b53: prevent standalone from trying to forward to other ports Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 042/145] drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 043/145] vsock/test: Fix occasional failure in SIOCOUTQ tests Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 044/145] net/mlx5e: Disable MACsec offload for uplink representor profile Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 045/145] qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd() Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 046/145] regulator: max20086: fix invalid memory access Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 047/145] octeontx2-pf: Fix ethtool support for SDP representors Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 048/145] io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo() Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 049/145] drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 050/145] netlink: specs: tc: fix a couple of attribute names Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 051/145] netlink: specs: tc: all actions are indexed arrays Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 052/145] octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 053/145] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 054/145] octeontx2-af: Fix CGX Receive counters Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 055/145] octeontx2-pf: Do not reallocate all ntuple filters Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 056/145] wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 057/145] mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 058/145] net/tls: fix kernel panic when alloc_page failed Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 059/145] tsnep: fix timestamping with a stacked DSA driver Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 060/145] ublk: fix dead loop when canceling io command Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 061/145] NFSv4/pnfs: Reset the layout state after a layoutreturn Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 062/145] dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted" Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 063/145] Revert "kbuild, rust: use -fremap-path-prefix to make paths relative" Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 064/145] sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 065/145] udf: Make sure i_lenExtents is uptodate on inode eviction Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 066/145] fs/eventpoll: fix endless busy loop after timeout has expired Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 067/145] HID: bpf: abort dispatch if device destroyed Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 068/145] HID: amd_sfh: Fix SRA sensor when its the only sensor Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 069/145] LoongArch: Prevent cond_resched() occurring within kernel-fpu Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 070/145] LoongArch: Move __arch_cpu_idle() to .cpuidle.text section Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 071/145] LoongArch: Save and restore CSR.CNTC for hibernation Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 072/145] LoongArch: Fix MAX_REG_OFFSET calculation Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 073/145] LoongArch: uprobes: Remove user_{en,dis}able_single_step() Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 074/145] LoongArch: uprobes: Remove redundant code about resume_era Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 075/145] btrfs: fix discard worker infinite loop after disabling discard Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 076/145] btrfs: fix folio leak in submit_one_async_extent() Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 077/145] btrfs: add back warning for mount option commit values exceeding 300 Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 078/145] Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor" Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 079/145] drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc() Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 080/145] drm/amdgpu: read back register after written for VCN v4.0.5 Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 081/145] drm/amdgpu: fix incorrect MALL size for GFX1151 Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 082/145] drm/amdgpu: csa unmap use uninterruptible lock Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 083/145] drm/amd/display: Correct the reply value when AUX write incomplete Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 084/145] drm/amd/display: Avoid flooding unnecessary info messages Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 085/145] MAINTAINERS: Update Alexey Makhalovs email address Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 086/145] gpio: pca953x: fix IRQ storm on system wake up Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 087/145] ACPI: PPTT: Fix processor subtable walk Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 088/145] ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2() Greg Kroah-Hartman
2025-05-20 13:50 ` [PATCH 6.14 089/145] ALSA: usb-audio: Add sample rate quirk for Audioengine D1 Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 090/145] ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 091/145] dma-buf: insert memory barrier before updating num_fences Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 092/145] arm64: dts: amlogic: dreambox: fix missing clkc_audio node Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 093/145] arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 094/145] arm64: dts: rockchip: Remove overdrive-mode OPPs from RK3588J SoC dtsi Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 095/145] hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 096/145] hv_netvsc: Preserve contiguous PFN grouping in the page buffer array Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 097/145] hv_netvsc: Remove rmsg_pgcnt Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 098/145] Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 099/145] Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer() Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 100/145] kbuild: Disable -Wdefault-const-init-unsafe Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 101/145] i2c: designware: Fix an error handling path in i2c_dw_pci_probe() Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 102/145] ftrace: Fix preemption accounting for stacktrace trigger command Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 103/145] ftrace: Fix preemption accounting for stacktrace filter command Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 104/145] x86/sev: Do not touch VMSA pages during SNP guest memory kdump Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 105/145] x86/sev: Make sure pages are not skipped during kdump Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 106/145] tracing: samples: Initialize trace_array_printk() with the correct function Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 107/145] phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 108/145] phy: Fix error handling in tegra_xusb_port_init Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 109/145] net: dsa: microchip: let phylink manage PHY EEE configuration on KSZ switches Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 110/145] net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 111/145] phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 112/145] phy: renesas: rcar-gen3-usb2: Set timing registers only once Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 113/145] scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 114/145] smb: client: fix memory leak during error handling for POSIX mkdir Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 115/145] spi: tegra114: Use value to check for invalid delays Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 116/145] tpm: Mask TPM RC in tpm2_start_auth_session() Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 117/145] wifi: mt76: disable napi on driver removal Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 118/145] wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 119/145] ring-buffer: Fix persistent buffer when commit page is the reader page Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 120/145] net: qede: Initialize qede_ll_ops with designated initializer Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 121/145] io_uring/memmap: dont use page_address() on a highmem page Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 122/145] io_uring/uring_cmd: fix hybrid polling initialization issue Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 123/145] mm: hugetlb: fix incorrect fallback for subpool Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 124/145] mm: userfaultfd: correct dirty flags set for both present and swap pte Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 125/145] dmaengine: ti: k3-udma: Add missing locking Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 126/145] dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 127/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 128/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 129/145] dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 130/145] dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 131/145] dmaengine: idxd: Add missing cleanups in cleanup internals Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 132/145] dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 133/145] dmaengine: idxd: fix memory leak in error handling path of idxd_alloc Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 134/145] dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 135/145] dmaengine: idxd: Refactor remove call with idxd_cleanup() helper Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 136/145] accel/ivpu: Use workqueue for IRQ handling Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 137/145] accel/ivpu: Dump only first MMU fault from single context Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 138/145] accel/ivpu: Move parts of MMU event IRQ handling to thread handler Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 139/145] accel/ivpu: Fix missing MMU events from reserved SSID Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 140/145] accel/ivpu: Fix missing MMU events if file_priv is unbound Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 141/145] accel/ivpu: Flush pending jobs of devices workqueues Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 142/145] drm/xe/gsc: do not flush the GSC worker from the reset path Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 143/145] mm/page_alloc: fix race condition in unaccepted memory handling Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 144/145] perf tools: Fix build error for LoongArch Greg Kroah-Hartman
2025-05-20 13:51 ` [PATCH 6.14 145/145] phy: tegra: xusb: remove a stray unlock Greg Kroah-Hartman
2025-05-20 14:57 ` [PATCH 6.14 000/145] 6.14.8-rc1 review Ronald Warsow
2025-05-20 16:46   ` Luna Jernberg
2025-05-20 18:57 ` Florian Fainelli
2025-05-20 19:26 ` Miguel Ojeda
2025-05-20 21:12 ` Shuah Khan
2025-05-20 21:34 ` Eric Naim
2025-05-21  2:42   ` Mario Limonciello
2025-05-21  5:35     ` Greg Kroah-Hartman
2025-05-21 14:13       ` Eric Naim
2025-05-21 16:25         ` Greg Kroah-Hartman
2025-05-21 16:59           ` Eric Naim
2025-05-21 17:10             ` Greg Kroah-Hartman
2025-05-21  1:25 ` Ron Economos
2025-05-21  8:06 ` Takeshi Ogasawara
2025-05-21  8:31 ` Jon Hunter
2025-05-21  9:24 ` Naresh Kamboju
2025-05-21 18:00 ` Peter Schneider
2025-05-21 18:16 ` Mark Brown
2025-05-22  5:00 ` Hardik Garg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).