* [PATCH 7.0 000/201] 7.0.9-rc1 review
@ 2026-05-15 15:46 Greg Kroah-Hartman
2026-05-15 15:46 ` [PATCH 7.0 001/201] HID: playstation: Clamp num_touch_reports Greg Kroah-Hartman
` (206 more replies)
0 siblings, 207 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:46 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, rwarsow, conor, hargar, broonie, achill, sr
This is the start of the stable review cycle for the 7.0.9 release.
There are 201 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 Sun, 17 May 2026 15:46: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/v7.x/stable-review/patch-7.0.9-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-7.0.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 7.0.9-rc1
Benjamin Cheng <benjamin.cheng@amd.com>
drm/amdgpu/vcn4: Avoid overflow on msg bound check
Benjamin Cheng <benjamin.cheng@amd.com>
drm/amdgpu/vcn3: Avoid overflow on msg bound check
Dudu Lu <phx0fer@gmail.com>
vsock/virtio: fix accept queue count leak on transport mismatch
Eric Dumazet <edumazet@google.com>
vsock/virtio: fix potential unbounded skb queue
Stefano Garzarella <sgarzare@redhat.com>
vsock/virtio: fix empty payload in tap skb for non-linear buffers
Stefano Garzarella <sgarzare@redhat.com>
vsock/virtio: fix length and offset in tap skb for split packets
Norbert Szetei <norbert@doyensec.com>
vsock: fix buffer size clamping order
Lorenzo Stoakes <ljs@kernel.org>
mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap()
Markus Mayer <mmayer@broadcom.com>
perf build: fix "argument list too long" in second location
Tejun Heo <tj@kernel.org>
sched_ext: Skip tasks with stale task_rq in bypass_lb_cpu()
Tejun Heo <tj@kernel.org>
cgroup: Defer css percpu_ref kill on rmdir until cgroup is depopulated
Petr Malat <oss@malat.biz>
cgroup: Increment nr_dying_subsys_* from rmdir context
Johan Hovold <johan@kernel.org>
spi: uniphier: fix controller deregistration
Pei Xiao <xiaopei01@kylinos.cn>
spi: uniphier: Simplify clock handling with devm_clk_get_enabled()
Prasanna Kumar T S M <ptsm@linux.microsoft.com>
EDAC/versalnet: Fix device name memory leak
Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
EDAC/versalnet: Refactor memory controller initialization and cleanup
Breno Leitao <leitao@debian.org>
kho: fix error handling in kho_add_subtree()
Pavel Begunkov <asml.silence@gmail.com>
io_uring/zcrx: warn on freelist violations
Pavel Begunkov <asml.silence@gmail.com>
io_uring/zcrx: use guards for locking
Amit Sunil Dhamne <amitsd@google.com>
usb: typec: tcpm: reset internal port states on soft reset AMS
Andrea Righi <arighi@nvidia.com>
sched_ext: Use HK_TYPE_DOMAIN_BOOT to detect isolcpus= domain isolation
Sven Eckelmann <sven@narfation.org>
batman-adv: bla: put backbone reference on failed claim hash insert
Sven Eckelmann <sven@narfation.org>
batman-adv: bla: only purge non-released claims
Sven Eckelmann <sven@narfation.org>
batman-adv: bla: prevent use-after-free when deleting claims
Sven Eckelmann <sven@narfation.org>
batman-adv: tp_meter: fix tp_num leak on kmalloc failure
Jiexun Wang <wangjiexun2025@gmail.com>
batman-adv: stop caching unowned originator pointers in BAT IV
Jiexun Wang <wangjiexun2025@gmail.com>
batman-adv: stop tp_meter sessions during mesh teardown
Jiexun Wang <wangjiexun2025@gmail.com>
batman-adv: reject new tp_meter sessions during teardown
Lyes Bourennani <lbourennani@fuzzinglabs.com>
batman-adv: fix integer overflow on buff_pos
Ben Morris <bmorris@anthropic.com>
sctp: revalidate list cursor after sctp_sendmsg_to_asoc() in SCTP_SENDALL
Franz Schnyder <franz.schnyder@toradex.com>
arm64: dts: ti: k3-am69-aquila-dev: Fix DP regulator enable GPIO
Siddharth Vadapalli <s-vadapalli@ti.com>
arm64: dts: ti: k3-am62a7-sk: Fix pin name in comment from M19 to N22
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
arm64: dts: qcom: lemans: Correct QUP interrupt numbers
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
arm64: dts: qcom: kodiak: Fix PCIe1 PHY ref clock voting
Alex Deucher <alexander.deucher@amd.com>
drm/amdgpu/pm: align Hawaii mclk workaround with radeon
Alex Deucher <alexander.deucher@amd.com>
drm/amdgpu/pm: add missing revision check for CI
John B. Moore <jbmoore61@gmail.com>
drm/amdgpu/sdma4: replace BUG_ON with WARN_ON in fence emission
Felix Kuehling <felix.kuehling@amd.com>
drm/amdkfd: Make all TLB-flushes heavy-weight
Icenowy Zheng <zhengxingda@iscas.ac.cn>
drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds
Osama Abdelkader <osama.abdelkader@gmail.com>
drm/sti: remove bridge when sti_hda component_add fails
Kory Maincent (TI) <kory.maincent@bootlin.com>
drm/bridge: tda998x: Use __be32 for audio port OF property pointer
John B. Moore <jbmoore61@gmail.com>
drm/amdgpu/gfx9: drop unnecessary 64-bit fence flag check in KIQ
Icenowy Zheng <zhengxingda@iscas.ac.cn>
drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds
Sunil Khatri <sunil.khatri@amd.com>
drm/amdgpu/userq: fix access to stale wptr mapping
Osama Abdelkader <osama.abdelkader@gmail.com>
drm/exynos: remove bridge when component_add fails
Philip Yang <Philip.Yang@amd.com>
drm/amdgpu: zero-initialize GART table on allocation
Alex Deucher <alexander.deucher@amd.com>
drm/radeon: add missing revision check for CI
Francis, David <David.Francis@amd.com>
drm: Set old handle to NULL before prime swap in change_handle
Jia Yao <jia.yao@intel.com>
drm/xe/uapi: Reject coh_none PAT index for CPU cached memory in madvise
Shuicheng Lin <shuicheng.lin@intel.com>
drm/xe/bo: Fix bo leak on unaligned size validation in xe_bo_init_locked()
Shuicheng Lin <shuicheng.lin@intel.com>
drm/xe: Fix dma-buf attachment leak in xe_gem_prime_import()
Shuicheng Lin <shuicheng.lin@intel.com>
drm/xe/bo: Fix bo leak on GGTT flag validation in xe_bo_init_locked()
Shuicheng Lin <shuicheng.lin@intel.com>
drm/xe: Fix bo leak in xe_dma_buf_init_obj() on allocation failure
Shixiong Ou <oushixiong@kylinos.cn>
drm/udl: Increase GET_URB_TIMEOUT
Shubhankar Milind Sardeshpande <Shubhankar.MilindSardeshpande@amd.com>
drm/amdgpu: Avoid reset in AMDGPU unload path for APUs with GFX V11 and higher.
Alysa Liu <Alysa.Liu@amd.com>
drm/amdkfd: validate SVM ioctl nattr against buffer size
Sasha Finkelstein <k@chaosmail.tech>
drm/appletbdrm: Use kvzalloc for big allocations
Ashutosh Desai <ashutoshdesai993@gmail.com>
drm/gem: Fix inconsistent plane dimension calculation in drm_gem_fb_init_with_funcs()
Mario Kleiner <mario.kleiner.de@gmail.com>
drm/amd/display: Change dither policy for 10 bpc output back to dithering
Benjamin Cheng <benjamin.cheng@amd.com>
drm/amdgpu/vcn3: Prevent OOB reads when parsing dec msg
Benjamin Cheng <benjamin.cheng@amd.com>
drm/amdgpu/vcn4: Prevent OOB reads when parsing dec msg
Benjamin Cheng <benjamin.cheng@amd.com>
drm/amdgpu/vce: Prevent partial address patches
Benjamin Cheng <benjamin.cheng@amd.com>
drm/amdgpu/vcn4: Prevent OOB reads when parsing IB
Benjamin Cheng <benjamin.cheng@amd.com>
drm/amdgpu: Add bounds checking to ib_{get,set}_value
Alysa Liu <Alysa.Liu@amd.com>
drm/amdkfd: Add upper bound check for num_of_nodes
Yang Wang <kevinyang.wang@amd.com>
drm/amd/pm: fix incorrect FeatureCtrlMask setting on smu v14.0.x
Chenglei Xie <Chenglei.Xie@amd.com>
drm/amdgpu: gate VM CPU HDP flush on reset lock
Ramalingeswara Reddy, Kanala <Kanala.RamalingeswaraReddy@amd.com>
drm/amdgpu: Use SMUIO 15.0.0 offsets for TSC upper and lower count.
Ramalingeswara Reddy, Kanala <Kanala.RamalingeswaraReddy@amd.com>
drm/amdgpu: Use NBIF offset for register RCC_STRAP0_RCC_DEV0_EPF0_STRAP0 .
Mario Limonciello <mario.limonciello@amd.com>
drm/amd: Add missing firmware declaration for PSP v15.0.0
Wenjing Liu <wenjing.liu@amd.com>
drm/amd/display: fix math_mod() using arg1 instead of arg2
Amir Shetaia <Amir.Shetaia@amd.com>
drm/amdkfd: Clear VRAM on allocation to prevent stale data exposure
Jouni Högander <jouni.hogander@intel.com>
drm/i915/psr: Init variable to avoid early exit from et alignment loop
Ashutosh Desai <ashutoshdesai993@gmail.com>
drm/v3d: Reject empty multisync extension to prevent infinite loop
Anna Maniscalco <anna.maniscalco2000@gmail.com>
drm/msm: always recover the gpu
Marek Vasut <marex@nabladev.com>
drm/imx: parallel-display: Prefer bus format set via legacy "interface-pix-fmt" DT property
Harry Wentland <harry.wentland@amd.com>
drm/colorop: Fix blob property reference tracking in state lifecycle
Yasuaki Torimaru <yasuakitorimaru@gmail.com>
drm/msm/gem: fix error handling in msm_ioctl_gem_info_get_metadata()
Johan Hovold <johan@kernel.org>
spi: cadence-quadspi: fix unclocked access on unbind
Johan Hovold <johan@kernel.org>
spi: cadence-quadspi: fix runtime pm and clock imbalance on unbind
Johan Hovold <johan@kernel.org>
spi: cadence-quadspi: fix clock imbalance on probe failure
Johan Hovold <johan@kernel.org>
spi: cadence-quadspi: fix runtime pm disable imbalance on probe failure
Johan Hovold <johan@kernel.org>
spi: cadence: fix clock imbalance on probe failure
Johan Hovold <johan@kernel.org>
spi: cadence: fix unclocked access on unbind
Johan Hovold <johan@kernel.org>
spi: cadence-quadspi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: cadence: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: mpc52xx: fix use-after-free on unbind
Johan Hovold <johan@kernel.org>
spi: mpc52xx: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: mpc52xx: fix use-after-free on registration failure
Johan Hovold <johan@kernel.org>
spi: orion: fix clock imbalance on registration failure
Johan Hovold <johan@kernel.org>
spi: orion: fix runtime pm leak on unbind
Johan Hovold <johan@kernel.org>
spi: orion: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: mxic: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: imx: fix runtime pm leak on probe deferral
Johan Hovold <johan@kernel.org>
spi: octeon: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: mpfs: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: img-spfi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: slave-mt27xx: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: sh-msiof: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: rspi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: sprd: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: pic32-sqi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: cavium-thunderx: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: npcm-pspi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: coldfire-qspi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: bcmbca-hsspi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: fsl: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: sh-hspi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: ch341: fix devres lifetime
Johan Hovold <johan@kernel.org>
spi: pl022: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: mtk-nor: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: ep93xx: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: pic32: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: omap2-mcspi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: fsl-espi: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: s3c64xx: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: dln2: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: mt65xx: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: mxs: fix controller deregistration
Gustavo Sousa <gustavo.sousa@intel.com>
drm/xe/hdcp: Add NULL check for media_gt in intel_hdcp_gsc_check_status()
Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
media: qcom: camss: Add missing clocks for VFE lite on sa8775p
Vikash Garodia <vikash.garodia@oss.qualcomm.com>
media: iris: switch to hardware mode after firmware boot
Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
media: iris: fix use-after-free of fmt_src during MBPF check
Thomas Fourier <fourier.thomas@gmail.com>
media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init()
Arnd Bergmann <arnd@arndb.de>
media: venus: fix QCOM_MDT_LOADER dependency
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
media: qcom: iris: increase H265D_MAX_SLICE to fix H.265 decoding on SC7280
Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
media: qcom: camss: Fix csid IRQ offset for sa8775p
Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
media: qcom: camss: Fix csid clock configuration for sa8775p
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
media: iris: Fix use-after-free in iris_release_internal_buffers()
Arnd Bergmann <arnd@arndb.de>
media: iris: fix QCOM_MDT_LOADER dependency
Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
media: omap3isp: drop the use count of v4l2 pipeline
Matthias Fend <matthias.fend@emfend.at>
media: i2c: ov08d10: fix runtime PM handling in probe
Matthias Fend <matthias.fend@emfend.at>
media: i2c: ov08d10: fix image vertical start setting
Michael Tretter <m.tretter@pengutronix.de>
media: staging: imx: request mbus_config in csi_start
Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
media: i2c: imx412: Assert reset GPIO during probe
Sergey Shtylyov <s.shtylyov@auroraos.dev>
media: dib8000: avoid division by 0 in dib8000_set_dds()
Abdun Nihaal <nihaal@cse.iitm.ac.in>
media: pci: zoran: fix potential memory leak in zoran_probe()
Gregor Herburger <gregor.herburger@linutronix.de>
arm64: dts: broadcom: bcm2712-d-rpi-5-b: update uart10 interrupt
Gregor Herburger <gregor.herburger@linutronix.de>
arm64: dts: broadcom: bcm2712-d-rpi-5-b: add fixes for pinctrl/pinctrl_aon
Luigi Leonardi <leonardi@redhat.com>
vsock/virtio: fix MSG_PEEK ignoring skb offset when calculating bytes to copy
Krishna Chomal <krishna.chomal108@gmail.com>
platform/x86: hp-wmi: Ignore backlight and FnLock events
Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
drm/atomic: Add affected colorops with affected planes
Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
drm/colorop: Preserve bypass value in duplicate_state()
Johan Hovold <johan@kernel.org>
spi: aspeed-smc: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: amlogic-spisg: fix controller deregistration
Wang Jun <1742789905@qq.com>
media: saa7164: add ioremap return checks and cleanups
Hans de Goede <johannes.goede@oss.qualcomm.com>
media: ipu-bridge: Add upside-down sensor DMI quirk for Dell XPS 13 9340 and XPS 14 9440
Johan Hovold <johan@kernel.org>
spi: at91-usart: fix controller deregistration
Franz Schnyder <franz.schnyder@toradex.com>
arm64: dts: ti: k3-am69-aquila-clover: Fix DP regulator enable GPIO
Johan Hovold <johan@kernel.org>
spi: qup: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: meson-spicc: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: lantiq-ssc: fix controller deregistration
Johan Hovold <johan@kernel.org>
regulator: bd9571mwv: fix OF node reference imbalance
Johan Hovold <johan@kernel.org>
regulator: s2dos05: fix OF node reference imbalance
Johan Hovold <johan@kernel.org>
regulator: act8945a: fix OF node reference imbalance
Jai Luthra <jai.luthra@ideasonboard.com>
media: i2c: imx283: Fix hang when going from large to small resolution
Ethan Tidmore <ethantidmore06@gmail.com>
media: intel/ipu6: fix error pointer dereference
Jacopo Mondi <jacopo.mondi@ideasonboard.com>
media: mali-c55: Fully reset the ISP configuration
Dang Huynh <dang.huynh@mainlining.org>
media: rockchip: rkcif: Add missing MUST_CONNECT flag to pads
Janne Grunau <j@jannau.net>
media: videobuf2: Set vma_flags in vb2_dma_sg_mmap
Johan Hovold <johan@kernel.org>
regulator: rk808: fix OF node reference imbalance
Johan Hovold <johan@kernel.org>
regulator: bq257xx: fix OF node reference imbalance
Jai Luthra <jai.luthra@ideasonboard.com>
media: i2c: imx283: Enter full standby when stopping streaming
Xiaolei Wang <xiaolei.wang@windriver.com>
media: i2c: ov5647: Fix runtime PM refcount leak in s_ctrl
Oliver Neukum <oneukum@suse.com>
media: rc: streamzap: Error handling in probe
Oliver Neukum <oneukum@suse.com>
media: rc: xbox_remote: heed DMA restrictions
Felix Gu <ustc.gu@gmail.com>
media: ti: vpe: Add missing v4l2_device_unregister in vip_remove()
Johan Hovold <johan@kernel.org>
regulator: max77650: fix OF node reference imbalance
Johan Hovold <johan@kernel.org>
spi: st-ssc4: fix controller deregistration
Johan Hovold <johan@kernel.org>
regulator: mt6357: fix OF node reference imbalance
Sakari Ailus <sakari.ailus@linux.intel.com>
staging: media: atomisp: Disallow all private IOCTLs
Josua Mayer <josua@solid-run.com>
arm64: dts: lx2160a-cex7/lx2162a-sr-som: fix usd-cd & gpio pinmux
Johan Hovold <johan@kernel.org>
spi: atmel: fix controller deregistration
Johan Hovold <johan@kernel.org>
spi: bcm63xx: fix controller deregistration
Matthew Brost <matthew.brost@intel.com>
drm/gpusvm: Force unmapping on error in drm_gpusvm_get_pages
Matthew Brost <matthew.brost@intel.com>
drm/gpusvm: Allow device pages to be mapped in mixed mappings after system pages
Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
arm64: dts: freescale: imx95-toradex-smarc: fix PMIC_SD2_VSEL label position
Ziyi Guo <n7l8m4@u.northwestern.edu>
media: chips-media: wave5: add missing spinlock protection for handle_dynamic_resolution_change()
Ziyi Guo <n7l8m4@u.northwestern.edu>
media: chips-media: wave5: add missing spinlock protection for send_eos_event()
Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init()
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
media: dt-bindings: rockchip,vdec: Mark reg-names required for RK35{76,88}
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
media: dt-bindings: rockchip,vdec: Add alternative reg-names order for RK35{76,88}
Alexander Koskovich <akoskovich@pm.me>
media: i2c: ov8856: free control handler on error in ov8856_init_controls()
Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
media: renesas: vin: Fix RAW8 (again)
Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
media: renesas: vsp1: Fix NULL pointer deref on module unload
Jacopo Mondi <jacopo.mondi@ideasonboard.com>
media: mali-c55: Fix wrong comment of ISP block types
Daniel Scally <dan.scally@ideasonboard.com>
media: mali-c55: Fix Iridix bypass macros
Jacopo Mondi <jacopo.mondi@ideasonboard.com>
media: mali-c55: Initialize the ISP in enable_streams()
Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
media: rzv2h-ivc: Fix concurrent buffer list access
Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
media: rzv2h-ivc: Fix FM_STOP register write
Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
media: rzv2h-ivc: Write AXIRX_PIXFMT once
Guoniu Zhou <guoniu.zhou@nxp.com>
media: nxp: imx8-isi: Reduce minimum queued buffers from 2 to 0
Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
media: rzv2h-ivc: Avoid double job scheduling
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
drm/msm/hdmi: Fix wrong CTRL1 register used in writing info frames
Ricardo Ribalda <ribalda@chromium.org>
media: uvcvideo: Enable VB2_DMABUF for metadata stream
Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
HID: pidff: Fix integer overflow in pidff_rescale
Benjamin Tissoires <bentiss@kernel.org>
HID: core: introduce hid_safe_input_report()
Benjamin Tissoires <bentiss@kernel.org>
HID: pass the buffer size to hid_report_raw_event
Sangyun Kim <sangyun.kim@snu.ac.kr>
HID: appletb-kbd: run inactivity autodim from workqueues
Sangyun Kim <sangyun.kim@snu.ac.kr>
HID: appletb-kbd: fix UAF in inactivity-timer cleanup path
T.J. Mercier <tjmercier@google.com>
HID: playstation: Clamp num_touch_reports
-------------
Diffstat:
.../devicetree/bindings/media/rockchip,vdec.yaml | 22 +-
Makefile | 4 +-
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 14 ++
.../arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi | 7 +
.../dts/freescale/fsl-lx2160a-clearfog-itx.dtsi | 2 +
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 24 ++
.../boot/dts/freescale/fsl-lx2162a-clearfog.dts | 2 +
.../boot/dts/freescale/fsl-lx2162a-sr-som.dtsi | 7 +
.../boot/dts/freescale/imx95-toradex-smarc.dtsi | 1 -
arch/arm64/boot/dts/qcom/kodiak.dtsi | 2 +-
arch/arm64/boot/dts/qcom/lemans.dtsi | 8 +-
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 2 +-
arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts | 2 +-
arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts | 2 +-
drivers/edac/versalnet_edac.c | 182 ++++++++-------
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 13 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 11 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 3 +
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 12 +-
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 31 ++-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 -
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 97 ++++----
drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c | 9 +-
drivers/gpu/drm/amd/amdgpu/psp_v15_0.c | 1 +
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 +-
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 25 ++-
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 46 ++--
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 33 ++-
.../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +-
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 10 +-
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 4 +-
drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 11 +
drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +-
.../src/dml2_standalone_libraries/lib_float_math.c | 2 +-
.../gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 13 +-
.../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 10 +-
drivers/gpu/drm/bridge/tda998x_drv.c | 2 +-
drivers/gpu/drm/drm_atomic.c | 7 +
drivers/gpu/drm/drm_colorop.c | 28 ++-
drivers/gpu/drm/drm_gem.c | 25 ++-
drivers/gpu/drm/drm_gem_framebuffer_helper.c | 4 +-
drivers/gpu/drm/drm_gpusvm.c | 3 +-
drivers/gpu/drm/exynos/exynos_drm_mic.c | 8 +-
drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
drivers/gpu/drm/imx/ipuv3/parallel-display.c | 15 +-
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 4 +-
drivers/gpu/drm/msm/msm_drv.c | 7 +-
drivers/gpu/drm/msm/msm_gpu.c | 42 ++--
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 2 +
drivers/gpu/drm/panel/panel-himax-hx83102.c | 2 +
drivers/gpu/drm/radeon/ci_dpm.c | 9 +-
drivers/gpu/drm/sti/sti_hda.c | 8 +-
drivers/gpu/drm/tiny/appletbdrm.c | 4 +-
drivers/gpu/drm/udl/udl_main.c | 3 +-
drivers/gpu/drm/udl/udl_modeset.c | 5 +-
drivers/gpu/drm/v3d/v3d_submit.c | 5 +
drivers/gpu/drm/xe/display/xe_hdcp_gsc.c | 12 +-
drivers/gpu/drm/xe/xe_bo.c | 8 +-
drivers/gpu/drm/xe/xe_dma_buf.c | 23 +-
drivers/gpu/drm/xe/xe_vm_madvise.c | 47 ++++
drivers/hid/bpf/hid_bpf_dispatch.c | 6 +-
drivers/hid/hid-appletb-kbd.c | 58 +++--
drivers/hid/hid-core.c | 67 ++++--
drivers/hid/hid-gfrm.c | 4 +-
drivers/hid/hid-logitech-hidpp.c | 2 +-
drivers/hid/hid-multitouch.c | 2 +-
drivers/hid/hid-playstation.c | 6 +-
drivers/hid/hid-primax.c | 2 +-
drivers/hid/hid-vivaldi-common.c | 2 +-
drivers/hid/i2c-hid/i2c-hid-core.c | 7 +-
drivers/hid/usbhid/hid-core.c | 11 +-
drivers/hid/usbhid/hid-pidff.c | 7 +-
drivers/hid/wacom_sys.c | 6 +-
drivers/media/common/videobuf2/videobuf2-dma-sg.c | 1 +
drivers/media/dvb-frontends/dib8000.c | 4 +-
drivers/media/i2c/imx283.c | 15 +-
drivers/media/i2c/imx412.c | 2 +-
drivers/media/i2c/ov08d10.c | 21 +-
drivers/media/i2c/ov5647.c | 12 +-
drivers/media/i2c/ov8856.c | 10 +-
drivers/media/pci/intel/ipu-bridge.c | 14 ++
drivers/media/pci/intel/ipu6/ipu6.c | 2 +-
drivers/media/pci/saa7164/saa7164-core.c | 47 +++-
drivers/media/pci/zoran/zoran_card.c | 2 +-
.../media/platform/arm/mali-c55/mali-c55-common.h | 2 +
.../media/platform/arm/mali-c55/mali-c55-core.c | 35 ---
drivers/media/platform/arm/mali-c55/mali-c55-isp.c | 37 +--
.../media/platform/arm/mali-c55/mali-c55-params.c | 128 ++++++++++-
.../platform/arm/mali-c55/mali-c55-registers.h | 4 +-
.../media/platform/chips-media/wave5/wave5-vdi.c | 1 +
.../platform/chips-media/wave5/wave5-vpu-dec.c | 14 +-
.../media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
.../media/platform/qcom/camss/camss-csid-gen3.c | 6 +-
drivers/media/platform/qcom/camss/camss.c | 80 +++----
drivers/media/platform/qcom/iris/Kconfig | 2 +-
drivers/media/platform/qcom/iris/iris_buffer.c | 8 +-
drivers/media/platform/qcom/iris/iris_core.c | 4 +
drivers/media/platform/qcom/iris/iris_hfi_common.c | 4 +
drivers/media/platform/qcom/iris/iris_hfi_queue.c | 2 +-
drivers/media/platform/qcom/iris/iris_vdec.c | 6 -
drivers/media/platform/qcom/iris/iris_vdec.h | 1 -
drivers/media/platform/qcom/iris/iris_venc.c | 6 -
drivers/media/platform/qcom/iris/iris_venc.h | 1 -
drivers/media/platform/qcom/iris/iris_vidc.c | 6 +-
drivers/media/platform/qcom/iris/iris_vpu2.c | 1 +
drivers/media/platform/qcom/iris/iris_vpu3x.c | 9 +-
drivers/media/platform/qcom/iris/iris_vpu4x.c | 24 +-
drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 2 +-
drivers/media/platform/qcom/iris/iris_vpu_common.c | 16 +-
drivers/media/platform/qcom/iris/iris_vpu_common.h | 3 +
drivers/media/platform/qcom/venus/Kconfig | 2 +-
drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 22 ++
.../media/platform/renesas/rcar-vin/rcar-v4l2.c | 12 +
.../platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c | 35 +--
.../media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h | 8 +-
drivers/media/platform/renesas/vsp1/vsp1_drv.c | 8 +-
.../platform/rockchip/rkcif/rkcif-interface.c | 3 +-
.../media/platform/rockchip/rkcif/rkcif-stream.c | 2 +-
drivers/media/platform/ti/omap3isp/ispvideo.c | 1 +
drivers/media/platform/ti/vpe/vip.c | 1 +
drivers/media/rc/streamzap.c | 12 +-
drivers/media/rc/xbox_remote.c | 9 +-
drivers/media/usb/uvc/uvc_queue.c | 3 +-
drivers/platform/x86/hp/hp-wmi.c | 5 +
drivers/regulator/act8945a-regulator.c | 3 +-
drivers/regulator/bd9571mwv-regulator.c | 3 +-
drivers/regulator/bq257xx-regulator.c | 3 +-
drivers/regulator/max77650-regulator.c | 2 +-
drivers/regulator/mt6357-regulator.c | 2 +-
drivers/regulator/rk808-regulator.c | 3 +-
drivers/regulator/s2dos05-regulator.c | 2 +-
drivers/spi/spi-amlogic-spisg.c | 4 +-
drivers/spi/spi-aspeed-smc.c | 9 +-
drivers/spi/spi-at91-usart.c | 8 +-
drivers/spi/spi-atmel.c | 8 +-
drivers/spi/spi-bcm63xx.c | 8 +-
drivers/spi/spi-bcmbca-hsspi.c | 4 +-
drivers/spi/spi-cadence-quadspi.c | 40 ++--
drivers/spi/spi-cadence.c | 21 +-
drivers/spi/spi-cavium-octeon.c | 8 +-
drivers/spi/spi-cavium-thunderx.c | 8 +-
drivers/spi/spi-ch341.c | 7 +-
drivers/spi/spi-coldfire-qspi.c | 10 +-
drivers/spi/spi-dln2.c | 8 +-
drivers/spi/spi-ep93xx.c | 8 +-
drivers/spi/spi-fsl-espi.c | 10 +-
drivers/spi/spi-fsl-spi.c | 14 +-
drivers/spi/spi-img-spfi.c | 8 +-
drivers/spi/spi-imx.c | 1 +
drivers/spi/spi-lantiq-ssc.c | 8 +-
drivers/spi/spi-meson-spicc.c | 8 +-
drivers/spi/spi-mpc52xx.c | 9 +-
drivers/spi/spi-mpfs.c | 4 +-
drivers/spi/spi-mt65xx.c | 4 +-
drivers/spi/spi-mtk-nor.c | 4 +-
drivers/spi/spi-mxic.c | 3 +-
drivers/spi/spi-mxs.c | 8 +-
drivers/spi/spi-npcm-pspi.c | 8 +-
drivers/spi/spi-omap2-mcspi.c | 8 +-
drivers/spi/spi-orion.c | 16 +-
drivers/spi/spi-pic32-sqi.c | 8 +-
drivers/spi/spi-pic32.c | 11 +-
drivers/spi/spi-pl022.c | 8 +-
drivers/spi/spi-qup.c | 8 +-
drivers/spi/spi-rspi.c | 10 +-
drivers/spi/spi-s3c64xx.c | 4 +-
drivers/spi/spi-sh-hspi.c | 10 +-
drivers/spi/spi-sh-msiof.c | 10 +-
drivers/spi/spi-slave-mt27xx.c | 10 +-
drivers/spi/spi-sprd.c | 8 +-
drivers/spi/spi-st-ssc4.c | 8 +-
drivers/spi/spi-uniphier.c | 24 +-
drivers/staging/greybus/hid.c | 2 +-
drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 4 +
drivers/staging/media/imx/imx-media-csi.c | 40 ++--
drivers/usb/typec/tcpm/tcpm.c | 2 +
include/linux/cgroup-defs.h | 4 +-
include/linux/hid.h | 6 +-
include/linux/hid_bpf.h | 14 +-
include/linux/mm.h | 2 +-
io_uring/zcrx.c | 17 +-
kernel/cgroup/cgroup.c | 248 ++++++++++-----------
kernel/liveupdate/kexec_handover.c | 13 +-
kernel/sched/ext.c | 12 +-
mm/util.c | 51 +++--
mm/vma.c | 3 +-
net/batman-adv/bat_iv_ogm.c | 85 ++++---
net/batman-adv/bridge_loop_avoidance.c | 11 +-
net/batman-adv/main.c | 1 +
net/batman-adv/tp_meter.c | 116 ++++++++--
net/batman-adv/tp_meter.h | 1 +
net/batman-adv/types.h | 4 +
net/sctp/socket.c | 9 +
net/vmw_vsock/af_vsock.c | 6 +-
net/vmw_vsock/virtio_transport_common.c | 57 ++---
tools/perf/pmu-events/Build | 4 +-
tools/testing/vma/include/dup.h | 41 ++--
tools/testing/vma/include/stubs.h | 3 +-
200 files changed, 1917 insertions(+), 988 deletions(-)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 001/201] HID: playstation: Clamp num_touch_reports
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
@ 2026-05-15 15:46 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 002/201] HID: appletb-kbd: fix UAF in inactivity-timer cleanup path Greg Kroah-Hartman
` (205 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:46 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Xingyu Jin, T.J. Mercier,
Jiri Kosina
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: T.J. Mercier <tjmercier@google.com>
commit cac61b58a3b6340c52afa06bb15eac033158db2f upstream.
A device would never lie about the number of touch reports would it?
If it does the loop in dualshock4_parse_report will read off the end of
the touch_reports array, up to about 2 KiB for the maximum number of 256
loop iteraions. The data that is read is emitted via evdev if the
DS4_TOUCH_POINT_INACTIVE bit happens to be set. Protect against this by
clamping the num_touch_reports value provided by the device to the
maximum size of the touch_reports array.
Fixes: 752038248808 ("HID: playstation: add DualShock4 touchpad support.")
Cc: stable@vger.kernel.org
Reported-by: Xingyu Jin <xingyuj@google.com>
Signed-off-by: T.J. Mercier <tjmercier@google.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/hid-playstation.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/hid/hid-playstation.c
+++ b/drivers/hid/hid-playstation.c
@@ -2378,7 +2378,8 @@ static int dualshock4_parse_report(struc
(struct dualshock4_input_report_usb *)data;
ds4_report = &usb->common;
- num_touch_reports = usb->num_touch_reports;
+ num_touch_reports = min_t(u8, usb->num_touch_reports,
+ ARRAY_SIZE(usb->touch_reports));
touch_reports = usb->touch_reports;
} else if (hdev->bus == BUS_BLUETOOTH && report->id == DS4_INPUT_REPORT_BT &&
size == DS4_INPUT_REPORT_BT_SIZE) {
@@ -2392,7 +2393,8 @@ static int dualshock4_parse_report(struc
}
ds4_report = &bt->common;
- num_touch_reports = bt->num_touch_reports;
+ num_touch_reports = min_t(u8, bt->num_touch_reports,
+ ARRAY_SIZE(bt->touch_reports));
touch_reports = bt->touch_reports;
} else if (hdev->bus == BUS_BLUETOOTH &&
report->id == DS4_INPUT_REPORT_BT_MINIMAL &&
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 002/201] HID: appletb-kbd: fix UAF in inactivity-timer cleanup path
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
2026-05-15 15:46 ` [PATCH 7.0 001/201] HID: playstation: Clamp num_touch_reports Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 003/201] HID: appletb-kbd: run inactivity autodim from workqueues Greg Kroah-Hartman
` (204 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Sangyun Kim, Jiri Kosina
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sangyun Kim <sangyun.kim@snu.ac.kr>
commit 4db2af929279c799b5653a39eb0795c72baffca4 upstream.
Commit 38224c472a03 ("HID: appletb-kbd: fix slab use-after-free bug in
appletb_kbd_probe") added timer_delete_sync(&kbd->inactivity_timer) to
both the probe close_hw error path and appletb_kbd_remove(), but the
way it was wired in left the inactivity timer reachable during driver
tear-down via two distinct windows.
Window A -- put_device() before timer_delete_sync():
put_device(&kbd->backlight_dev->dev);
timer_delete_sync(&kbd->inactivity_timer);
The inactivity_timer softirq reads kbd->backlight_dev and calls
backlight_device_set_brightness() -> mutex_lock(&ops_lock). If a
concurrent hid_appletb_bl unbind drops the last devm reference
between these two calls, the backlight_device is freed and the
mutex_lock() touches freed memory.
Window B -- backlight cleanup before hid_hw_stop():
if (kbd->backlight_dev) {
timer_delete_sync(...);
put_device(...);
}
hid_hw_close(hdev);
hid_hw_stop(hdev);
Even after Window A is closed, hid_hw_close()/hid_hw_stop() still run
afterwards, so a late ".event" callback from the HID core (USB URB
completion on real Apple hardware) can arrive after
timer_delete_sync() drained the softirq but before put_device() drops
the reference. That callback reaches reset_inactivity_timer(), which
calls mod_timer() and re-arms the timer. The freshly re-armed timer
can then fire on the about-to-be-freed backlight_device.
Both windows produce the same KASAN slab-use-after-free:
BUG: KASAN: slab-use-after-free in __mutex_lock+0x1aab/0x21c0
Read of size 8 at addr ffff88803ee9a108 by task swapper/0/0
Call Trace:
<IRQ>
__mutex_lock
backlight_device_set_brightness
appletb_inactivity_timer
call_timer_fn
run_timer_softirq
handle_softirqs
Allocated by task N:
devm_backlight_device_register
appletb_bl_probe
Freed by task M:
(concurrent hid_appletb_bl unbind path)
Close both windows at once by reworking the tear-down in
appletb_kbd_remove() and in the probe close_hw error path so that
1) hid_hw_close()/hid_hw_stop() run before the backlight cleanup,
guaranteeing no further .event callback can fire and re-arm the
timer, and
2) inside the "if (kbd->backlight_dev)" block, timer_delete_sync()
runs before put_device(), so the softirq is drained before the
final reference is dropped.
Fixes: 38224c472a03 ("HID: appletb-kbd: fix slab use-after-free bug in appletb_kbd_probe")
Cc: stable@vger.kernel.org
Signed-off-by: Sangyun Kim <sangyun.kim@snu.ac.kr>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/hid-appletb-kbd.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/drivers/hid/hid-appletb-kbd.c
+++ b/drivers/hid/hid-appletb-kbd.c
@@ -440,13 +440,13 @@ static int appletb_kbd_probe(struct hid_
unregister_handler:
input_unregister_handler(&kbd->inp_handler);
close_hw:
- if (kbd->backlight_dev) {
- put_device(&kbd->backlight_dev->dev);
- timer_delete_sync(&kbd->inactivity_timer);
- }
hid_hw_close(hdev);
stop_hw:
hid_hw_stop(hdev);
+ if (kbd->backlight_dev) {
+ timer_delete_sync(&kbd->inactivity_timer);
+ put_device(&kbd->backlight_dev->dev);
+ }
return ret;
}
@@ -457,13 +457,13 @@ static void appletb_kbd_remove(struct hi
appletb_kbd_set_mode(kbd, APPLETB_KBD_MODE_OFF);
input_unregister_handler(&kbd->inp_handler);
+ hid_hw_close(hdev);
+ hid_hw_stop(hdev);
+
if (kbd->backlight_dev) {
- put_device(&kbd->backlight_dev->dev);
timer_delete_sync(&kbd->inactivity_timer);
+ put_device(&kbd->backlight_dev->dev);
}
-
- hid_hw_close(hdev);
- hid_hw_stop(hdev);
}
static int appletb_kbd_suspend(struct hid_device *hdev, pm_message_t msg)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 003/201] HID: appletb-kbd: run inactivity autodim from workqueues
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
2026-05-15 15:46 ` [PATCH 7.0 001/201] HID: playstation: Clamp num_touch_reports Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 002/201] HID: appletb-kbd: fix UAF in inactivity-timer cleanup path Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 004/201] HID: pass the buffer size to hid_report_raw_event Greg Kroah-Hartman
` (203 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Sangyun Kim, Jiri Kosina
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sangyun Kim <sangyun.kim@snu.ac.kr>
commit 1654e53349d4e657b331de354313461f401f5063 upstream.
The autodim code in hid-appletb-kbd takes backlight_device->ops_lock
via backlight_device_set_brightness() -> mutex_lock() from two
different atomic contexts:
* appletb_inactivity_timer() is a struct timer_list callback, so it
runs in softirq context. Every expiry triggers
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:591
Call Trace:
<IRQ>
__might_resched
__mutex_lock
backlight_device_set_brightness
appletb_inactivity_timer
call_timer_fn
run_timer_softirq
* reset_inactivity_timer() is called from appletb_kbd_hid_event() and
appletb_kbd_inp_event(). On real USB hardware these run in
softirq/IRQ context (URB completion and input-event dispatch).
When the Touch Bar has already been dimmed or turned off, the
reset path calls backlight_device_set_brightness() directly to
restore brightness, producing the same warning.
Both call sites hit the same mutex_lock()-from-atomic bug. Fix them
together by moving the blocking work onto the system workqueue:
* Convert the inactivity timer from struct timer_list to
struct delayed_work; the callback (appletb_inactivity_work) now
runs in process context where mutex_lock() is legal.
* Add a dedicated struct work_struct restore_brightness_work and have
reset_inactivity_timer() schedule it instead of calling
backlight_device_set_brightness() directly.
Cancel both works synchronously during driver tear-down alongside the
existing backlight reference drop.
The semantics are unchanged (same delays, same state transitions on
dim, turn-off and user activity); only the execution context of the
sleeping call changes. The timer field and callback are renamed to
match their new type; reset_inactivity_timer() keeps its name because
it is invoked from input event paths that read naturally as "reset
the inactivity timer".
Fixes: 93a0fc489481 ("HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar")
Cc: stable@vger.kernel.org
Signed-off-by: Sangyun Kim <sangyun.kim@snu.ac.kr>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/hid-appletb-kbd.c | 44 ++++++++++++++++++++++++++++--------------
1 file changed, 30 insertions(+), 14 deletions(-)
--- a/drivers/hid/hid-appletb-kbd.c
+++ b/drivers/hid/hid-appletb-kbd.c
@@ -17,7 +17,7 @@
#include <linux/module.h>
#include <linux/string.h>
#include <linux/backlight.h>
-#include <linux/timer.h>
+#include <linux/workqueue.h>
#include <linux/input/sparse-keymap.h>
#include "hid-ids.h"
@@ -62,7 +62,8 @@ struct appletb_kbd {
struct input_handle kbd_handle;
struct input_handle tpd_handle;
struct backlight_device *backlight_dev;
- struct timer_list inactivity_timer;
+ struct delayed_work inactivity_work;
+ struct work_struct restore_brightness_work;
bool has_dimmed;
bool has_turned_off;
u8 saved_mode;
@@ -164,16 +165,18 @@ static int appletb_tb_key_to_slot(unsign
}
}
-static void appletb_inactivity_timer(struct timer_list *t)
+static void appletb_inactivity_work(struct work_struct *work)
{
- struct appletb_kbd *kbd = timer_container_of(kbd, t, inactivity_timer);
+ struct appletb_kbd *kbd = container_of(to_delayed_work(work),
+ struct appletb_kbd,
+ inactivity_work);
if (kbd->backlight_dev && appletb_tb_autodim) {
if (!kbd->has_dimmed) {
backlight_device_set_brightness(kbd->backlight_dev, 1);
kbd->has_dimmed = true;
- mod_timer(&kbd->inactivity_timer,
- jiffies + secs_to_jiffies(appletb_tb_idle_timeout));
+ mod_delayed_work(system_wq, &kbd->inactivity_work,
+ secs_to_jiffies(appletb_tb_idle_timeout));
} else if (!kbd->has_turned_off) {
backlight_device_set_brightness(kbd->backlight_dev, 0);
kbd->has_turned_off = true;
@@ -181,16 +184,25 @@ static void appletb_inactivity_timer(str
}
}
+static void appletb_restore_brightness_work(struct work_struct *work)
+{
+ struct appletb_kbd *kbd = container_of(work, struct appletb_kbd,
+ restore_brightness_work);
+
+ if (kbd->backlight_dev)
+ backlight_device_set_brightness(kbd->backlight_dev, 2);
+}
+
static void reset_inactivity_timer(struct appletb_kbd *kbd)
{
if (kbd->backlight_dev && appletb_tb_autodim) {
if (kbd->has_dimmed || kbd->has_turned_off) {
- backlight_device_set_brightness(kbd->backlight_dev, 2);
kbd->has_dimmed = false;
kbd->has_turned_off = false;
+ schedule_work(&kbd->restore_brightness_work);
}
- mod_timer(&kbd->inactivity_timer,
- jiffies + secs_to_jiffies(appletb_tb_dim_timeout));
+ mod_delayed_work(system_wq, &kbd->inactivity_work,
+ secs_to_jiffies(appletb_tb_dim_timeout));
}
}
@@ -408,9 +420,11 @@ static int appletb_kbd_probe(struct hid_
dev_err_probe(dev, -ENODEV, "Failed to get backlight device\n");
} else {
backlight_device_set_brightness(kbd->backlight_dev, 2);
- timer_setup(&kbd->inactivity_timer, appletb_inactivity_timer, 0);
- mod_timer(&kbd->inactivity_timer,
- jiffies + secs_to_jiffies(appletb_tb_dim_timeout));
+ INIT_DELAYED_WORK(&kbd->inactivity_work, appletb_inactivity_work);
+ INIT_WORK(&kbd->restore_brightness_work,
+ appletb_restore_brightness_work);
+ mod_delayed_work(system_wq, &kbd->inactivity_work,
+ secs_to_jiffies(appletb_tb_dim_timeout));
}
kbd->inp_handler.event = appletb_kbd_inp_event;
@@ -444,7 +458,8 @@ close_hw:
stop_hw:
hid_hw_stop(hdev);
if (kbd->backlight_dev) {
- timer_delete_sync(&kbd->inactivity_timer);
+ cancel_delayed_work_sync(&kbd->inactivity_work);
+ cancel_work_sync(&kbd->restore_brightness_work);
put_device(&kbd->backlight_dev->dev);
}
return ret;
@@ -461,7 +476,8 @@ static void appletb_kbd_remove(struct hi
hid_hw_stop(hdev);
if (kbd->backlight_dev) {
- timer_delete_sync(&kbd->inactivity_timer);
+ cancel_delayed_work_sync(&kbd->inactivity_work);
+ cancel_work_sync(&kbd->restore_brightness_work);
put_device(&kbd->backlight_dev->dev);
}
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 004/201] HID: pass the buffer size to hid_report_raw_event
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (2 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 003/201] HID: appletb-kbd: run inactivity autodim from workqueues Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 005/201] HID: core: introduce hid_safe_input_report() Greg Kroah-Hartman
` (202 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Benjamin Tissoires, Johan Hovold,
Jiri Kosina
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Tissoires <bentiss@kernel.org>
commit 2c85c61d1332e1e16f020d76951baf167dcb6f7a upstream.
commit 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing
bogus memset()") enforced the provided data to be at least the size of
the declared buffer in the report descriptor to prevent a buffer
overflow. However, we can try to be smarter by providing both the buffer
size and the data size, meaning that hid_report_raw_event() can make
better decision whether we should plaining reject the buffer (buffer
overflow attempt) or if we can safely memset it to 0 and pass it to the
rest of the stack.
Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Acked-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/bpf/hid_bpf_dispatch.c | 6 +++--
drivers/hid/hid-core.c | 42 ++++++++++++++++++++++++-------------
drivers/hid/hid-gfrm.c | 4 +--
drivers/hid/hid-logitech-hidpp.c | 2 -
drivers/hid/hid-multitouch.c | 2 -
drivers/hid/hid-primax.c | 2 -
drivers/hid/hid-vivaldi-common.c | 2 -
drivers/hid/wacom_sys.c | 6 ++---
drivers/staging/greybus/hid.c | 2 -
include/linux/hid.h | 4 +--
include/linux/hid_bpf.h | 14 +++++++-----
11 files changed, 53 insertions(+), 33 deletions(-)
--- a/drivers/hid/bpf/hid_bpf_dispatch.c
+++ b/drivers/hid/bpf/hid_bpf_dispatch.c
@@ -24,7 +24,8 @@ EXPORT_SYMBOL(hid_ops);
u8 *
dispatch_hid_bpf_device_event(struct hid_device *hdev, enum hid_report_type type, u8 *data,
- u32 *size, int interrupt, u64 source, bool from_bpf)
+ size_t *buf_size, u32 *size, int interrupt, u64 source,
+ bool from_bpf)
{
struct hid_bpf_ctx_kern ctx_kern = {
.ctx = {
@@ -74,6 +75,7 @@ dispatch_hid_bpf_device_event(struct hid
*size = ret;
}
+ *buf_size = ctx_kern.ctx.allocated_size;
return ctx_kern.data;
}
EXPORT_SYMBOL_GPL(dispatch_hid_bpf_device_event);
@@ -505,7 +507,7 @@ __hid_bpf_input_report(struct hid_bpf_ct
if (ret)
return ret;
- return hid_ops->hid_input_report(ctx->hid, type, buf, size, 0, (u64)(long)ctx, true,
+ return hid_ops->hid_input_report(ctx->hid, type, buf, size, size, 0, (u64)(long)ctx, true,
lock_already_taken);
}
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2029,24 +2029,32 @@ out:
}
EXPORT_SYMBOL_GPL(__hid_request);
-int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 *data, u32 size,
- int interrupt)
+int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 *data,
+ size_t bufsize, u32 size, int interrupt)
{
struct hid_report_enum *report_enum = hid->report_enum + type;
struct hid_report *report;
struct hid_driver *hdrv;
int max_buffer_size = HID_MAX_BUFFER_SIZE;
u32 rsize, csize = size;
+ size_t bsize = bufsize;
u8 *cdata = data;
int ret = 0;
report = hid_get_report(report_enum, data);
if (!report)
- goto out;
+ return 0;
+
+ if (unlikely(bsize < csize)) {
+ hid_warn_ratelimited(hid, "Event data for report %d is incorrect (%d vs %ld)\n",
+ report->id, csize, bsize);
+ return -EINVAL;
+ }
if (report_enum->numbered) {
cdata++;
csize--;
+ bsize--;
}
rsize = hid_compute_report_size(report);
@@ -2059,11 +2067,16 @@ int hid_report_raw_event(struct hid_devi
else if (rsize > max_buffer_size)
rsize = max_buffer_size;
+ if (bsize < rsize) {
+ hid_warn_ratelimited(hid, "Event data for report %d was too short (%d vs %ld)\n",
+ report->id, rsize, bsize);
+ return -EINVAL;
+ }
+
if (csize < rsize) {
- hid_warn_ratelimited(hid, "Event data for report %d was too short (%d vs %d)\n",
- report->id, rsize, csize);
- ret = -EINVAL;
- goto out;
+ dbg_hid("report %d is too short, (%d < %d)\n", report->id,
+ csize, rsize);
+ memset(cdata + csize, 0, rsize - csize);
}
if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event)
@@ -2071,7 +2084,7 @@ int hid_report_raw_event(struct hid_devi
if (hid->claimed & HID_CLAIMED_HIDRAW) {
ret = hidraw_report_event(hid, data, size);
if (ret)
- goto out;
+ return ret;
}
if (hid->claimed != HID_CLAIMED_HIDRAW && report->maxfield) {
@@ -2083,15 +2096,15 @@ int hid_report_raw_event(struct hid_devi
if (hid->claimed & HID_CLAIMED_INPUT)
hidinput_report_event(hid, report);
-out:
+
return ret;
}
EXPORT_SYMBOL_GPL(hid_report_raw_event);
static int __hid_input_report(struct hid_device *hid, enum hid_report_type type,
- u8 *data, u32 size, int interrupt, u64 source, bool from_bpf,
- bool lock_already_taken)
+ u8 *data, size_t bufsize, u32 size, int interrupt, u64 source,
+ bool from_bpf, bool lock_already_taken)
{
struct hid_report_enum *report_enum;
struct hid_driver *hdrv;
@@ -2116,7 +2129,8 @@ static int __hid_input_report(struct hid
report_enum = hid->report_enum + type;
hdrv = hid->driver;
- data = dispatch_hid_bpf_device_event(hid, type, data, &size, interrupt, source, from_bpf);
+ data = dispatch_hid_bpf_device_event(hid, type, data, &bufsize, &size, interrupt,
+ source, from_bpf);
if (IS_ERR(data)) {
ret = PTR_ERR(data);
goto unlock;
@@ -2145,7 +2159,7 @@ static int __hid_input_report(struct hid
goto unlock;
}
- ret = hid_report_raw_event(hid, type, data, size, interrupt);
+ ret = hid_report_raw_event(hid, type, data, bufsize, size, interrupt);
unlock:
if (!lock_already_taken)
@@ -2167,7 +2181,7 @@ unlock:
int hid_input_report(struct hid_device *hid, enum hid_report_type type, u8 *data, u32 size,
int interrupt)
{
- return __hid_input_report(hid, type, data, size, interrupt, 0,
+ return __hid_input_report(hid, type, data, size, size, interrupt, 0,
false, /* from_bpf */
false /* lock_already_taken */);
}
--- a/drivers/hid/hid-gfrm.c
+++ b/drivers/hid/hid-gfrm.c
@@ -66,7 +66,7 @@ static int gfrm_raw_event(struct hid_dev
switch (data[1]) {
case GFRM100_SEARCH_KEY_DOWN:
ret = hid_report_raw_event(hdev, HID_INPUT_REPORT, search_key_dn,
- sizeof(search_key_dn), 1);
+ sizeof(search_key_dn), sizeof(search_key_dn), 1);
break;
case GFRM100_SEARCH_KEY_AUDIO_DATA:
@@ -74,7 +74,7 @@ static int gfrm_raw_event(struct hid_dev
case GFRM100_SEARCH_KEY_UP:
ret = hid_report_raw_event(hdev, HID_INPUT_REPORT, search_key_up,
- sizeof(search_key_up), 1);
+ sizeof(search_key_up), sizeof(search_key_up), 1);
break;
default:
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -3665,7 +3665,7 @@ static int hidpp10_consumer_keys_raw_eve
memcpy(&consumer_report[1], &data[3], 4);
/* We are called from atomic context */
hid_report_raw_event(hidpp->hid_dev, HID_INPUT_REPORT,
- consumer_report, 5, 1);
+ consumer_report, sizeof(consumer_report), 5, 1);
return 1;
}
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -533,7 +533,7 @@ static void mt_get_feature(struct hid_de
}
ret = hid_report_raw_event(hdev, HID_FEATURE_REPORT, buf,
- size, 0);
+ size, size, 0);
if (ret)
dev_warn(&hdev->dev, "failed to report feature\n");
}
--- a/drivers/hid/hid-primax.c
+++ b/drivers/hid/hid-primax.c
@@ -44,7 +44,7 @@ static int px_raw_event(struct hid_devic
data[0] |= (1 << (data[idx] - 0xE0));
data[idx] = 0;
}
- hid_report_raw_event(hid, HID_INPUT_REPORT, data, size, 0);
+ hid_report_raw_event(hid, HID_INPUT_REPORT, data, size, size, 0);
return 1;
default: /* unknown report */
--- a/drivers/hid/hid-vivaldi-common.c
+++ b/drivers/hid/hid-vivaldi-common.c
@@ -85,7 +85,7 @@ void vivaldi_feature_mapping(struct hid_
}
ret = hid_report_raw_event(hdev, HID_FEATURE_REPORT, report_data,
- report_len, 0);
+ report_len, report_len, 0);
if (ret) {
dev_warn(&hdev->dev, "failed to report feature %d\n",
field->report->id);
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -90,7 +90,7 @@ static void wacom_wac_queue_flush(struct
kfree(buf);
continue;
}
- err = hid_report_raw_event(hdev, HID_INPUT_REPORT, buf, size, false);
+ err = hid_report_raw_event(hdev, HID_INPUT_REPORT, buf, size, size, false);
if (err) {
hid_warn(hdev, "%s: unable to flush event due to error %d\n",
__func__, err);
@@ -334,7 +334,7 @@ static void wacom_feature_mapping(struct
data, n, WAC_CMD_RETRIES);
if (ret == n && features->type == HID_GENERIC) {
ret = hid_report_raw_event(hdev,
- HID_FEATURE_REPORT, data, n, 0);
+ HID_FEATURE_REPORT, data, n, n, 0);
} else if (ret == 2 && features->type != HID_GENERIC) {
features->touch_max = data[1];
} else {
@@ -395,7 +395,7 @@ static void wacom_feature_mapping(struct
data, n, WAC_CMD_RETRIES);
if (ret == n) {
ret = hid_report_raw_event(hdev, HID_FEATURE_REPORT,
- data, n, 0);
+ data, n, n, 0);
} else {
hid_warn(hdev, "%s: could not retrieve sensor offsets\n",
__func__);
--- a/drivers/staging/greybus/hid.c
+++ b/drivers/staging/greybus/hid.c
@@ -201,7 +201,7 @@ static void gb_hid_init_report(struct gb
* we just need to setup the input fields, so using
* hid_report_raw_event is safe.
*/
- hid_report_raw_event(ghid->hid, report->type, ghid->inbuf, size, 1);
+ hid_report_raw_event(ghid->hid, report->type, ghid->inbuf, ghid->bufsize, size, 1);
}
static void gb_hid_init_reports(struct gb_hid *ghid)
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -1266,8 +1266,8 @@ static inline u32 hid_report_len(struct
return DIV_ROUND_UP(report->size, 8) + (report->id > 0);
}
-int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 *data, u32 size,
- int interrupt);
+int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 *data,
+ size_t bufsize, u32 size, int interrupt);
/* HID quirks API */
unsigned long hid_lookup_quirk(const struct hid_device *hdev);
--- a/include/linux/hid_bpf.h
+++ b/include/linux/hid_bpf.h
@@ -72,8 +72,8 @@ struct hid_ops {
int (*hid_hw_output_report)(struct hid_device *hdev, __u8 *buf, size_t len,
u64 source, bool from_bpf);
int (*hid_input_report)(struct hid_device *hid, enum hid_report_type type,
- u8 *data, u32 size, int interrupt, u64 source, bool from_bpf,
- bool lock_already_taken);
+ u8 *data, size_t bufsize, u32 size, int interrupt, u64 source,
+ bool from_bpf, bool lock_already_taken);
struct module *owner;
const struct bus_type *bus_type;
};
@@ -200,7 +200,8 @@ struct hid_bpf {
#ifdef CONFIG_HID_BPF
u8 *dispatch_hid_bpf_device_event(struct hid_device *hid, enum hid_report_type type, u8 *data,
- u32 *size, int interrupt, u64 source, bool from_bpf);
+ size_t *buf_size, u32 *size, int interrupt, u64 source,
+ bool from_bpf);
int dispatch_hid_bpf_raw_requests(struct hid_device *hdev,
unsigned char reportnum, __u8 *buf,
u32 size, enum hid_report_type rtype,
@@ -215,8 +216,11 @@ int hid_bpf_device_init(struct hid_devic
const u8 *call_hid_bpf_rdesc_fixup(struct hid_device *hdev, const u8 *rdesc, unsigned int *size);
#else /* CONFIG_HID_BPF */
static inline u8 *dispatch_hid_bpf_device_event(struct hid_device *hid, enum hid_report_type type,
- u8 *data, u32 *size, int interrupt,
- u64 source, bool from_bpf) { return data; }
+ u8 *data, size_t *buf_size, u32 *size,
+ int interrupt, u64 source, bool from_bpf)
+{
+ return data;
+}
static inline int dispatch_hid_bpf_raw_requests(struct hid_device *hdev,
unsigned char reportnum, u8 *buf,
u32 size, enum hid_report_type rtype,
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 005/201] HID: core: introduce hid_safe_input_report()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (3 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 004/201] HID: pass the buffer size to hid_report_raw_event Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 006/201] HID: pidff: Fix integer overflow in pidff_rescale Greg Kroah-Hartman
` (201 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Benjamin Tissoires, Jiri Kosina
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Tissoires <bentiss@kernel.org>
commit 206342541fc887ae919774a43942dc883161fece upstream.
hid_input_report() is used in too many places to have a commit that
doesn't cross subsystem borders. Instead of changing the API, introduce
a new one when things matters in the transport layers:
- usbhid
- i2chid
This effectively revert to the old behavior for those two transport
layers.
Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/hid-core.c | 25 +++++++++++++++++++++++++
drivers/hid/i2c-hid/i2c-hid-core.c | 7 ++++---
drivers/hid/usbhid/hid-core.c | 11 ++++++-----
include/linux/hid.h | 2 ++
4 files changed, 37 insertions(+), 8 deletions(-)
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2177,6 +2177,7 @@ unlock:
* @interrupt: distinguish between interrupt and control transfers
*
* This is data entry for lower layers.
+ * Legacy, please use hid_safe_input_report() instead.
*/
int hid_input_report(struct hid_device *hid, enum hid_report_type type, u8 *data, u32 size,
int interrupt)
@@ -2187,6 +2188,30 @@ int hid_input_report(struct hid_device *
}
EXPORT_SYMBOL_GPL(hid_input_report);
+/**
+ * hid_safe_input_report - report data from lower layer (usb, bt...)
+ *
+ * @hid: hid device
+ * @type: HID report type (HID_*_REPORT)
+ * @data: report contents
+ * @bufsize: allocated size of the data buffer
+ * @size: useful size of data parameter
+ * @interrupt: distinguish between interrupt and control transfers
+ *
+ * This is data entry for lower layers.
+ * Please use this function instead of the non safe version because we provide
+ * here the size of the buffer, allowing hid-core to make smarter decisions
+ * regarding the incoming buffer.
+ */
+int hid_safe_input_report(struct hid_device *hid, enum hid_report_type type, u8 *data,
+ size_t bufsize, u32 size, int interrupt)
+{
+ return __hid_input_report(hid, type, data, bufsize, size, interrupt, 0,
+ false, /* from_bpf */
+ false /* lock_already_taken */);
+}
+EXPORT_SYMBOL_GPL(hid_safe_input_report);
+
bool hid_match_one_id(const struct hid_device *hdev,
const struct hid_device_id *id)
{
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -574,9 +574,10 @@ static void i2c_hid_get_input(struct i2c
if (ihid->hid->group != HID_GROUP_RMI)
pm_wakeup_event(&ihid->client->dev, 0);
- hid_input_report(ihid->hid, HID_INPUT_REPORT,
- ihid->inbuf + sizeof(__le16),
- ret_size - sizeof(__le16), 1);
+ hid_safe_input_report(ihid->hid, HID_INPUT_REPORT,
+ ihid->inbuf + sizeof(__le16),
+ ihid->bufsize - sizeof(__le16),
+ ret_size - sizeof(__le16), 1);
}
return;
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -283,9 +283,9 @@ static void hid_irq_in(struct urb *urb)
break;
usbhid_mark_busy(usbhid);
if (!test_bit(HID_RESUME_RUNNING, &usbhid->iofl)) {
- hid_input_report(urb->context, HID_INPUT_REPORT,
- urb->transfer_buffer,
- urb->actual_length, 1);
+ hid_safe_input_report(urb->context, HID_INPUT_REPORT,
+ urb->transfer_buffer, urb->transfer_buffer_length,
+ urb->actual_length, 1);
/*
* autosuspend refused while keys are pressed
* because most keyboards don't wake up when
@@ -482,9 +482,10 @@ static void hid_ctrl(struct urb *urb)
switch (status) {
case 0: /* success */
if (usbhid->ctrl[usbhid->ctrltail].dir == USB_DIR_IN)
- hid_input_report(urb->context,
+ hid_safe_input_report(urb->context,
usbhid->ctrl[usbhid->ctrltail].report->type,
- urb->transfer_buffer, urb->actual_length, 0);
+ urb->transfer_buffer, urb->transfer_buffer_length,
+ urb->actual_length, 0);
break;
case -ESHUTDOWN: /* unplug */
unplug = 1;
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -998,6 +998,8 @@ struct hid_field *hid_find_field(struct
int hid_set_field(struct hid_field *, unsigned, __s32);
int hid_input_report(struct hid_device *hid, enum hid_report_type type, u8 *data, u32 size,
int interrupt);
+int hid_safe_input_report(struct hid_device *hid, enum hid_report_type type, u8 *data,
+ size_t bufsize, u32 size, int interrupt);
struct hid_field *hidinput_get_led_field(struct hid_device *hid);
unsigned int hidinput_count_leds(struct hid_device *hid);
__s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 006/201] HID: pidff: Fix integer overflow in pidff_rescale
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (4 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 005/201] HID: core: introduce hid_safe_input_report() Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 007/201] media: uvcvideo: Enable VB2_DMABUF for metadata stream Greg Kroah-Hartman
` (200 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Tomasz Pakuła, Jiri Kosina
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
commit 48d1677779ad6816978ad4a4f7588aec5ec960fe upstream.
Rescaling values close to the max (U16_MAX) temporarily creates values
that exceed the s32 range. This caused value overflow in case when, for
example, a periodic effect phase was higer than 180 degrees. In turn,
rescale function could return values outised of the logical range of the
HID field.
Fix by using 64 bit signed integer to store the value during calculation
but still return only 32 bit integer.
Closes: https://github.com/JacKeTUs/universal-pidff/issues/116
Fixes: 224ee88fe395 ("Input: add force feedback driver for PID devices")
Cc: stable@vger.kernel.org
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/usbhid/hid-pidff.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -11,6 +11,7 @@
#include "hid-pidff.h"
#include <linux/hid.h>
#include <linux/input.h>
+#include <linux/math64.h>
#include <linux/minmax.h>
#include <linux/slab.h>
#include <linux/usb.h>
@@ -325,8 +326,10 @@ static s32 pidff_clamp(s32 i, struct hid
*/
static int pidff_rescale(int i, int max, struct hid_field *field)
{
- return i * (field->logical_maximum - field->logical_minimum) / max +
- field->logical_minimum;
+ /* 64 bits needed for big values during rescale */
+ s64 result = field->logical_maximum - field->logical_minimum;
+
+ return div_s64(result * i, max) + field->logical_minimum;
}
/*
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 007/201] media: uvcvideo: Enable VB2_DMABUF for metadata stream
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (5 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 006/201] HID: pidff: Fix integer overflow in pidff_rescale Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 008/201] drm/msm/hdmi: Fix wrong CTRL1 register used in writing info frames Greg Kroah-Hartman
` (199 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ricardo Ribalda, Laurent Pinchart,
Hans de Goede, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <ribalda@chromium.org>
commit fbac03467e53d8d72e5099c03df26d9adae11416 upstream.
The UVC driver has two video streams, one for the frames and another one
for the metadata. Both streams share most of the codebase, but only the
data stream declares support for DMABUF transfer mode.
I have tried the DMABUF transfer mode with CONFIG_DMABUF_HEAPS_SYSTEM
and the frames looked correct.
This patch announces the support for DMABUF for the metadata stream.
This is useful for apps/HALs that only want to support DMABUF.
Cc: stable@vger.kernel.org
Fixes: 088ead2552458 ("media: uvcvideo: Add a metadata device node")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Link: https://patch.msgid.link/20260309-uvc-metadata-dmabuf-v1-1-fc8b87bd29c5@chromium.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/usb/uvc/uvc_queue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/media/usb/uvc/uvc_queue.c
+++ b/drivers/media/usb/uvc/uvc_queue.c
@@ -243,7 +243,7 @@ int uvc_queue_init(struct uvc_video_queu
int ret;
queue->queue.type = type;
- queue->queue.io_modes = VB2_MMAP | VB2_USERPTR;
+ queue->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
queue->queue.drv_priv = queue;
queue->queue.buf_struct_size = sizeof(struct uvc_buffer);
queue->queue.mem_ops = &vb2_vmalloc_memops;
@@ -256,7 +256,6 @@ int uvc_queue_init(struct uvc_video_queu
queue->queue.ops = &uvc_meta_queue_qops;
break;
default:
- queue->queue.io_modes |= VB2_DMABUF;
queue->queue.ops = &uvc_queue_qops;
break;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 008/201] drm/msm/hdmi: Fix wrong CTRL1 register used in writing info frames
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (6 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 007/201] media: uvcvideo: Enable VB2_DMABUF for metadata stream Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 009/201] media: rzv2h-ivc: Avoid double job scheduling Greg Kroah-Hartman
` (198 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Krzysztof Kozlowski,
Dmitry Baryshkov
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
commit 8c6c93b7db42d15c6e8c2540a648d32986a04b1a upstream.
Commit 384d2b03d0a1 ("drm/msm/hdmi: make use of the drm_connector_hdmi
framework") changed the unconditional register writes in few places to
updates: read, apply mask, write. The new code reads
REG_HDMI_INFOFRAME_CTRL1 register, applies fields/mask for
HDMI_INFOFRAME_CTRL0 register and finally writes to
HDMI_INFOFRAME_CTRL0. This difference between CTRL1 and CTRL0 looks
unintended and may result in wrong data being written to HDMI bridge
registers.
Cc: <stable@vger.kernel.org>
Fixes: 384d2b03d0a1 ("drm/msm/hdmi: make use of the drm_connector_hdmi framework")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/711156/
Link: https://lore.kernel.org/r/20260311191620.245394-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
@@ -153,7 +153,7 @@ static int msm_hdmi_bridge_write_avi_inf
for (i = 0; i < ARRAY_SIZE(buf); i++)
hdmi_write(hdmi, REG_HDMI_AVI_INFO(i), buf[i]);
- val = hdmi_read(hdmi, REG_HDMI_INFOFRAME_CTRL1);
+ val = hdmi_read(hdmi, REG_HDMI_INFOFRAME_CTRL0);
val |= HDMI_INFOFRAME_CTRL0_AVI_SEND |
HDMI_INFOFRAME_CTRL0_AVI_CONT;
hdmi_write(hdmi, REG_HDMI_INFOFRAME_CTRL0, val);
@@ -193,7 +193,7 @@ static int msm_hdmi_bridge_write_audio_i
buffer[9] << 16 |
buffer[10] << 24);
- val = hdmi_read(hdmi, REG_HDMI_INFOFRAME_CTRL1);
+ val = hdmi_read(hdmi, REG_HDMI_INFOFRAME_CTRL0);
val |= HDMI_INFOFRAME_CTRL0_AUDIO_INFO_SEND |
HDMI_INFOFRAME_CTRL0_AUDIO_INFO_CONT |
HDMI_INFOFRAME_CTRL0_AUDIO_INFO_SOURCE |
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 009/201] media: rzv2h-ivc: Avoid double job scheduling
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (7 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 008/201] drm/msm/hdmi: Fix wrong CTRL1 register used in writing info frames Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 010/201] media: nxp: imx8-isi: Reduce minimum queued buffers from 2 to 0 Greg Kroah-Hartman
` (197 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Scally, Jacopo Mondi,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
commit b1de0940a19c1b0001425f8069d6a82369986af7 upstream.
The scheduling of a new buffer transfer in the IVC driver is triggered
by two occurrences of the "frame completed" interrupt.
The first interrupt occurrence identifies when all image data have been
transferred to the ISP, the second occurrence identifies when the
post-transfer VBLANK has completed and a new buffer can be transferred.
Under heavy system load conditions the actual execution of the workqueue
item might be delayed and two items might happen to run concurrently,
leading to a new frame transfer being triggered while the previous one
has not yet finished.
This error condition is only visible because the driver maintains a
status variable that counts the number of interrupts since the last
transfer, and warns in case an IRQ happens before the counter has been
reset.
To ensure sequential execution of the worqueue items and avoid a double
buffer transfer to run concurrently, protect the whole function body
with the spinlock that so far was solely used to reset the counter and
inspect the interrupt counter variable at the beginning of the buffer
transfer function.
As soon as the ongoing transfer completes, the workqueue item will be
re-scheduled and will consume the pending buffer.
Cc: stable@vger.kernel.org
Fixes: f0b3984d821b ("media: platform: Add Renesas Input Video Control block driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
+++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
@@ -149,6 +149,11 @@ static void rzv2h_ivc_transfer_buffer(st
buffers.work);
struct rzv2h_ivc_buf *buf;
+ guard(spinlock_irqsave)(&ivc->spinlock);
+
+ if (ivc->vvalid_ifp)
+ return;
+
/* Setup buffers */
scoped_guard(spinlock_irqsave, &ivc->buffers.lock) {
buf = list_first_entry_or_null(&ivc->buffers.queue,
@@ -164,9 +169,7 @@ static void rzv2h_ivc_transfer_buffer(st
buf->addr = vb2_dma_contig_plane_dma_addr(&buf->vb.vb2_buf, 0);
rzv2h_ivc_write(ivc, RZV2H_IVC_REG_AXIRX_SADDL_P0, buf->addr);
- scoped_guard(spinlock_irqsave, &ivc->spinlock) {
- ivc->vvalid_ifp = 2;
- }
+ ivc->vvalid_ifp = 2;
rzv2h_ivc_write(ivc, RZV2H_IVC_REG_FM_FRCON, 0x1);
}
@@ -201,7 +204,7 @@ static void rzv2h_ivc_buf_queue(struct v
}
scoped_guard(spinlock_irq, &ivc->spinlock) {
- if (vb2_is_streaming(vb->vb2_queue) && !ivc->vvalid_ifp)
+ if (vb2_is_streaming(vb->vb2_queue))
queue_work(ivc->buffers.async_wq, &ivc->buffers.work);
}
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 010/201] media: nxp: imx8-isi: Reduce minimum queued buffers from 2 to 0
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (8 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 009/201] media: rzv2h-ivc: Avoid double job scheduling Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 011/201] media: rzv2h-ivc: Write AXIRX_PIXFMT once Greg Kroah-Hartman
` (196 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Guoniu Zhou, Laurent Pinchart,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guoniu Zhou <guoniu.zhou@nxp.com>
commit 2f38622d0f85f317be9e6b131da6cd511db94fd2 upstream.
Fix a hang issue when capturing a single frame with applications like cam
in libcamera. It would hang waiting for the driver to complete the buffer,
but streaming never starts because min_queued_buffers was set to 2.
The ISI module uses a ping-pong buffer mechanism that requires two buffers
to be programmed at all times. However, when fewer than 2 user buffers are
available, the driver use internal discard buffers to fill the remaining
slot(s). Reduce minimum queued buffers from 2 to 0 allows streaming to
start without any queued buffers.
Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver")
Cc: stable@vger.kernel.org
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20260312-isi_min_buffers-v2-1-d5ea1c79ad81@nxp.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
@@ -1410,7 +1410,7 @@ int mxc_isi_video_register(struct mxc_is
q->mem_ops = &vb2_dma_contig_memops;
q->buf_struct_size = sizeof(struct mxc_isi_buffer);
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_queued_buffers = 2;
+ q->min_queued_buffers = 0;
q->lock = &video->lock;
q->dev = pipe->isi->dev;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 011/201] media: rzv2h-ivc: Write AXIRX_PIXFMT once
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (9 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 010/201] media: nxp: imx8-isi: Reduce minimum queued buffers from 2 to 0 Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 012/201] media: rzv2h-ivc: Fix FM_STOP register write Greg Kroah-Hartman
` (195 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Scally,
Barnabás Pőcze, Jacopo Mondi, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
commit d901c428350245f2b26431e03c4ba0bdc7a71243 upstream.
The documentation prescribes that invalid formats should not be set,
so do a single write to ensure that both the CLFMT and DTYPE fields
are set to valid values.
Cc: stable@vger.kernel.org
Fixes: f0b3984d821b ("media: platform: Add Renesas Input Video Control block driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c | 8 ++++----
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h | 7 ++++---
2 files changed, 8 insertions(+), 7 deletions(-)
--- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
+++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
@@ -218,10 +218,10 @@ static void rzv2h_ivc_format_configure(s
/* Currently only CRU packed pixel formats are supported */
rzv2h_ivc_write(ivc, RZV2H_IVC_REG_AXIRX_PXFMT,
- RZV2H_IVC_INPUT_FMT_CRU_PACKED);
-
- rzv2h_ivc_update_bits(ivc, RZV2H_IVC_REG_AXIRX_PXFMT,
- RZV2H_IVC_PXFMT_DTYPE, fmt->dtype);
+ FIELD_PREP(RZV2H_IVC_AXIRX_PXFMT_FIELD_DTYPE,
+ fmt->dtype) |
+ FIELD_PREP(RZV2H_IVC_AXIRX_PXFMT_FIELD_CLFMT,
+ RZV2H_IVC_CLFMT_CRU_PACKED));
rzv2h_ivc_write(ivc, RZV2H_IVC_REG_AXIRX_HSIZE, pix->width);
rzv2h_ivc_write(ivc, RZV2H_IVC_REG_AXIRX_VSIZE, pix->height);
--- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
+++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
@@ -24,9 +24,10 @@
#define RZV2H_IVC_ONE_EXPOSURE 0x00
#define RZV2H_IVC_TWO_EXPOSURE 0x01
#define RZV2H_IVC_REG_AXIRX_PXFMT 0x0004
-#define RZV2H_IVC_INPUT_FMT_MIPI (0 << 16)
-#define RZV2H_IVC_INPUT_FMT_CRU_PACKED BIT(16)
-#define RZV2H_IVC_PXFMT_DTYPE GENMASK(7, 0)
+#define RZV2H_IVC_AXIRX_PXFMT_FIELD_CLFMT GENMASK(17, 16)
+#define RZV2H_IVC_CLFMT_MIPI 0
+#define RZV2H_IVC_CLFMT_CRU_PACKED 1
+#define RZV2H_IVC_AXIRX_PXFMT_FIELD_DTYPE GENMASK(7, 0)
#define RZV2H_IVC_REG_AXIRX_SADDL_P0 0x0010
#define RZV2H_IVC_REG_AXIRX_SADDH_P0 0x0014
#define RZV2H_IVC_REG_AXIRX_SADDL_P1 0x0018
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 012/201] media: rzv2h-ivc: Fix FM_STOP register write
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (10 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 011/201] media: rzv2h-ivc: Write AXIRX_PIXFMT once Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 013/201] media: rzv2h-ivc: Fix concurrent buffer list access Greg Kroah-Hartman
` (194 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Scally,
Barnabás Pőcze, Jacopo Mondi, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
commit 562d2e0a672075292e92538dad61664e89b34d30 upstream.
Bit 20 should be written in this register to stop frame processing.
So fix that, as well as the poll condition.
Cc: stable@vger.kernel.org
Fixes: f0b3984d821b ("media: platform: Add Renesas Input Video Control block driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c | 5 +++--
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
+++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
@@ -300,9 +300,10 @@ static void rzv2h_ivc_stop_streaming(str
struct rzv2h_ivc *ivc = vb2_get_drv_priv(q);
u32 val = 0;
- rzv2h_ivc_write(ivc, RZV2H_IVC_REG_FM_STOP, 0x1);
+ rzv2h_ivc_write(ivc, RZV2H_IVC_REG_FM_STOP, RZV2H_IVC_REG_FM_STOP_FSTOP);
readl_poll_timeout(ivc->base + RZV2H_IVC_REG_FM_STOP,
- val, !val, 10 * USEC_PER_MSEC, 250 * USEC_PER_MSEC);
+ val, !(val & RZV2H_IVC_REG_FM_STOP_FSTOP),
+ 10 * USEC_PER_MSEC, 250 * USEC_PER_MSEC);
rzv2h_ivc_return_buffers(ivc, VB2_BUF_STATE_ERROR);
video_device_pipeline_stop(&ivc->vdev.dev);
--- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
+++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
@@ -46,6 +46,7 @@
#define RZV2H_IVC_REG_FM_MCON 0x0104
#define RZV2H_IVC_REG_FM_FRCON 0x0108
#define RZV2H_IVC_REG_FM_STOP 0x010c
+#define RZV2H_IVC_REG_FM_STOP_FSTOP BIT(20)
#define RZV2H_IVC_REG_FM_INT_EN 0x0120
#define RZV2H_IVC_VVAL_IFPE BIT(0)
#define RZV2H_IVC_REG_FM_INT_STA 0x0124
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 013/201] media: rzv2h-ivc: Fix concurrent buffer list access
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (11 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 012/201] media: rzv2h-ivc: Fix FM_STOP register write Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 014/201] media: mali-c55: Initialize the ISP in enable_streams() Greg Kroah-Hartman
` (193 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Scally,
Barnabás Pőcze, Jacopo Mondi, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
commit 72773ff1cdfaebc593f53b1719b2c1773ecf8c43 upstream.
The list of buffers (`rzv2h_ivc::buffers.queue`) is protected by a
spinlock (`rzv2h_ivc::buffers.lock`). However, in
`rzv2h_ivc_transfer_buffer()`, which runs in a separate workqueue, the
`list_del()` call is executed without holding the spinlock, which makes
it possible for the list to be concurrently modified
Fix that by removing a buffer from the list in the lock protected section.
Cc: stable@vger.kernel.org
Fixes: f0b3984d821b ("media: platform: Add Renesas Input Video Control block driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
[assign ivc->buffers.curr in critical section as reported by Barnabas]
Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
--- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
+++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
@@ -158,14 +158,13 @@ static void rzv2h_ivc_transfer_buffer(st
scoped_guard(spinlock_irqsave, &ivc->buffers.lock) {
buf = list_first_entry_or_null(&ivc->buffers.queue,
struct rzv2h_ivc_buf, queue);
- }
-
- if (!buf)
- return;
+ if (!buf)
+ return;
- list_del(&buf->queue);
+ list_del(&buf->queue);
+ ivc->buffers.curr = buf;
+ }
- ivc->buffers.curr = buf;
buf->addr = vb2_dma_contig_plane_dma_addr(&buf->vb.vb2_buf, 0);
rzv2h_ivc_write(ivc, RZV2H_IVC_REG_AXIRX_SADDL_P0, buf->addr);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 014/201] media: mali-c55: Initialize the ISP in enable_streams()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (12 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 013/201] media: rzv2h-ivc: Fix concurrent buffer list access Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 015/201] media: mali-c55: Fix Iridix bypass macros Greg Kroah-Hartman
` (192 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Scally, Jacopo Mondi,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
commit d5c24b71da547fdb5bea51a69d62f9e2a609431d upstream.
The Mali C55 driver initializes the ISP in two points:
1) At probe time it disables ISP blocks by configuring them in bypass
mode
2) At enable_streams() it initializes the crop rectangles and the image
processing pipeline using the current image format
However, as ISP blocks are configured by userspace, if their
configuration is not reset, from the second enable_streams() call
onwards the ISP configuration will depend on the previous streaming
session configuration.
To re-initialize the ISP completely at enable_streams() time consolidate
the ISP block bypass configuration and the image processing path
configuration in a single function to be called at enabled_streams()
time.
Cc: stable@vger.kernel.org
Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/arm/mali-c55/mali-c55-common.h | 2
drivers/media/platform/arm/mali-c55/mali-c55-core.c | 35 --------
drivers/media/platform/arm/mali-c55/mali-c55-isp.c | 37 +--------
drivers/media/platform/arm/mali-c55/mali-c55-params.c | 72 ++++++++++++++++++
4 files changed, 79 insertions(+), 67 deletions(-)
--- a/drivers/media/platform/arm/mali-c55/mali-c55-common.h
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-common.h
@@ -306,5 +306,7 @@ bool mali_c55_pipeline_ready(struct mali
void mali_c55_stats_fill_buffer(struct mali_c55 *mali_c55,
enum mali_c55_config_spaces cfg_space);
void mali_c55_params_write_config(struct mali_c55 *mali_c55);
+void mali_c55_params_init_isp_config(struct mali_c55 *mali_c55,
+ const struct v4l2_subdev_state *state);
#endif /* _MALI_C55_COMMON_H */
--- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
@@ -663,41 +663,6 @@ static int mali_c55_init_context(struct
mali_c55->base + config_space_addrs[MALI_C55_CONFIG_PING],
MALI_C55_CONFIG_SPACE_SIZE);
- /*
- * Some features of the ISP need to be disabled by default and only
- * enabled at the same time as they're configured by a parameters buffer
- */
-
- /* Bypass the sqrt and square compression and expansion modules */
- mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BYPASS_1,
- MALI_C55_REG_BYPASS_1_FE_SQRT,
- MALI_C55_REG_BYPASS_1_FE_SQRT);
- mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BYPASS_3,
- MALI_C55_REG_BYPASS_3_SQUARE_BE,
- MALI_C55_REG_BYPASS_3_SQUARE_BE);
-
- /* Bypass the temper module */
- mali_c55_ctx_write(mali_c55, MALI_C55_REG_BYPASS_2,
- MALI_C55_REG_BYPASS_2_TEMPER);
-
- /* Disable the temper module's DMA read/write */
- mali_c55_ctx_write(mali_c55, MALI_C55_REG_TEMPER_DMA_IO, 0x0);
-
- /* Bypass the colour noise reduction */
- mali_c55_ctx_write(mali_c55, MALI_C55_REG_BYPASS_4,
- MALI_C55_REG_BYPASS_4_CNR);
-
- /* Disable the sinter module */
- mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_SINTER_CONFIG,
- MALI_C55_SINTER_ENABLE_MASK, 0);
-
- /* Disable the RGB Gamma module for each output */
- mali_c55_ctx_write(mali_c55, MALI_C55_REG_FR_GAMMA_RGB_ENABLE, 0);
- mali_c55_ctx_write(mali_c55, MALI_C55_REG_DS_GAMMA_RGB_ENABLE, 0);
-
- /* Disable the colour correction matrix */
- mali_c55_ctx_write(mali_c55, MALI_C55_REG_CCM_ENABLE, 0);
-
return 0;
}
--- a/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
@@ -112,9 +112,6 @@ static int mali_c55_isp_start(struct mal
const struct v4l2_subdev_state *state)
{
struct mali_c55_context *ctx = mali_c55_get_active_context(mali_c55);
- const struct mali_c55_isp_format_info *cfg;
- const struct v4l2_mbus_framefmt *format;
- const struct v4l2_rect *crop;
u32 val;
int ret;
@@ -122,35 +119,11 @@ static int mali_c55_isp_start(struct mal
MALI_C55_REG_MCU_CONFIG_WRITE_MASK,
MALI_C55_REG_MCU_CONFIG_WRITE_PING);
- /* Apply input windowing */
- crop = v4l2_subdev_state_get_crop(state, MALI_C55_ISP_PAD_SINK_VIDEO);
- format = v4l2_subdev_state_get_format(state,
- MALI_C55_ISP_PAD_SINK_VIDEO);
- cfg = mali_c55_isp_get_mbus_config_by_code(format->code);
-
- mali_c55_write(mali_c55, MALI_C55_REG_HC_START,
- MALI_C55_HC_START(crop->left));
- mali_c55_write(mali_c55, MALI_C55_REG_HC_SIZE,
- MALI_C55_HC_SIZE(crop->width));
- mali_c55_write(mali_c55, MALI_C55_REG_VC_START_SIZE,
- MALI_C55_VC_START(crop->top) |
- MALI_C55_VC_SIZE(crop->height));
- mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BASE_ADDR,
- MALI_C55_REG_ACTIVE_WIDTH_MASK, format->width);
- mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BASE_ADDR,
- MALI_C55_REG_ACTIVE_HEIGHT_MASK,
- format->height << 16);
- mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BAYER_ORDER,
- MALI_C55_BAYER_ORDER_MASK, cfg->order);
- mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_INPUT_WIDTH,
- MALI_C55_INPUT_WIDTH_MASK,
- MALI_C55_INPUT_WIDTH_20BIT);
-
- mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_ISP_RAW_BYPASS,
- MALI_C55_ISP_RAW_BYPASS_BYPASS_MASK,
- cfg->bypass ? MALI_C55_ISP_RAW_BYPASS_BYPASS_MASK :
- 0x00);
-
+ /*
+ * Apply default ISP configuration and the apply configurations from
+ * the first available parameters buffer.
+ */
+ mali_c55_params_init_isp_config(mali_c55, state);
mali_c55_params_write_config(mali_c55);
ret = mali_c55_config_write(ctx, MALI_C55_CONFIG_PING, true);
if (ret) {
--- a/drivers/media/platform/arm/mali-c55/mali-c55-params.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-params.c
@@ -732,6 +732,78 @@ void mali_c55_params_write_config(struct
vb2_buffer_done(&buf->vb.vb2_buf, VB2_BUF_STATE_DONE);
}
+void mali_c55_params_init_isp_config(struct mali_c55 *mali_c55,
+ const struct v4l2_subdev_state *state)
+{
+ const struct mali_c55_isp_format_info *cfg;
+ const struct v4l2_mbus_framefmt *format;
+ const struct v4l2_rect *crop;
+
+ /* Apply input windowing */
+ crop = v4l2_subdev_state_get_crop(state, MALI_C55_ISP_PAD_SINK_VIDEO);
+ format = v4l2_subdev_state_get_format(state,
+ MALI_C55_ISP_PAD_SINK_VIDEO);
+ cfg = mali_c55_isp_get_mbus_config_by_code(format->code);
+
+ mali_c55_write(mali_c55, MALI_C55_REG_HC_START,
+ MALI_C55_HC_START(crop->left));
+ mali_c55_write(mali_c55, MALI_C55_REG_HC_SIZE,
+ MALI_C55_HC_SIZE(crop->width));
+ mali_c55_write(mali_c55, MALI_C55_REG_VC_START_SIZE,
+ MALI_C55_VC_START(crop->top) |
+ MALI_C55_VC_SIZE(crop->height));
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BASE_ADDR,
+ MALI_C55_REG_ACTIVE_WIDTH_MASK, format->width);
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BASE_ADDR,
+ MALI_C55_REG_ACTIVE_HEIGHT_MASK,
+ format->height << 16);
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BAYER_ORDER,
+ MALI_C55_BAYER_ORDER_MASK, cfg->order);
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_INPUT_WIDTH,
+ MALI_C55_INPUT_WIDTH_MASK,
+ MALI_C55_INPUT_WIDTH_20BIT);
+
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_ISP_RAW_BYPASS,
+ MALI_C55_ISP_RAW_BYPASS_BYPASS_MASK,
+ cfg->bypass ? MALI_C55_ISP_RAW_BYPASS_BYPASS_MASK :
+ 0x00);
+
+ /*
+ * Some features of the ISP need to be disabled by default and only
+ * enabled at the same time as they're configured by a parameters buffer
+ */
+
+ /* Bypass the sqrt and square compression and expansion modules */
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BYPASS_1,
+ MALI_C55_REG_BYPASS_1_FE_SQRT,
+ MALI_C55_REG_BYPASS_1_FE_SQRT);
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BYPASS_3,
+ MALI_C55_REG_BYPASS_3_SQUARE_BE,
+ MALI_C55_REG_BYPASS_3_SQUARE_BE);
+
+ /* Bypass the temper module */
+ mali_c55_ctx_write(mali_c55, MALI_C55_REG_BYPASS_2,
+ MALI_C55_REG_BYPASS_2_TEMPER);
+
+ /* Disable the temper module's DMA read/write */
+ mali_c55_ctx_write(mali_c55, MALI_C55_REG_TEMPER_DMA_IO, 0x0);
+
+ /* Bypass the colour noise reduction */
+ mali_c55_ctx_write(mali_c55, MALI_C55_REG_BYPASS_4,
+ MALI_C55_REG_BYPASS_4_CNR);
+
+ /* Disable the sinter module */
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_SINTER_CONFIG,
+ MALI_C55_SINTER_ENABLE_MASK, 0);
+
+ /* Disable the RGB Gamma module for each output */
+ mali_c55_ctx_write(mali_c55, MALI_C55_REG_FR_GAMMA_RGB_ENABLE, 0);
+ mali_c55_ctx_write(mali_c55, MALI_C55_REG_DS_GAMMA_RGB_ENABLE, 0);
+
+ /* Disable the colour correction matrix */
+ mali_c55_ctx_write(mali_c55, MALI_C55_REG_CCM_ENABLE, 0);
+}
+
void mali_c55_unregister_params(struct mali_c55 *mali_c55)
{
struct mali_c55_params *params = &mali_c55->params;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 015/201] media: mali-c55: Fix Iridix bypass macros
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (13 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 014/201] media: mali-c55: Initialize the ISP in enable_streams() Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 016/201] media: mali-c55: Fix wrong comment of ISP block types Greg Kroah-Hartman
` (191 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Scally,
Barnabás Pőcze, Jacopo Mondi, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Scally <dan.scally@ideasonboard.com>
commit db7faf488ecf846c46884310ff1bf28daf2ad39a upstream.
The Mali C55 Iridix block has a digital gain function and tone mapping
function, whose enablement is controlled by two different bits
in the BYPASS_3 register.
Unfortunately, the "Gain" and "Tonemap" bypass bit definitions are the
wrong way around. Swap them.
Cc: stable@vger.kernel.org
Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/arm/mali-c55/mali-c55-registers.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/media/platform/arm/mali-c55/mali-c55-registers.h
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-registers.h
@@ -128,8 +128,8 @@ enum mali_c55_interrupts {
#define MALI_C55_REG_BYPASS_3_SENSOR_OFFSET_PRE_SH BIT(1)
#define MALI_C55_REG_BYPASS_3_MESH_SHADING BIT(3)
#define MALI_C55_REG_BYPASS_3_WHITE_BALANCE BIT(4)
-#define MALI_C55_REG_BYPASS_3_IRIDIX BIT(5)
-#define MALI_C55_REG_BYPASS_3_IRIDIX_GAIN BIT(6)
+#define MALI_C55_REG_BYPASS_3_IRIDIX_GAIN BIT(5)
+#define MALI_C55_REG_BYPASS_3_IRIDIX BIT(6)
#define MALI_C55_REG_BYPASS_4 0x18ec0
#define MALI_C55_REG_BYPASS_4_DEMOSAIC_RGB BIT(1)
#define MALI_C55_REG_BYPASS_4_PF_CORRECTION BIT(3)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 016/201] media: mali-c55: Fix wrong comment of ISP block types
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (14 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 015/201] media: mali-c55: Fix Iridix bypass macros Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 16:52 ` Jacopo Mondi
2026-05-15 15:47 ` [PATCH 7.0 017/201] media: renesas: vsp1: Fix NULL pointer deref on module unload Greg Kroah-Hartman
` (190 subsequent siblings)
206 siblings, 1 reply; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Scally,
Barnabás Pőcze, Jacopo Mondi, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
commit df16624248296ce4e8890c7ddcc95f0ccb642bcd upstream.
Some bad copy&paste happened in the description of the ISP block types
and AWB_CONFIG got mixed up with SHADING_CONFIG.
Fix it by assigning to each block the correct type.
As only the comment is changed, there is no uABI breakage or regression.
Cc: stable@vger.kernel.org
Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/arm/mali-c55/mali-c55-params.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-params.c b/drivers/media/platform/arm/mali-c55/mali-c55-params.c
index be0e909bcf29..c03a6120ddbf 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-params.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-params.c
@@ -43,9 +43,9 @@
* @digital_gain: For header->type == MALI_C55_PARAM_BLOCK_DIGITAL_GAIN
* @awb_gains: For header->type == MALI_C55_PARAM_BLOCK_AWB_GAINS and
* header->type = MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP
- * @awb_config: For header->type == MALI_C55_PARAM_MESH_SHADING_CONFIG
- * @shading_config: For header->type == MALI_C55_PARAM_MESH_SHADING_SELECTION
- * @shading_selection: For header->type == MALI_C55_PARAM_BLOCK_SENSOR_OFFS
+ * @awb_config: For header->type == MALI_C55_PARAM_BLOCK_AWB_CONFIG
+ * @shading_config: For header->type == MALI_C55_PARAM_MESH_SHADING_CONFIG
+ * @shading_selection: For header->type == MALI_C55_PARAM_MESH_SHADING_SELECTION
* @data: Allows easy initialisation of a union variable with a
* pointer into a __u8 array.
*/
--
2.54.0
^ permalink raw reply related [flat|nested] 209+ messages in thread
* [PATCH 7.0 017/201] media: renesas: vsp1: Fix NULL pointer deref on module unload
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (15 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 016/201] media: mali-c55: Fix wrong comment of ISP block types Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 018/201] media: renesas: vin: Fix RAW8 (again) Greg Kroah-Hartman
` (189 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tomi Valkeinen, Kieran Bingham,
Jacopo Mondi, Sakari Ailus, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
commit 58b1e9664d8f74d55d8411cc7a7b275a76a6f24f upstream.
When unloading the module on gen 4, we hit a NULL pointer dereference.
This is caused by the cleanup code calling vsp1_drm_cleanup() where it
should be calling vsp1_vspx_cleanup().
Fix this by checking the IP version and calling the drm or vspx function
accordingly, the same way as the init code does.
Fixes: d06c1a9f348d ("media: vsp1: Add VSPX support")
Cc: stable@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/renesas/vsp1/vsp1_drv.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
@@ -240,8 +240,12 @@ static void vsp1_destroy_entities(struct
media_device_unregister(&vsp1->media_dev);
media_device_cleanup(&vsp1->media_dev);
- if (!vsp1->info->uapi)
- vsp1_drm_cleanup(vsp1);
+ if (!vsp1->info->uapi) {
+ if (vsp1->info->version == VI6_IP_VERSION_MODEL_VSPX_GEN4)
+ vsp1_vspx_cleanup(vsp1);
+ else
+ vsp1_drm_cleanup(vsp1);
+ }
}
static int vsp1_create_entities(struct vsp1_device *vsp1)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 018/201] media: renesas: vin: Fix RAW8 (again)
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (16 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 017/201] media: renesas: vsp1: Fix NULL pointer deref on module unload Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 019/201] media: i2c: ov8856: free control handler on error in ov8856_init_controls() Greg Kroah-Hartman
` (188 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tomi Valkeinen,
Niklas Söderlund, Sakari Ailus, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
commit 40c6da8a9c0f897f99a439330584d93ca7d41226 upstream.
Commit e7376745ad5c ("media: rcar-vin: Fix stride setting for RAW8
formats") removed dividing the stride by two for RAW8 formats. It is
unclear how this was tested, but in any of the recent tests this does
not seem to work and produces quite distorted images.
However, reverting the patch fixes the issues only partially. VNIS_REG
requires alignment to 16 bytes, and when dividing the stride by 2, in
some cases we end up with a non-aligned stride, producing a tilted
image. This issue has to be fixed in rvin_format_bytesperline() where we
do the alignment for bytesperline.
Adding back the stride division and increasing the alignment for RAW8
formats to 0x20 fixes the problems related to RAW8.
Fixes: e7376745ad5c ("media: rcar-vin: Fix stride setting for RAW8 formats")
Cc: stable@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 22 ++++++++++++++++++++
drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c | 12 ++++++++++
2 files changed, 34 insertions(+)
--- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
@@ -676,8 +676,30 @@ void rvin_crop_scale_comp(struct rvin_de
if (vin->scaler)
vin->scaler(vin);
+ /*
+ * VNIS_REG has four lowest bits always 0, i.e. the stride has to be
+ * aligned to 16 bytes. This is done in rvin_format_bytesperline().
+ */
+
fmt = rvin_format_from_pixel(vin, vin->format.pixelformat);
stride = vin->format.bytesperline / fmt->bpp;
+
+ /*
+ * RAW8 format bpp is 1, but the hardware process RAW8 format in 2 pixel
+ * units, so we need to divide the stride by 2.
+ */
+ switch (vin->format.pixelformat) {
+ case V4L2_PIX_FMT_SBGGR8:
+ case V4L2_PIX_FMT_SGBRG8:
+ case V4L2_PIX_FMT_SGRBG8:
+ case V4L2_PIX_FMT_SRGGB8:
+ case V4L2_PIX_FMT_GREY:
+ stride /= 2;
+ break;
+ default:
+ break;
+ }
+
rvin_write(vin, stride, VNIS_REG);
}
--- a/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
+++ b/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
@@ -155,6 +155,18 @@ static u32 rvin_format_bytesperline(stru
case V4L2_PIX_FMT_NV16:
align = 0x20;
break;
+ case V4L2_PIX_FMT_SBGGR8:
+ case V4L2_PIX_FMT_SGBRG8:
+ case V4L2_PIX_FMT_SGRBG8:
+ case V4L2_PIX_FMT_SRGGB8:
+ case V4L2_PIX_FMT_GREY:
+ /*
+ * RAW8 format bpp is 1, but the hardware process RAW8 format in
+ * 2 pixel units, and we need to align to 32 bytes. See
+ * rvin_crop_scale_comp().
+ */
+ align = 0x20;
+ break;
default:
align = 0x10;
break;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 019/201] media: i2c: ov8856: free control handler on error in ov8856_init_controls()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (17 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 018/201] media: renesas: vin: Fix RAW8 (again) Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 020/201] media: dt-bindings: rockchip,vdec: Add alternative reg-names order for RK35{76,88} Greg Kroah-Hartman
` (187 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexander Koskovich, Sakari Ailus,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Koskovich <akoskovich@pm.me>
commit f75e160745663ce9b13362ae6e90bd439c58df69 upstream.
The control handler wasn't freed if adding controls failed, add an error
exit label and convert the existing error return to use it.
Fixes: 879347f0c258 ("media: ov8856: Add support for OV8856 sensor")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/i2c/ov8856.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/media/i2c/ov8856.c
+++ b/drivers/media/i2c/ov8856.c
@@ -1951,12 +1951,18 @@ static int ov8856_init_controls(struct o
V4L2_CID_HFLIP, 0, 1, 1, 0);
v4l2_ctrl_new_std(ctrl_hdlr, &ov8856_ctrl_ops,
V4L2_CID_VFLIP, 0, 1, 1, 0);
- if (ctrl_hdlr->error)
- return ctrl_hdlr->error;
+ if (ctrl_hdlr->error) {
+ ret = ctrl_hdlr->error;
+ goto err_ctrl_handler_free;
+ }
ov8856->sd.ctrl_handler = ctrl_hdlr;
return 0;
+
+err_ctrl_handler_free:
+ v4l2_ctrl_handler_free(ctrl_hdlr);
+ return ret;
}
static void ov8856_update_pad_format(struct ov8856 *ov8856,
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 020/201] media: dt-bindings: rockchip,vdec: Add alternative reg-names order for RK35{76,88}
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (18 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 019/201] media: i2c: ov8856: free control handler on error in ov8856_init_controls() Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 021/201] media: dt-bindings: rockchip,vdec: Mark reg-names required " Greg Kroah-Hartman
` (186 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Nicolas Dufresne,
Krzysztof Kozlowski, Cristian Ciocaltea, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
commit 35c8178ed2bd9821a75a406d762b2f2e161f9c70 upstream.
With the introduction of the RK3588 SoC, and RK3576 afterwards, three
register blocks have been provided for the video decoder unit instead of
just one, which are further referenced in vendor's datasheet by 'link
table', 'function' and 'cache'. The former is present at the top of the
listing, starting at video decoder unit base address.
However, while documenting RK3588, the binding broke the convention
expecting the unit address to indicate the start of the primary register
range, i.e. the 'function' block got listed before the 'link' one.
Since the binding changes have been already released and a fix would
bring up an ABI break, mark the current 'reg-names' ordering as
deprecated and introduce an alternative 'link,function,cache' listing
which follows the address-based ordering according to the TRM.
Additionally, drop the 'reg' description items as the order is not fixed
anymore, while the information they offer is not very relevant anyway.
It's worth noting there are currently no (known) users impacted by these
binding changes, since the video decoder support for the aforementioned
SoCs in mainline driver and devicetrees hasn't been released yet - it
landed in v7.0-rc1 while all DTS updates resulting from this will be
handled before v7.0 is out.
Fixes: c6ffb7e1fb90 ("media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings")
Fixes: a5c4a6526476 ("media: dt-bindings: rockchip: Add RK3576 Video Decoder bindings")
Cc: stable@vger.kernel.org
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/devicetree/bindings/media/rockchip,vdec.yaml | 20 +++++++------
1 file changed, 12 insertions(+), 8 deletions(-)
--- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
@@ -28,16 +28,20 @@ properties:
reg:
minItems: 1
- items:
- - description: The function configuration registers base
- - description: The link table configuration registers base
- - description: The cache configuration registers base
+ maxItems: 3
reg-names:
- items:
- - const: function
- - const: link
- - const: cache
+ oneOf:
+ - items:
+ - const: link
+ - const: function
+ - const: cache
+ - items:
+ - const: function
+ - const: link
+ - const: cache
+ deprecated: true
+ description: Use link,function,cache block order instead.
interrupts:
maxItems: 1
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 021/201] media: dt-bindings: rockchip,vdec: Mark reg-names required for RK35{76,88}
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (19 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 020/201] media: dt-bindings: rockchip,vdec: Add alternative reg-names order for RK35{76,88} Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 022/201] media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init() Greg Kroah-Hartman
` (185 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Conor Dooley, Cristian Ciocaltea,
Conor Dooley, Nicolas Dufresne, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
commit a11db8d8b403eba1f82728f440727128e9997edd upstream.
The Rockchip Video Decoder driver expects reg-names to be mandatory for
RK3576 and RK3588 SoCs, however the binding does not currently require
the use of them.
As a consequence, driver would fail to probe with a hypothetical
devicetree that doesn't provide the reg-names for these SoCs, but which
is otherwise a perfectly valid DT from the binding perspective.
Update the binding and make reg-names required for the aforementioned
SoCs. While this change introduces an ABI break, the expected impact on
potential users would be minimal, if any, since the old SoCs are
unaffected, while the video decoder support for these newer variants in
mainline driver and devicetrees hasn't been released yet.
Moreover, this is also a prerequisite for a subsequent binding update
introducing an alternative reg-names order, according to the
address-based listing in the vendor's datasheet.
Reported-by: Conor Dooley <conor@kernel.org>
Closes: https://lore.kernel.org/all/20260227-urologist-gratitude-7984733f2d41@spud/
Fixes: c6ffb7e1fb90 ("media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings")
Fixes: a5c4a6526476 ("media: dt-bindings: rockchip: Add RK3576 Video Decoder bindings")
Cc: stable@vger.kernel.org
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/devicetree/bindings/media/rockchip,vdec.yaml | 2 ++
1 file changed, 2 insertions(+)
--- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
@@ -127,6 +127,8 @@ allOf:
minItems: 5
reset-names:
minItems: 5
+ required:
+ - reg-names
else:
properties:
reg:
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 022/201] media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (20 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 021/201] media: dt-bindings: rockchip,vdec: Mark reg-names required " Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 023/201] media: chips-media: wave5: add missing spinlock protection for send_eos_event() Greg Kroah-Hartman
` (184 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Haoxiang Li, Nicolas Dufresne,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
commit 95bd174a453f77b09ea66e1e22834680754ba501 upstream.
Add wave5_vdi_free_dma_memory() in the error path of
wave5_vdi_init() to prevent a potential memory leak.
Fixes: 45d1a2b93277 ("media: chips-media: wave5: Add vpuapi layer")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/chips-media/wave5/wave5-vdi.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/media/platform/chips-media/wave5/wave5-vdi.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vdi.c
@@ -49,6 +49,7 @@ int wave5_vdi_init(struct device *dev)
if (!PRODUCT_CODE_W_SERIES(vpu_dev->product_code)) {
WARN_ONCE(1, "unsupported product code: 0x%x\n", vpu_dev->product_code);
+ wave5_vdi_free_dma_memory(vpu_dev, &vpu_dev->common_mem);
return -EOPNOTSUPP;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 023/201] media: chips-media: wave5: add missing spinlock protection for send_eos_event()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (21 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 022/201] media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init() Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 024/201] media: chips-media: wave5: add missing spinlock protection for handle_dynamic_resolution_change() Greg Kroah-Hartman
` (183 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ziyi Guo, Nicolas Dufresne,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ziyi Guo <n7l8m4@u.northwestern.edu>
commit f48050436746be75227fbc90066a8658cbe94d17 upstream.
Add spin_lock_irqsave()/spin_unlock_irqrestore() around send_eos_event()
calls in the VB2 buffer queue and streamoff callbacks to fix the missing
lock protection.
wave5_vpu_dec_buf_queue_dst() and streamoff_output() call send_eos_event()
without holding inst->state_spinlock. However, send_eos_event() has
lockdep_assert_held(&inst->state_spinlock) indicating that callers must
hold this lock.
Other callers of send_eos_event() properly acquire the spinlock:
- wave5_vpu_dec_finish_decode() acquires lock at line 431
- wave5_vpu_dec_encoder_cmd() acquires lock at line 821
- wave5_vpu_dec_device_run() acquires lock at line 1592
Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Fixes: 9707a6254a8a6b ("media: chips-media: wave5: Add the v4l2 layer")
Cc: stable@vger.kernel.org
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
@@ -1303,13 +1303,17 @@ static void wave5_vpu_dec_buf_queue_dst(
if (vb2_is_streaming(vb->vb2_queue) && v4l2_m2m_dst_buf_is_last(m2m_ctx)) {
unsigned int i;
+ unsigned long flags;
for (i = 0; i < vb->num_planes; i++)
vb2_set_plane_payload(vb, i, 0);
vbuf->field = V4L2_FIELD_NONE;
+ spin_lock_irqsave(&inst->state_spinlock, flags);
send_eos_event(inst);
+ spin_unlock_irqrestore(&inst->state_spinlock, flags);
+
v4l2_m2m_last_buffer_done(m2m_ctx, vbuf);
} else {
v4l2_m2m_buf_queue(m2m_ctx, vbuf);
@@ -1462,8 +1466,13 @@ static int streamoff_output(struct vb2_q
inst->codec_info->dec_info.stream_rd_ptr = new_rd_ptr;
inst->codec_info->dec_info.stream_wr_ptr = new_rd_ptr;
- if (v4l2_m2m_has_stopped(m2m_ctx))
+ if (v4l2_m2m_has_stopped(m2m_ctx)) {
+ unsigned long flags;
+
+ spin_lock_irqsave(&inst->state_spinlock, flags);
send_eos_event(inst);
+ spin_unlock_irqrestore(&inst->state_spinlock, flags);
+ }
/* streamoff on output cancels any draining operation */
inst->eos = false;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 024/201] media: chips-media: wave5: add missing spinlock protection for handle_dynamic_resolution_change()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (22 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 023/201] media: chips-media: wave5: add missing spinlock protection for send_eos_event() Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 025/201] arm64: dts: freescale: imx95-toradex-smarc: fix PMIC_SD2_VSEL label position Greg Kroah-Hartman
` (182 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ziyi Guo, Nicolas Dufresne,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ziyi Guo <n7l8m4@u.northwestern.edu>
commit cb8bdd3ffca280d014311ab395651d33f58a8708 upstream.
Add spin_lock_irqsave()/spin_unlock_irqrestore() around the
handle_dynamic_resolution_change() call in initialize_sequence() to fix
the missing lock protection.
initialize_sequence() calls handle_dynamic_resolution_change() without
holding inst->state_spinlock. However, handle_dynamic_resolution_change()
has lockdep_assert_held(&inst->state_spinlock) indicating that callers
must hold this lock.
Other callers of handle_dynamic_resolution_change() properly acquire the
spinlock:
- wave5_vpu_dec_finish_decode()
- wave5_vpu_dec_device_run()
Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Fixes: 9707a6254a8a6b ("media: chips-media: wave5: Add the v4l2 layer")
Cc: stable@vger.kernel.org
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
@@ -1593,6 +1593,7 @@ static int initialize_sequence(struct vp
{
struct dec_initial_info initial_info;
int ret = 0;
+ unsigned long flags;
memset(&initial_info, 0, sizeof(struct dec_initial_info));
@@ -1614,7 +1615,9 @@ static int initialize_sequence(struct vp
return ret;
}
+ spin_lock_irqsave(&inst->state_spinlock, flags);
handle_dynamic_resolution_change(inst);
+ spin_unlock_irqrestore(&inst->state_spinlock, flags);
return 0;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 025/201] arm64: dts: freescale: imx95-toradex-smarc: fix PMIC_SD2_VSEL label position
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (23 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 024/201] media: chips-media: wave5: add missing spinlock protection for handle_dynamic_resolution_change() Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 026/201] drm/gpusvm: Allow device pages to be mapped in mixed mappings after system pages Greg Kroah-Hartman
` (181 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Emanuele Ghidoli, Frank Li,
Francesco Dolcini
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
commit 0c9d379d436e119285ef39a4f96b012f576ed74c upstream.
Fix the PMIC_SD2_VSEL gpio-line-name position. It should be on line 19
of gpio3, not line 20.
Fixes: 90bbe88e0ea6 ("arm64: dts: freescale: add Toradex SMARC iMX95")
Cc: stable@vger.kernel.org
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi b/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi
index 5932ba238a8a..f64c05dc50f8 100644
--- a/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi
@@ -262,7 +262,6 @@ &gpio3 {
"",
"",
"",
- "",
"PMIC_SD2_VSEL";
status = "okay";
};
--
2.54.0
^ permalink raw reply related [flat|nested] 209+ messages in thread
* [PATCH 7.0 026/201] drm/gpusvm: Allow device pages to be mapped in mixed mappings after system pages
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (24 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 025/201] arm64: dts: freescale: imx95-toradex-smarc: fix PMIC_SD2_VSEL label position Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 027/201] drm/gpusvm: Force unmapping on error in drm_gpusvm_get_pages Greg Kroah-Hartman
` (180 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Matthew Brost, Francois Dugast
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Brost <matthew.brost@intel.com>
commit ec49857ad181f2a68a3bea15422f2936ff366d47 upstream.
The current code rejects device mappings whenever system pages have
already been encountered. This is not the intended behavior when
allow_mixed is set.
Relax the restriction by permitting a single pagemap to be selected when
allow_mixed is enabled, even if system pages were found earlier.
Fixes: bce13d6ecd6c ("drm/gpusvm, drm/xe: Allow mixed mappings for userptr")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
Link: https://patch.msgid.link/20260130194928.3255613-3-matthew.brost@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/drm_gpusvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/drm_gpusvm.c
+++ b/drivers/gpu/drm/drm_gpusvm.c
@@ -1495,7 +1495,7 @@ map_pages:
}
zdd = page->zone_device_data;
if (pagemap != page_pgmap(page)) {
- if (i > 0) {
+ if (pagemap) {
err = -EOPNOTSUPP;
goto err_unmap;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 027/201] drm/gpusvm: Force unmapping on error in drm_gpusvm_get_pages
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (25 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 026/201] drm/gpusvm: Allow device pages to be mapped in mixed mappings after system pages Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 028/201] spi: bcm63xx: fix controller deregistration Greg Kroah-Hartman
` (179 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Matthew Brost, Francois Dugast
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Brost <matthew.brost@intel.com>
commit 556dba95473900073a6c03121361c11f646dc551 upstream.
drm_gpusvm_get_pages() only sets the local flags prior to committing the
pages. If an error occurs mid-mapping, has_dma_mapping will be clear,
causing the unmap function to skip unmapping pages that were
successfully mapped before the error. Fix this by forcibly setting
has_dma_mapping in the error path to ensure all previously mapped pages
are properly unmapped.
Fixes: 99624bdff867 ("drm/gpusvm: Add support for GPU Shared Virtual Memory")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
Link: https://patch.msgid.link/20260130194928.3255613-2-matthew.brost@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/drm_gpusvm.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/gpu/drm/drm_gpusvm.c
+++ b/drivers/gpu/drm/drm_gpusvm.c
@@ -1572,6 +1572,7 @@ set_seqno:
return 0;
err_unmap:
+ svm_pages->flags.has_dma_mapping = true;
__drm_gpusvm_unmap_pages(gpusvm, svm_pages, num_dma_mapped);
drm_gpusvm_notifier_unlock(gpusvm);
err_free:
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 028/201] spi: bcm63xx: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (26 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 027/201] drm/gpusvm: Force unmapping on error in drm_gpusvm_get_pages Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 029/201] spi: atmel: " Greg Kroah-Hartman
` (178 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Florian Fainelli, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit c39e65a4e3b8e764efed0b2f5152a1a8547b80fd upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: b42dfed83d95 ("spi: add Broadcom BCM63xx SPI controller driver")
Cc: stable@vger.kernel.org # 3.4
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-6-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-bcm63xx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -602,7 +602,7 @@ static int bcm63xx_spi_probe(struct plat
goto out_clk_disable;
/* register and we are done */
- ret = devm_spi_register_controller(dev, host);
+ ret = spi_register_controller(host);
if (ret) {
dev_err(dev, "spi register failed\n");
goto out_clk_disable;
@@ -625,11 +625,17 @@ static void bcm63xx_spi_remove(struct pl
struct spi_controller *host = platform_get_drvdata(pdev);
struct bcm63xx_spi *bs = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
/* reset spi block */
bcm_spi_writeb(bs, 0, SPI_INT_MASK);
/* HW shutdown */
clk_disable_unprepare(bs->clk);
+
+ spi_controller_put(host);
}
static int bcm63xx_spi_suspend(struct device *dev)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 029/201] spi: atmel: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (27 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 028/201] spi: bcm63xx: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 030/201] arm64: dts: lx2160a-cex7/lx2162a-sr-som: fix usd-cd & gpio pinmux Greg Kroah-Hartman
` (177 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 8d4de97e83520be89d0ff40610ca633b3963a7de upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: 754ce4f29937 ("[PATCH] SPI: atmel_spi driver")
Cc: stable@vger.kernel.org # 2.6.21
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-atmel.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1654,7 +1654,7 @@ static int atmel_spi_probe(struct platfo
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret)
goto out_free_dma;
@@ -1688,8 +1688,12 @@ static void atmel_spi_remove(struct plat
struct spi_controller *host = platform_get_drvdata(pdev);
struct atmel_spi *as = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
pm_runtime_get_sync(&pdev->dev);
+ spi_unregister_controller(host);
+
/* reset the hardware and block queue progress */
if (as->use_dma) {
atmel_spi_stop_dma(host);
@@ -1716,6 +1720,8 @@ static void atmel_spi_remove(struct plat
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+
+ spi_controller_put(host);
}
static int atmel_spi_runtime_suspend(struct device *dev)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 030/201] arm64: dts: lx2160a-cex7/lx2162a-sr-som: fix usd-cd & gpio pinmux
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (28 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 029/201] spi: atmel: " Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 031/201] staging: media: atomisp: Disallow all private IOCTLs Greg Kroah-Hartman
` (176 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Josua Mayer, Frank Li
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josua Mayer <josua@solid-run.com>
commit 70008aee892bbb5c2969bbe9e5778fc081b14bd2 upstream.
Commit 8a1365c7bbc1 ("arm64: dts: lx2160a: add pinmux and i2c gpio to
support bus recovery") introduced pinmux nodes for lx2160 i2c
interfaces, allowing runtime change between i2c and gpio functions
implementing bus recovery.
However, the dynamic configuration area (overwrite MUX) used by the
pinctrl-single driver initially reads as zero and does not reflect the
actual hardware state set by the Reset Configuration Word (RCW) at
power-on.
Because multiple groups of pins are configured from a single 32-bit
register, the first write from the pinctrl driver unintentionally clears
all other bits to zero.
For example, on the LX2162A Clearfog, RCWSR12 is initialized to
0x08000006. When any i2c pinmux is applied, it clears all other fields.
This inadvertently disables SD card-detect (IIC2_PMUX) and some GPIOs
(SDHC1_DIR_PMUX):
LX2162-CF RCWSR12: 0b0000100000000000 0000000000000110
IIC2_PMUX ||| ||| || | ||| |||XXX : I2C/GPIO/CD-WP
SDHC1_DIR_PMUX XXX ||| || | ||| ||| : SDHC/GPIO/SPI
Reverting the commit in question was considered but bus recovery is an
important feature.
Instead add pinmux nodes for those pins that were unintentionally
reconfigured on SolidRun LX2160A Clearfog-CX and LX2162A Clearfog
boards.
Fixes: 8a1365c7bbc1 ("arm64: dts: lx2160a: add pinmux and i2c gpio to support bus recovery")
Cc: stable@vger.kernel.org
Signed-off-by: Josua Mayer <josua@solid-run.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi | 7 +++
arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi | 2 +
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 24 ++++++++++++
arch/arm64/boot/dts/freescale/fsl-lx2162a-clearfog.dts | 2 +
arch/arm64/boot/dts/freescale/fsl-lx2162a-sr-som.dtsi | 7 +++
5 files changed, 42 insertions(+)
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
@@ -162,6 +162,8 @@
};
&fspi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&fspi_data74_pins>, <&fspi_data30_pins>, <&fspi_dqs_sck_cs10_pins>;
status = "okay";
flash@0 {
@@ -177,6 +179,11 @@
};
};
+&pinmux_i2crv {
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio0_14_12_pins>;
+};
+
&usb0 {
status = "okay";
};
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
@@ -89,6 +89,8 @@
};
&esdhc0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&esdhc0_cd_wp_pins>, <&esdhc0_cmd_data30_clk_vsel_pins>;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
@@ -1721,6 +1721,10 @@
pinctrl-single,bits = <0x0 0x1 0x7>;
};
+ esdhc0_cd_wp_pins: iic2-sdhc-pins {
+ pinctrl-single,bits = <0x0 0x6 0x7>;
+ };
+
i2c2_scl: i2c2-scl-pins {
pinctrl-single,bits = <0x0 0 (0x7 << 3)>;
};
@@ -1753,6 +1757,26 @@
pinctrl-single,bits = <0x0 (0x1 << 12) (0x7 << 12)>;
};
+ fspi_data74_pins: xspi1-data74-pins {
+ pinctrl-single,bits = <0x0 0x0 (0x7 << 15)>;
+ };
+
+ fspi_data30_pins: xspi1-data30-pins {
+ pinctrl-single,bits = <0x0 0x0 (0x7 << 18)>;
+ };
+
+ fspi_dqs_sck_cs10_pins: xspi1-base-pins {
+ pinctrl-single,bits = <0x0 0x0 (0x7 << 21)>;
+ };
+
+ esdhc0_cmd_data30_clk_vsel_pins: sdhc1-base-sdhc-vsel-pins {
+ pinctrl-single,bits = <0x0 0x0 (0x7 << 24)>;
+ };
+
+ gpio0_14_12_pins: sdhc1-dir-gpio-pins {
+ pinctrl-single,bits = <0x0 (0x1 << 27) (0x7 << 27)>;
+ };
+
i2c6_scl: i2c6-scl-pins {
pinctrl-single,bits = <0x4 0x2 0x7>;
};
--- a/arch/arm64/boot/dts/freescale/fsl-lx2162a-clearfog.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2162a-clearfog.dts
@@ -223,6 +223,8 @@
};
&esdhc0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&esdhc0_cd_wp_pins>, <&esdhc0_cmd_data30_clk_vsel_pins>;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
--- a/arch/arm64/boot/dts/freescale/fsl-lx2162a-sr-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2162a-sr-som.dtsi
@@ -30,6 +30,8 @@
};
&fspi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&fspi_data74_pins>, <&fspi_data30_pins>, <&fspi_dqs_sck_cs10_pins>;
status = "okay";
flash@0 {
@@ -80,3 +82,8 @@
reg = <0x6f>;
};
};
+
+&pinmux_i2crv {
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio0_14_12_pins>;
+};
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 031/201] staging: media: atomisp: Disallow all private IOCTLs
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (29 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 030/201] arm64: dts: lx2160a-cex7/lx2162a-sr-som: fix usd-cd & gpio pinmux Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 032/201] regulator: mt6357: fix OF node reference imbalance Greg Kroah-Hartman
` (175 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Soufiane Dani, Sakari Ailus,
Mauro Carvalho Chehab
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sakari Ailus <sakari.ailus@linux.intel.com>
commit 2b7eb2c5dc72f0fc954ac4aa155f9e285e937f7c upstream.
Disallow all private IOCTLs. These aren't quite as safe as one could
assume of IOCTL handlers; disable them for now. Instead of removing the
code, return in the beginning of the function if cmd is non-zero in order
to keep static checkers happy.
Reported-by: Soufiane Dani <soufianeda@tutanota.com>
Closes: https://lore.kernel.org/linux-staging/20260210-atomisp-fix-v1-1-024429cbff31@tutanota.com/
Cc: stable@vger.kernel.org
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Fixes: ad85094b293e ("Revert "media: staging: atomisp: Remove driver"")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
@@ -1356,6 +1356,10 @@ static int atomisp_s_parm(struct file *f
static long atomisp_vidioc_default(struct file *file, void *fh,
bool valid_prio, unsigned int cmd, void *arg)
{
+ /* Disable all private IOCTLs for now! */
+ if (cmd)
+ return -EINVAL;
+
struct video_device *vdev = video_devdata(file);
struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
int err;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 032/201] regulator: mt6357: fix OF node reference imbalance
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (30 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 031/201] staging: media: atomisp: Disallow all private IOCTLs Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 033/201] spi: st-ssc4: fix controller deregistration Greg Kroah-Hartman
` (174 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 2f38e96c273e15f5e9f5d1fc2c0cbba703751602 upstream.
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: dafc7cde23dc ("regulator: add mt6357 regulator")
Cc: stable@vger.kernel.org # 6.2
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/regulator/mt6357-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/regulator/mt6357-regulator.c
+++ b/drivers/regulator/mt6357-regulator.c
@@ -410,7 +410,7 @@ static int mt6357_regulator_probe(struct
struct regulator_dev *rdev;
int i;
- pdev->dev.of_node = pdev->dev.parent->of_node;
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
for (i = 0; i < MT6357_MAX_REGULATOR; i++) {
config.dev = &pdev->dev;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 033/201] spi: st-ssc4: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (31 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 032/201] regulator: mt6357: fix OF node reference imbalance Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 034/201] regulator: max77650: fix OF node reference imbalance Greg Kroah-Hartman
` (173 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Lee Jones, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 19857374010d06ca6a2f7c2c53464122eb804df0 upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: 9e862375c542 ("spi: Add new driver for STMicroelectronics' SPI Controller")
Cc: stable@vger.kernel.org # 4.0
Cc: Lee Jones <lee@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-18-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-st-ssc4.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-st-ssc4.c
+++ b/drivers/spi/spi-st-ssc4.c
@@ -349,7 +349,7 @@ static int spi_st_probe(struct platform_
platform_set_drvdata(pdev, host);
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret) {
dev_err(&pdev->dev, "Failed to register host\n");
goto rpm_disable;
@@ -371,10 +371,16 @@ static void spi_st_remove(struct platfor
struct spi_controller *host = platform_get_drvdata(pdev);
struct spi_st *spi_st = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
pm_runtime_disable(&pdev->dev);
clk_disable_unprepare(spi_st->clk);
+ spi_controller_put(host);
+
pinctrl_pm_select_sleep_state(&pdev->dev);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 034/201] regulator: max77650: fix OF node reference imbalance
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (32 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 033/201] spi: st-ssc4: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 035/201] media: ti: vpe: Add missing v4l2_device_unregister in vip_remove() Greg Kroah-Hartman
` (172 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bartosz Golaszewski, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 2edaf5f7ada0ab5c9ec1f0836bd19779a8d85262 upstream.
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: bcc61f1c44fd ("regulator: max77650: add regulator support")
Cc: stable@vger.kernel.org # 5.1
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/regulator/max77650-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/regulator/max77650-regulator.c
+++ b/drivers/regulator/max77650-regulator.c
@@ -337,7 +337,7 @@ static int max77650_regulator_probe(stru
parent = dev->parent;
if (!dev->of_node)
- dev->of_node = parent->of_node;
+ device_set_of_node_from_dev(dev, parent);
rdescs = devm_kcalloc(dev, MAX77650_REGULATOR_NUM_REGULATORS,
sizeof(*rdescs), GFP_KERNEL);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 035/201] media: ti: vpe: Add missing v4l2_device_unregister in vip_remove()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (33 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 034/201] regulator: max77650: fix OF node reference imbalance Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 036/201] media: rc: xbox_remote: heed DMA restrictions Greg Kroah-Hartman
` (171 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Felix Gu, Yemike Abhilash Chandra,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Gu <ustc.gu@gmail.com>
commit f3e969a5b54304cab6891a58d9dd8b29072bde4c upstream.
The v4l2_device is registered during probe but was not being unregistered
during remove. Add the missing v4l2_device_unregister() call to properly
clean up resources.
Fixes: fc2873aa4a21 ("media: ti: vpe: Add the VIP driver")
Cc: stable@vger.kernel.org
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/ti/vpe/vip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/ti/vpe/vip.c b/drivers/media/platform/ti/vpe/vip.c
index a4b616a5ece7..0e91e87bda9b 100644
--- a/drivers/media/platform/ti/vpe/vip.c
+++ b/drivers/media/platform/ti/vpe/vip.c
@@ -3641,6 +3641,7 @@ static void vip_remove(struct platform_device *pdev)
}
v4l2_ctrl_handler_free(&shared->ctrl_handler);
+ v4l2_device_unregister(&shared->v4l2_dev);
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
--
2.54.0
^ permalink raw reply related [flat|nested] 209+ messages in thread
* [PATCH 7.0 036/201] media: rc: xbox_remote: heed DMA restrictions
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (34 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 035/201] media: ti: vpe: Add missing v4l2_device_unregister in vip_remove() Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 037/201] media: rc: streamzap: Error handling in probe Greg Kroah-Hartman
` (170 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Oliver Neukum, Sean Young,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <oneukum@suse.com>
commit e280d1e5e3f2595bbb43fe6e1bce00c59a43c0ff upstream.
The buffer for IO must not be part of the device structure
because that violates the DMA coherency rules.
Fixes: 02d32bdad3123 ("media: rc: add driver for Xbox DVD Movie Playback Kit")
Cc: stable@vger.kernel.org
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/rc/xbox_remote.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/drivers/media/rc/xbox_remote.c
+++ b/drivers/media/rc/xbox_remote.c
@@ -55,7 +55,7 @@ struct xbox_remote {
struct usb_interface *interface;
struct urb *irq_urb;
- unsigned char inbuf[DATA_BUFSIZE] __aligned(sizeof(u16));
+ u8 *inbuf;
char rc_name[NAME_BUFSIZE];
char rc_phys[NAME_BUFSIZE];
@@ -218,6 +218,10 @@ static int xbox_remote_probe(struct usb_
if (!xbox_remote || !rc_dev)
goto exit_free_dev_rdev;
+ xbox_remote->inbuf = kzalloc(DATA_BUFSIZE, GFP_KERNEL);
+ if (!xbox_remote->inbuf)
+ goto exit_free_inbuf;
+
/* Allocate URB buffer */
xbox_remote->irq_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!xbox_remote->irq_urb)
@@ -262,6 +266,8 @@ exit_kill_urbs:
usb_kill_urb(xbox_remote->irq_urb);
exit_free_buffers:
usb_free_urb(xbox_remote->irq_urb);
+exit_free_inbuf:
+ kfree(xbox_remote->inbuf);
exit_free_dev_rdev:
rc_free_device(rc_dev);
kfree(xbox_remote);
@@ -286,6 +292,7 @@ static void xbox_remote_disconnect(struc
usb_kill_urb(xbox_remote->irq_urb);
rc_unregister_device(xbox_remote->rdev);
usb_free_urb(xbox_remote->irq_urb);
+ kfree(xbox_remote->inbuf);
kfree(xbox_remote);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 037/201] media: rc: streamzap: Error handling in probe
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (35 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 036/201] media: rc: xbox_remote: heed DMA restrictions Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 038/201] media: i2c: ov5647: Fix runtime PM refcount leak in s_ctrl Greg Kroah-Hartman
` (169 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Oliver Neukum, Sean Young,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <oneukum@suse.com>
commit 42844992664f03ef9f930e64f7370fa481e9c267 upstream.
If submitting the URB fails, the device will be unusable.
Probe() must fail.
Fixes: 7a569f524dd36 ("V4L/DVB: IR/streamzap: functional in-kernel decoding")
Cc: stable@vger.kernel.org
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/rc/streamzap.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--- a/drivers/media/rc/streamzap.c
+++ b/drivers/media/rc/streamzap.c
@@ -219,9 +219,8 @@ static void streamzap_callback(struct ur
case -ESHUTDOWN:
/*
* this urb is terminated, clean up.
- * sz might already be invalid at this point
*/
- dev_err(sz->dev, "urb terminated, status: %d\n", urb->status);
+ dev_dbg(sz->dev, "urb terminated, status: %d\n", urb->status);
return;
default:
break;
@@ -358,11 +357,16 @@ static int streamzap_probe(struct usb_in
usb_set_intfdata(intf, sz);
- if (usb_submit_urb(sz->urb_in, GFP_ATOMIC))
+ retval = usb_submit_urb(sz->urb_in, GFP_ATOMIC);
+ if (retval < 0) {
dev_err(sz->dev, "urb submit failed\n");
+ goto rc_submit_fail;
+ }
return 0;
-
+rc_submit_fail:
+ rc_free_device(sz->rdev);
+ usb_set_intfdata(intf, NULL);
rc_dev_fail:
usb_free_urb(sz->urb_in);
free_buf_in:
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 038/201] media: i2c: ov5647: Fix runtime PM refcount leak in s_ctrl
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (36 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 037/201] media: rc: streamzap: Error handling in probe Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 039/201] media: i2c: imx283: Enter full standby when stopping streaming Greg Kroah-Hartman
` (168 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xiaolei Wang, Tarang Raval,
Jacopo Mondi, Sakari Ailus, Mauro Carvalho Chehab
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiaolei Wang <xiaolei.wang@windriver.com>
commit f11ae9c04f8368a3b5a0280ef595198dace1c983 upstream.
Three control cases (AUTOGAIN, EXPOSURE_AUTO, ANALOGUE_GAIN) directly
return without calling pm_runtime_put(), causing runtime PM reference
count leaks.
Change these cases from 'return' to 'ret = ... break' pattern to ensure
pm_runtime_put() is always called before function exit.
Fixes: 4f66f36388d5 ("media: i2c: ov5647: Convert to CCI register access helpers")
Cc: stable@vger.kernel.org
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Reviewed-by: Tarang Raval <tarang.raval@siliconsignals.io>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/i2c/ov5647.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
index 6a46ef7233ac..db9bd2892140 100644
--- a/drivers/media/i2c/ov5647.c
+++ b/drivers/media/i2c/ov5647.c
@@ -967,21 +967,21 @@ static int ov5647_s_ctrl(struct v4l2_ctrl *ctrl)
break;
case V4L2_CID_AUTOGAIN:
/* Non-zero turns on AGC by clearing bit 1.*/
- return cci_update_bits(sensor->regmap, OV5647_REG_AEC_AGC, BIT(1),
- ctrl->val ? 0 : BIT(1), NULL);
+ ret = cci_update_bits(sensor->regmap, OV5647_REG_AEC_AGC, BIT(1),
+ ctrl->val ? 0 : BIT(1), NULL);
break;
case V4L2_CID_EXPOSURE_AUTO:
/*
* Everything except V4L2_EXPOSURE_MANUAL turns on AEC by
* clearing bit 0.
*/
- return cci_update_bits(sensor->regmap, OV5647_REG_AEC_AGC, BIT(0),
- ctrl->val == V4L2_EXPOSURE_MANUAL ? BIT(0) : 0, NULL);
+ ret = cci_update_bits(sensor->regmap, OV5647_REG_AEC_AGC, BIT(0),
+ ctrl->val == V4L2_EXPOSURE_MANUAL ? BIT(0) : 0, NULL);
break;
case V4L2_CID_ANALOGUE_GAIN:
/* 10 bits of gain, 2 in the high register. */
- return cci_write(sensor->regmap, OV5647_REG_GAIN,
- ctrl->val & 0x3ff, NULL);
+ ret = cci_write(sensor->regmap, OV5647_REG_GAIN,
+ ctrl->val & 0x3ff, NULL);
break;
case V4L2_CID_EXPOSURE:
/*
--
2.54.0
^ permalink raw reply related [flat|nested] 209+ messages in thread
* [PATCH 7.0 039/201] media: i2c: imx283: Enter full standby when stopping streaming
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (37 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 038/201] media: i2c: ov5647: Fix runtime PM refcount leak in s_ctrl Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 040/201] regulator: bq257xx: fix OF node reference imbalance Greg Kroah-Hartman
` (167 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jai Luthra, Kieran Bingham,
Sakari Ailus, Mauro Carvalho Chehab
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jai Luthra <jai.luthra@ideasonboard.com>
commit bce1349dbf6348ddee47308e2ed08878356de317 upstream.
Use IMX283_STANDBY (bit 0) instead of IMX283_STBLOGIC (bit 1) when
stopping streaming. STBLOGIC only puts the sensor logic into standby but
leaves the MIPI interface (along with other components) in an
indeterminate state.
This (presumably) causes the CSI receiver (e.g. Raspberry Pi's CFE) to
miss the LP-11 to HS transition when streaming restarts, resulting in a
hang of 10+ seconds. The issue is most visible when immediately
restarting a full-resolution stream after stopping a 3x3 binned one, so
that runtime suspend hasn't yet been triggered.
Writing IMX283_STANDBY puts the entire sensor into standby. The
imx283_standby_cancel() sequence already handles the full wakeup from
this suspended state.
Cc: stable@vger.kernel.org
Link: https://github.com/raspberrypi/linux/issues/7153
Link: https://github.com/will127534/OneInchEye/issues/12
Fixes: ccb4eb4496fa ("media: i2c: Add imx283 camera sensor driver")
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/i2c/imx283.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/i2c/imx283.c
+++ b/drivers/media/i2c/imx283.c
@@ -1158,7 +1158,7 @@ static int imx283_disable_streams(struct
if (pad != IMAGE_PAD)
return -EINVAL;
- ret = cci_write(imx283->cci, IMX283_REG_STANDBY, IMX283_STBLOGIC, NULL);
+ ret = cci_write(imx283->cci, IMX283_REG_STANDBY, IMX283_STANDBY, NULL);
if (ret)
dev_err(imx283->dev, "Failed to stop stream\n");
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 040/201] regulator: bq257xx: fix OF node reference imbalance
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (38 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 039/201] media: i2c: imx283: Enter full standby when stopping streaming Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 041/201] regulator: rk808: " Greg Kroah-Hartman
` (166 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chris Morgan, Douglas Anderson,
Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 7ea07bc030d8d6395524dec22ff3267441a28c0d upstream.
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: 981dd162b635 ("regulator: bq257xx: Add bq257xx boost regulator driver")
Cc: stable@vger.kernel.org # 6.18
Cc: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/regulator/bq257xx-regulator.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/regulator/bq257xx-regulator.c
+++ b/drivers/regulator/bq257xx-regulator.c
@@ -142,8 +142,7 @@ static int bq257xx_regulator_probe(struc
struct device_node *np = dev->of_node;
struct regulator_config cfg = {};
- pdev->dev.of_node = pdev->dev.parent->of_node;
- pdev->dev.of_node_reused = true;
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
pdata = devm_kzalloc(&pdev->dev, sizeof(struct bq257xx_reg_data), GFP_KERNEL);
if (!pdata)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 041/201] regulator: rk808: fix OF node reference imbalance
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (39 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 040/201] regulator: bq257xx: fix OF node reference imbalance Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 042/201] media: videobuf2: Set vma_flags in vb2_dma_sg_mmap Greg Kroah-Hartman
` (165 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sebastian Reichel, Douglas Anderson,
Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 65290b24d8a5f0b8cd065201e653db824c4a4da6 upstream.
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: 647e57351f8e ("regulator: rk808: reduce 'struct rk808' usage")
Cc: stable@vger.kernel.org # 6.2
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/regulator/rk808-regulator.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/regulator/rk808-regulator.c
+++ b/drivers/regulator/rk808-regulator.c
@@ -2114,8 +2114,7 @@ static int rk808_regulator_probe(struct
struct regmap *regmap;
int ret, i, nregulators;
- pdev->dev.of_node = pdev->dev.parent->of_node;
- pdev->dev.of_node_reused = true;
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
regmap = dev_get_regmap(pdev->dev.parent, NULL);
if (!regmap)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 042/201] media: videobuf2: Set vma_flags in vb2_dma_sg_mmap
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (40 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 041/201] regulator: rk808: " Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 043/201] media: rockchip: rkcif: Add missing MUST_CONNECT flag to pads Greg Kroah-Hartman
` (164 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Janne Grunau, Marek Szyprowski,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Janne Grunau <j@jannau.net>
commit 7254b31a13aaa0c2c0f9ffbc335b718656117ff4 upstream.
vb2_dma_contig sets VMA flags VM_DONTEXPAND and VM_DONTDUMP and I do not
see a reason why vb2_dma_sg should behave differently. This avoids
hitting `WARN_ON(!(vma->vm_flags & VM_DONTEXPAND));` in
drm_gem_mmap_obj() during mmap() of an imported dma-buf from the out of
tree Apple ISP camera capture driver which uses vb2_dma_sg_memops.
gst-launch-1.0 v4l2src ! gtk4paintablesink
[ 38.201528] ------------[ cut here ]------------
[ 38.202135] WARNING: CPU: 7 PID: 2362 at drivers/gpu/drm/drm_gem.c:1144 drm_gem_mmap_obj+0x1f8/0x210
[ 38.203278] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer
snd_seq snd_seq_device uinput nf_conntrack_netbios_ns
nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib
nft_reject_inet nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat
nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables qrtr bnep
nls_ascii i2c_dev loop fuse dm_multipath nfnetlink brcmfmac_wcc
hid_magicmouse hci_bcm4377 brcmfmac brcmutil bluetooth ecdh_generic
cfg80211 ecc btrfs xor xor_neon rfkill hid_apple raid6_pq joydev
aop_als apple_nvmem_spmi industrialio snd_soc_aop apple_z2
snd_soc_cs42l84 tps6598x snd_soc_tas2764 macsmc_reboot spi_nor
macsmc_hwmon rtc_macsmc gpio_macsmc macsmc_power regmap_spmi
macsmc_input dockchannel_hid panel_summit appledrm nvme_apple dwc3
snd_soc_macaudio drm_client_lib nvme_core phy_apple_atc hwmon
apple_sart apple_dockchannel macsmc apple_rtkit_helper
spmi_apple_controller aop apple_wdt mfd_core nvmem_apple_efuses
pinctrl_apple_gpio apple_isp apple_dcp videobuf2_dma_sg mux_core
spi_apple
[ 38.203300] videobuf2_memops i2c_pasemi_platform snd_soc_apple_mca videobuf2_v4l2 videodev clk_apple_nco videobuf2_common snd_pcm_dmaengine adpdrm asahi apple_admac adpdrm_mipi drm_dma_helper pwm_apple i2c_pasemi_core drm_display_helper mc cec apple_dart ofpart apple_soc_cpufreq leds_pwm phram
[ 38.217677] CPU: 7 UID: 1000 PID: 2362 Comm: gst-launch-1.0 Tainted: G W 6.17.6+ #asahi-dev PREEMPT(full)
[ 38.219040] Tainted: [W]=WARN
[ 38.219398] Hardware name: Apple MacBook Pro (13-inch, M2, 2022) (DT)
[ 38.220213] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[ 38.221088] pc : drm_gem_mmap_obj+0x1f8/0x210
[ 38.221643] lr : drm_gem_mmap_obj+0x78/0x210
[ 38.222178] sp : ffffc0008dc678e0
[ 38.222579] x29: ffffc0008dc678e0 x28: 0000000000042a97 x27: ffff8000b701b480
[ 38.223465] x26: 00000000000000fb x25: ffffc0008dc67d20 x24: ffffc0008dc67968
[ 38.224402] x23: ffff8000e3ca5600 x22: ffff8000265b7800 x21: ffff80003000c0c0
[ 38.225279] x20: 0000000000000000 x19: ffff8000b68c5200 x18: ffffc0008dc67968
[ 38.226151] x17: 0000000000000000 x16: 0000000000000000 x15: ffffc000810a30a8
[ 38.227042] x14: 00007fff637effff x13: 00005555de91ffff x12: 00007fff63293fff
[ 38.227942] x11: 0000000000000000 x10: ffff8000184ecf08 x9 : ffffc0007a1900c8
[ 38.228824] x8 : ffffc0008dc67968 x7 : 0000000000000012 x6 : ffffc0015cf1c000
[ 38.229703] x5 : ffffc0008dc676a0 x4 : ffffc00081a27dc0 x3 : 0000000000000038
[ 38.230607] x2 : 0000000000000003 x1 : 0000000000000003 x0 : 00000000100000fb
[ 38.231488] Call trace:
[ 38.231806] drm_gem_mmap_obj+0x1f8/0x210 (P)
[ 38.232342] drm_gem_mmap+0x140/0x260
[ 38.232813] __mmap_region+0x488/0x9a0
[ 38.233277] mmap_region+0xd0/0x148
[ 38.233703] do_mmap+0x350/0x5c0
[ 38.234148] vm_mmap_pgoff+0x14c/0x200
[ 38.234612] ksys_mmap_pgoff+0x150/0x208
[ 38.235107] __arm64_sys_mmap+0x34/0x50
[ 38.235611] invoke_syscall+0x50/0x120
[ 38.236075] el0_svc_common.constprop.0+0x48/0xf0
[ 38.236680] do_el0_svc+0x24/0x38
[ 38.237113] el0_svc+0x38/0x168
[ 38.237507] el0t_64_sync_handler+0xa0/0xe8
[ 38.238034] el0t_64_sync+0x198/0x1a0
[ 38.238491] ---[ end trace 0000000000000000 ]---
There were discussions in [1] at the end of 2023 that mmap() on imported
dma-bufs should not be supported but as of v6.17 drm_gem_shmem_mmap() in
drm_gem_shmem_helper.c still supports it.
This might affect all gpu or accel drivers using drm_gem_shmem_mmap() or
the wrapper drm_gem_shmem_object_mmap().
[1] https://lore.kernel.org/dri-devel/bc7f7844-0aa3-4802-b203-69d58e8be2fa@linux.intel.com/
Cc: stable@vger.kernel.org
Fixes: 5ba3f757f059 ("[media] v4l: videobuf2: add DMA scatter/gather allocator")
Signed-off-by: Janne Grunau <j@jannau.net>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/common/videobuf2/videobuf2-dma-sg.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c
+++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
@@ -345,6 +345,7 @@ static int vb2_dma_sg_mmap(void *buf_pri
return err;
}
+ vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
/*
* Use common vm_area operations to track buffer refcount.
*/
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 043/201] media: rockchip: rkcif: Add missing MUST_CONNECT flag to pads
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (41 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 042/201] media: videobuf2: Set vma_flags in vb2_dma_sg_mmap Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 044/201] media: mali-c55: Fully reset the ISP configuration Greg Kroah-Hartman
` (163 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dang Huynh, Michael Riesch,
Laurent Pinchart, Sakari Ailus, Mauro Carvalho Chehab
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dang Huynh <dang.huynh@mainlining.org>
commit 8e3c751259dc2d1325838eff26f41032523c7b57 upstream.
The pads missed checks for connected devices which may a null dereference
when the stream is enabled.
Unable to handle kernel NULL pointer dereference at virtual address
0000000000000020
pc : rkcif_interface_enable_streams+0x48/0xf0
lr : rkcif_interface_enable_streams+0x44/0xf0
Call trace:
rkcif_interface_enable_streams+0x48/0xf0
v4l2_subdev_enable_streams+0x26c/0x3f0
rkcif_stream_start_streaming+0x140/0x278
vb2_start_streaming+0x74/0x188
vb2_core_streamon+0xe0/0x1d8
vb2_ioctl_streamon+0x60/0xa8
v4l_streamon+0x2c/0x40
__video_do_ioctl+0x34c/0x400
video_usercopy+0x2d0/0x800
video_ioctl2+0x20/0x60
v4l2_ioctl+0x48/0x78
Fixes: 501802e2ad51 ("media: rockchip: rkcif: add abstraction for dma blocks")
Fixes: 85411d17bee9 ("media: rockchip: rkcif: add abstraction for interface and crop blocks")
Cc: stable@vger.kernel.org
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/rockchip/rkcif/rkcif-interface.c | 3 ++-
drivers/media/platform/rockchip/rkcif/rkcif-stream.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-interface.c b/drivers/media/platform/rockchip/rkcif/rkcif-interface.c
index 523103872b7a..414a9980cf2e 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-interface.c
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-interface.c
@@ -378,7 +378,8 @@ int rkcif_interface_register(struct rkcif_device *rkcif,
snprintf(sd->name, sizeof(sd->name), "rkcif-mipi%d",
interface->index - RKCIF_MIPI_BASE);
- pads[RKCIF_IF_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
+ pads[RKCIF_IF_PAD_SINK].flags = MEDIA_PAD_FL_SINK |
+ MEDIA_PAD_FL_MUST_CONNECT;
pads[RKCIF_IF_PAD_SRC].flags = MEDIA_PAD_FL_SOURCE;
ret = media_entity_pads_init(&sd->entity, RKCIF_IF_PAD_MAX, pads);
if (ret)
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c b/drivers/media/platform/rockchip/rkcif/rkcif-stream.c
index f15bee4f7cd7..3130d420ad55 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-stream.c
@@ -555,7 +555,7 @@ int rkcif_stream_register(struct rkcif_device *rkcif,
vdev->vfl_dir = VFL_DIR_RX;
video_set_drvdata(vdev, stream);
- stream->pad.flags = MEDIA_PAD_FL_SINK;
+ stream->pad.flags = MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_MUST_CONNECT;
stream->pix.height = CIF_MIN_HEIGHT;
stream->pix.width = CIF_MIN_WIDTH;
--
2.54.0
^ permalink raw reply related [flat|nested] 209+ messages in thread
* [PATCH 7.0 044/201] media: mali-c55: Fully reset the ISP configuration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (42 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 043/201] media: rockchip: rkcif: Add missing MUST_CONNECT flag to pads Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 045/201] media: intel/ipu6: fix error pointer dereference Greg Kroah-Hartman
` (162 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Scally, Jacopo Mondi,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
commit 26ad493bea57efdccc32ffedbf731da2b7463b6c upstream.
The Mali C55 driver uses an auto-suspend delay of 2000 milli-seconds.
As the delay is quite large, it is certainly possible that two
consecutive calls to enable_streams() do not go through a suspend of the
peripheral, meaning we cannot rely on POW register values for the ISP
configuration.
To prevent a streaming session to be initialized with settings from the
previous one, reset the full ISP configuration to know state disabling or
bypassing all the ISP blocks the driver supports.
Cc: stable@vger.kernel.org
Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
.../platform/arm/mali-c55/mali-c55-params.c | 50 +++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-params.c b/drivers/media/platform/arm/mali-c55/mali-c55-params.c
index c84a6047a570..773e5b6a2b7e 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-params.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-params.c
@@ -781,6 +781,43 @@ void mali_c55_params_init_isp_config(struct mali_c55 *mali_c55,
MALI_C55_REG_BYPASS_3_SQUARE_BE,
MALI_C55_REG_BYPASS_3_SQUARE_BE);
+ /* Bypass the sensor offset correction (BLS) module */
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_BYPASS_3,
+ MALI_C55_REG_BYPASS_3_SENSOR_OFFSET_PRE_SH,
+ MALI_C55_REG_BYPASS_3_SENSOR_OFFSET_PRE_SH);
+
+ /* Configure 1x digital gain. */
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_DIGITAL_GAIN,
+ MALI_C55_DIGITAL_GAIN_MASK, 256);
+
+ /* Set all AWB gains to 1x. at both AWB configuration points*/
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_AWB_GAINS1,
+ MALI_C55_AWB_GAIN00_MASK, 256);
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_AWB_GAINS1,
+ MALI_C55_AWB_GAIN01_MASK,
+ MALI_C55_AWB_GAIN01(256));
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_AWB_GAINS2,
+ MALI_C55_AWB_GAIN10_MASK, 256);
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_AWB_GAINS2,
+ MALI_C55_AWB_GAIN11_MASK,
+ MALI_C55_AWB_GAIN11(256));
+
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_AWB_GAINS1_AEXP,
+ MALI_C55_AWB_GAIN00_MASK, 256);
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_AWB_GAINS1_AEXP,
+ MALI_C55_AWB_GAIN01_MASK,
+ MALI_C55_AWB_GAIN01(256));
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_AWB_GAINS2_AEXP,
+ MALI_C55_AWB_GAIN10_MASK, 256);
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_AWB_GAINS2_AEXP,
+ MALI_C55_AWB_GAIN11_MASK,
+ MALI_C55_AWB_GAIN11(256));
+
+ /* Bypass mesh shading corrections (LSC). */
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_MESH_SHADING_CONFIG,
+ MALI_C55_MESH_SHADING_ENABLE_MASK,
+ false);
+
/* Bypass the temper module */
mali_c55_ctx_write(mali_c55, MALI_C55_REG_BYPASS_2,
MALI_C55_REG_BYPASS_2_TEMPER);
@@ -802,6 +839,19 @@ void mali_c55_params_init_isp_config(struct mali_c55 *mali_c55,
/* Disable the colour correction matrix */
mali_c55_ctx_write(mali_c55, MALI_C55_REG_CCM_ENABLE, 0);
+
+ /* Disable AWB stats. */
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_METERING_CONFIG,
+ MALI_C55_AWB_DISABLE_MASK,
+ MALI_C55_AWB_DISABLE_MASK);
+
+ /* Disable auto-exposure 1024-bin histograms at both tap points. */
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_METERING_CONFIG,
+ MALI_C55_AEXP_HIST_DISABLE_MASK,
+ MALI_C55_AEXP_HIST_DISABLE);
+ mali_c55_ctx_update_bits(mali_c55, MALI_C55_REG_METERING_CONFIG,
+ MALI_C55_AEXP_IHIST_DISABLE_MASK,
+ MALI_C55_AEXP_IHIST_DISABLE);
}
void mali_c55_unregister_params(struct mali_c55 *mali_c55)
--
2.54.0
^ permalink raw reply related [flat|nested] 209+ messages in thread
* [PATCH 7.0 045/201] media: intel/ipu6: fix error pointer dereference
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (43 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 044/201] media: mali-c55: Fully reset the ISP configuration Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 046/201] media: i2c: imx283: Fix hang when going from large to small resolution Greg Kroah-Hartman
` (161 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ethan Tidmore, Sakari Ailus,
Mauro Carvalho Chehab
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ethan Tidmore <ethantidmore06@gmail.com>
commit 8dd088b8b106f7b119664f965b691785998edcfb upstream.
In a error path isp->psys is confirmed to be an error pointer not NULL so
this condition is true and the error pointer is dereferenced. So isp-psys
should be set to NULL before going to out_ipu6_bus_del_devices.
Detected by Smatch:
drivers/media/pci/intel/ipu6/ipu6.c:690 ipu6_pci_probe() error:
'isp->psys' dereferencing possible ERR_PTR()
Fixes: 25fedc021985a ("media: intel/ipu6: add Intel IPU6 PCI device driver")
Cc: stable@vger.kernel.org
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
[Sakari Ailus: Fix commit message.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/pci/intel/ipu6/ipu6.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/pci/intel/ipu6/ipu6.c
+++ b/drivers/media/pci/intel/ipu6/ipu6.c
@@ -686,7 +686,7 @@ out_free_irq:
out_ipu6_rpm_put:
pm_runtime_put_sync(&isp->psys->auxdev.dev);
out_ipu6_bus_del_devices:
- if (isp->psys) {
+ if (!IS_ERR_OR_NULL(isp->psys)) {
ipu6_cpd_free_pkg_dir(isp->psys);
ipu6_buttress_unmap_fw_image(isp->psys, &isp->psys->fw_sgt);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 046/201] media: i2c: imx283: Fix hang when going from large to small resolution
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (44 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 045/201] media: intel/ipu6: fix error pointer dereference Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 047/201] regulator: act8945a: fix OF node reference imbalance Greg Kroah-Hartman
` (160 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jai Luthra, Kieran Bingham,
Sakari Ailus, Mauro Carvalho Chehab
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jai Luthra <jai.luthra@ideasonboard.com>
commit 9206359b2c396ff594adf39bc7daaadab0fcb367 upstream.
When switching between modes (e.g. full resolution to binned),
standby_cancel() previously cleared XMSTA (starting master mode data
output) before the new mode's MDSEL, crop, and timing registers were
programmed in start_streaming(). This caused the sensor to briefly
output MIPI data using the previous mode's configuration.
On receivers like imx-mipi-csis, this leads to FIFO overflow errors
when switching from a higher to a lower resolution, as the receiver is
configured for the new smaller frame size but receives stale
full-resolution data.
Fix this by moving the XMSTA and SYNCDRV register writes from
standby_cancel() to the end of start_streaming(), after all mode,
crop, and timing registers have been configured. Also explicitly stop
master mode (XMSTA=1) when stopping the stream, matching the pattern
used by other Sony sensor drivers (imx290, imx415).
Use named macros IMX283_XMSTA_START/STOP instead of raw 0/BIT(0) for
readability.
Cc: stable@vger.kernel.org
Fixes: ccb4eb4496fa ("media: i2c: Add imx283 camera sensor driver")
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/i2c/imx283.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
--- a/drivers/media/i2c/imx283.c
+++ b/drivers/media/i2c/imx283.c
@@ -129,7 +129,8 @@
/* Master Mode Operation Control */
#define IMX283_REG_XMSTA CCI_REG8(0x3105)
-#define IMX283_XMSTA BIT(0)
+#define IMX283_XMSTA_START 0
+#define IMX283_XMSTA_STOP BIT(0)
#define IMX283_REG_SYNCDRV CCI_REG8(0x3107)
#define IMX283_SYNCDRV_XHS_XVS (0xa0 | 0x02)
@@ -1023,8 +1024,6 @@ static int imx283_standby_cancel(struct
usleep_range(19000, 20000);
cci_write(imx283->cci, IMX283_REG_CLAMP, IMX283_CLPSQRST, &ret);
- cci_write(imx283->cci, IMX283_REG_XMSTA, 0, &ret);
- cci_write(imx283->cci, IMX283_REG_SYNCDRV, IMX283_SYNCDRV_XHS_XVS, &ret);
return ret;
}
@@ -1117,6 +1116,10 @@ static int imx283_start_streaming(struct
/* Apply customized values from controls (HMAX/VMAX/SHR) */
ret = __v4l2_ctrl_handler_setup(imx283->sd.ctrl_handler);
+ /* Start master mode */
+ cci_write(imx283->cci, IMX283_REG_XMSTA, IMX283_XMSTA_START, &ret);
+ cci_write(imx283->cci, IMX283_REG_SYNCDRV, IMX283_SYNCDRV_XHS_XVS, &ret);
+
return ret;
}
@@ -1153,12 +1156,14 @@ static int imx283_disable_streams(struct
u64 streams_mask)
{
struct imx283 *imx283 = to_imx283(sd);
- int ret;
+ int ret = 0;
if (pad != IMAGE_PAD)
return -EINVAL;
- ret = cci_write(imx283->cci, IMX283_REG_STANDBY, IMX283_STANDBY, NULL);
+ cci_write(imx283->cci, IMX283_REG_XMSTA, IMX283_XMSTA_STOP, &ret);
+ cci_write(imx283->cci, IMX283_REG_STANDBY, IMX283_STANDBY, &ret);
+
if (ret)
dev_err(imx283->dev, "Failed to stop stream\n");
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 047/201] regulator: act8945a: fix OF node reference imbalance
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (45 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 046/201] media: i2c: imx283: Fix hang when going from large to small resolution Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 048/201] regulator: s2dos05: " Greg Kroah-Hartman
` (159 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Wenyou Yang, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 0d15ce31375ccef4162f960b34547a821b7619d2 upstream.
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: 38c09961048b ("regulator: act8945a: add regulator driver for ACT8945A")
Cc: stable@vger.kernel.org # 4.6
Cc: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-7-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/regulator/act8945a-regulator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/regulator/act8945a-regulator.c
+++ b/drivers/regulator/act8945a-regulator.c
@@ -302,8 +302,9 @@ static int act8945a_pmic_probe(struct pl
num_regulators = ARRAY_SIZE(act8945a_regulators);
}
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
+
config.dev = &pdev->dev;
- config.dev->of_node = pdev->dev.parent->of_node;
config.driver_data = act8945a;
for (i = 0; i < num_regulators; i++) {
rdev = devm_regulator_register(&pdev->dev, ®ulators[i],
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 048/201] regulator: s2dos05: fix OF node reference imbalance
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (46 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 047/201] regulator: act8945a: fix OF node reference imbalance Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 049/201] regulator: bd9571mwv: " Greg Kroah-Hartman
` (158 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dzmitry Sankouski, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit ebe694d67f159899b063eee61bacda4cb825ed7b upstream.
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: bb2441402392 ("regulator: add s2dos05 regulator support")
Cc: stable@vger.kernel.org # 6.18
Cc: Dzmitry Sankouski <dsankouski@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-6-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/regulator/s2dos05-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/regulator/s2dos05-regulator.c
+++ b/drivers/regulator/s2dos05-regulator.c
@@ -126,7 +126,7 @@ static int s2dos05_pmic_probe(struct pla
s2dos05->regmap = iodev->regmap_pmic;
s2dos05->dev = dev;
if (!dev->of_node)
- dev->of_node = dev->parent->of_node;
+ device_set_of_node_from_dev(dev, dev->parent);
config.dev = dev;
config.driver_data = s2dos05;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 049/201] regulator: bd9571mwv: fix OF node reference imbalance
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (47 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 048/201] regulator: s2dos05: " Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 050/201] spi: lantiq-ssc: fix controller deregistration Greg Kroah-Hartman
` (157 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Marek Vasut, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 8498100ee1d00422b8c5b161b3e332278b92a59a upstream.
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: e85c5a153fe2 ("regulator: Add ROHM BD9571MWV-M PMIC regulator driver")
Cc: stable@vger.kernel.org # 4.12
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-8-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/regulator/bd9571mwv-regulator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/regulator/bd9571mwv-regulator.c
+++ b/drivers/regulator/bd9571mwv-regulator.c
@@ -287,8 +287,9 @@ static int bd9571mwv_regulator_probe(str
platform_set_drvdata(pdev, bdreg);
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
+
config.dev = &pdev->dev;
- config.dev->of_node = pdev->dev.parent->of_node;
config.driver_data = bdreg;
config.regmap = bdreg->regmap;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 050/201] spi: lantiq-ssc: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (48 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 049/201] regulator: bd9571mwv: " Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 051/201] spi: meson-spicc: " Greg Kroah-Hartman
` (156 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hauke Mehrtens, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit b99206710d032c16b7f8b75e4bc18414d8e4b9f4 upstream.
Make sure to deregister the controller before releasing underlying
resources like clocks during driver unbind.
Fixes: 17f84b793c01 ("spi: lantiq-ssc: add support for Lantiq SSC SPI controller")
Cc: stable@vger.kernel.org # 4.11
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-17-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-lantiq-ssc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-lantiq-ssc.c
+++ b/drivers/spi/spi-lantiq-ssc.c
@@ -994,7 +994,7 @@ static int lantiq_ssc_probe(struct platf
"Lantiq SSC SPI controller (Rev %i, TXFS %u, RXFS %u, DMA %u)\n",
revision, spi->tx_fifo_size, spi->rx_fifo_size, supports_dma);
- err = devm_spi_register_controller(dev, host);
+ err = spi_register_controller(host);
if (err) {
dev_err(dev, "failed to register spi host\n");
goto err_wq_destroy;
@@ -1016,6 +1016,10 @@ static void lantiq_ssc_remove(struct pla
{
struct lantiq_ssc_spi *spi = platform_get_drvdata(pdev);
+ spi_controller_get(spi->host);
+
+ spi_unregister_controller(spi->host);
+
lantiq_ssc_writel(spi, 0, LTQ_SPI_IRNEN);
lantiq_ssc_writel(spi, 0, LTQ_SPI_CLC);
rx_fifo_flush(spi);
@@ -1024,6 +1028,8 @@ static void lantiq_ssc_remove(struct pla
destroy_workqueue(spi->wq);
clk_put(spi->fpi_clk);
+
+ spi_controller_put(spi->host);
}
static struct platform_driver lantiq_ssc_driver = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 051/201] spi: meson-spicc: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (49 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 050/201] spi: lantiq-ssc: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 052/201] spi: qup: " Greg Kroah-Hartman
` (155 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Neil Armstrong, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 77953c76bec9af4191f8692a10225dd816208718 upstream.
Make sure to deregister the controller before disabling it to allow SPI
device drivers to do I/O during deregistration.
Fixes: 454fa271bc4e ("spi: Add Meson SPICC driver")
Cc: stable@vger.kernel.org # 4.13
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-18-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-meson-spicc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-meson-spicc.c
+++ b/drivers/spi/spi-meson-spicc.c
@@ -1081,7 +1081,7 @@ static int meson_spicc_probe(struct plat
}
}
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret) {
dev_err(&pdev->dev, "spi registration failed\n");
goto out_host;
@@ -1099,8 +1099,14 @@ static void meson_spicc_remove(struct pl
{
struct meson_spicc_device *spicc = platform_get_drvdata(pdev);
+ spi_controller_get(spicc->host);
+
+ spi_unregister_controller(spicc->host);
+
/* Disable SPI */
writel(0, spicc->base + SPICC_CONREG);
+
+ spi_controller_put(spicc->host);
}
static const struct meson_spicc_data meson_spicc_gx_data = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 052/201] spi: qup: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (50 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 051/201] spi: meson-spicc: " Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 053/201] arm64: dts: ti: k3-am69-aquila-clover: Fix DP regulator enable GPIO Greg Kroah-Hartman
` (154 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 443e3a0005a4342b218b6dbd4c6387d3c7fed85a upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: 64ff247a978f ("spi: Add Qualcomm QUP SPI controller support")
Cc: stable@vger.kernel.org # 3.15
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-10-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-qup.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -1193,7 +1193,7 @@ static int spi_qup_probe(struct platform
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
- ret = devm_spi_register_controller(dev, host);
+ ret = spi_register_controller(host);
if (ret)
goto disable_pm;
@@ -1320,6 +1320,10 @@ static void spi_qup_remove(struct platfo
struct spi_qup *controller = spi_controller_get_devdata(host);
int ret;
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
ret = pm_runtime_get_sync(&pdev->dev);
if (ret >= 0) {
@@ -1339,6 +1343,8 @@ static void spi_qup_remove(struct platfo
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+
+ spi_controller_put(host);
}
static const struct of_device_id spi_qup_dt_match[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 053/201] arm64: dts: ti: k3-am69-aquila-clover: Fix DP regulator enable GPIO
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (51 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 052/201] spi: qup: " Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 054/201] spi: at91-usart: fix controller deregistration Greg Kroah-Hartman
` (153 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Franz Schnyder, Francesco Dolcini,
Vignesh Raghavendra
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Franz Schnyder <franz.schnyder@toradex.com>
commit 8cfb2e517113543e0de9e8df5754d5e09cb3627e upstream.
Correct the DP regulator enable GPIO to index 21.
The 3.3V DP regulator was not being enabled by the assigned GPIO, as it
is routed to GPIO index 21 and not 37, which was causing instability
with displays connected over DP or via an active DP-to-HDMI adapter.
Fixes: 9f748a6177e1 ("arm64: dts: ti: am69-aquila: Add Clover")
Cc: stable@vger.kernel.org
Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20260202083604.325060-3-fra.schnyder@gmail.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts b/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts
index ec8ff4587715..dc0d3cf2f985 100644
--- a/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts
+++ b/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts
@@ -26,7 +26,7 @@ reg_3v3_dp: regulator-3v3-dp {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_21_dp>;
/* Aquila GPIO_21_DP (AQUILA B57) */
- gpio = <&main_gpio0 37 GPIO_ACTIVE_HIGH>;
+ gpio = <&main_gpio0 21 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-max-microvolt = <3300000>;
regulator-min-microvolt = <3300000>;
--
2.54.0
^ permalink raw reply related [flat|nested] 209+ messages in thread
* [PATCH 7.0 054/201] spi: at91-usart: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (52 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 053/201] arm64: dts: ti: k3-am69-aquila-clover: Fix DP regulator enable GPIO Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 055/201] media: ipu-bridge: Add upside-down sensor DMI quirk for Dell XPS 13 9340 and XPS 14 9440 Greg Kroah-Hartman
` (152 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Radu Pirea, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 9acecc9bcff058eaef40fd7a4c3650e88b06b220 upstream.
Make sure to deregister the controller before disabling and releasing
underlying resources like clocks and DMA during driver unbind.
Fixes: e1892546ff66 ("spi: at91-usart: Add driver for at91-usart as SPI")
Cc: stable@vger.kernel.org # 4.20
Cc: Radu Pirea <radu.pirea@microchip.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-at91-usart.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-at91-usart.c
+++ b/drivers/spi/spi-at91-usart.c
@@ -556,7 +556,7 @@ static int at91_usart_spi_probe(struct p
spin_lock_init(&aus->lock);
init_completion(&aus->xfer_completion);
- ret = devm_spi_register_controller(&pdev->dev, controller);
+ ret = spi_register_controller(controller);
if (ret)
goto at91_usart_fail_register_controller;
@@ -634,8 +634,14 @@ static void at91_usart_spi_remove(struct
struct spi_controller *ctlr = platform_get_drvdata(pdev);
struct at91_usart_spi *aus = spi_controller_get_devdata(ctlr);
+ spi_controller_get(ctlr);
+
+ spi_unregister_controller(ctlr);
+
at91_usart_spi_release_dma(ctlr);
clk_disable_unprepare(aus->clk);
+
+ spi_controller_put(ctlr);
}
static const struct dev_pm_ops at91_usart_spi_pm_ops = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 055/201] media: ipu-bridge: Add upside-down sensor DMI quirk for Dell XPS 13 9340 and XPS 14 9440
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (53 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 054/201] spi: at91-usart: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 056/201] media: saa7164: add ioremap return checks and cleanups Greg Kroah-Hartman
` (151 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hans de Goede, Sakari Ailus,
Mauro Carvalho Chehab, Heimir Thor Sverrisson
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <johannes.goede@oss.qualcomm.com>
commit 2c10400e4a233200046d023ab2377bc56fd48dea upstream.
The Dell XPS 13 9340 and XPS 14 9440 have an upside-down mounted OV02C10
sensor, just like the XPS 13 9350 and XPS 16 9640 models.
Extend the existing DMI matches for handling these laptops with DMI
matches for these 2 models
Reported-by: Heimir Thor Sverrisson <heimir.sverrisson@gmail.com> # XPS 14 9440
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2440581 # XPS 13 9340
Fixes: d5ebe3f7d13d ("media: ov02c10: Fix default vertical flip")
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/pci/intel/ipu-bridge.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -107,10 +107,24 @@ static const struct dmi_system_id upside
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 13 9340"),
+ },
+ .driver_data = "OVTI02C1",
+ },
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 13 9350"),
},
.driver_data = "OVTI02C1",
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 14 9440"),
+ },
+ .driver_data = "OVTI02C1",
+ },
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 056/201] media: saa7164: add ioremap return checks and cleanups
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (54 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 055/201] media: ipu-bridge: Add upside-down sensor DMI quirk for Dell XPS 13 9340 and XPS 14 9440 Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 057/201] spi: amlogic-spisg: fix controller deregistration Greg Kroah-Hartman
` (150 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Wang Jun, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Jun <1742789905@qq.com>
commit d51c60a498e83c9a79884c8e420f97e3885c9583 upstream.
Add checks for ioremap return values in saa7164_dev_setup(). If
ioremap for BAR0 or BAR2 fails, release the already allocated PCI
memory regions, remove the device from the global list, decrement
the device count, and return -ENODEV.
This prevents potential null pointer dereferences and ensures proper
cleanup on memory mapping failures.
Fixes: 443c1228d505 ("V4L/DVB (12923): SAA7164: Add support for the NXP SAA7164 silicon")
Cc: stable@vger.kernel.org
Signed-off-by: Wang Jun <1742789905@qq.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/pci/saa7164/saa7164-core.c | 47 +++++++++++++++++++++++--------
1 file changed, 35 insertions(+), 12 deletions(-)
--- a/drivers/media/pci/saa7164/saa7164-core.c
+++ b/drivers/media/pci/saa7164/saa7164-core.c
@@ -888,6 +888,15 @@ static int get_resources(struct saa7164_
return -EBUSY;
}
+static void release_resources(struct saa7164_dev *dev)
+{
+ release_mem_region(pci_resource_start(dev->pci, 0),
+ pci_resource_len(dev->pci, 0));
+
+ release_mem_region(pci_resource_start(dev->pci, 2),
+ pci_resource_len(dev->pci, 2));
+}
+
static int saa7164_port_init(struct saa7164_dev *dev, int portnr)
{
struct saa7164_port *port = NULL;
@@ -947,9 +956,9 @@ static int saa7164_dev_setup(struct saa7
snprintf(dev->name, sizeof(dev->name), "saa7164[%d]", dev->nr);
- mutex_lock(&devlist);
- list_add_tail(&dev->devlist, &saa7164_devlist);
- mutex_unlock(&devlist);
+ scoped_guard(mutex, &devlist) {
+ list_add_tail(&dev->devlist, &saa7164_devlist);
+ }
/* board config */
dev->board = UNSET;
@@ -996,11 +1005,17 @@ static int saa7164_dev_setup(struct saa7
}
/* PCI/e allocations */
- dev->lmmio = ioremap(pci_resource_start(dev->pci, 0),
- pci_resource_len(dev->pci, 0));
+ dev->lmmio = pci_ioremap_bar(dev->pci, 0);
+ if (!dev->lmmio) {
+ dev_err(&dev->pci->dev, "Failed to remap MMIO BAR 0\n");
+ goto err_ioremap_bar0;
+ }
- dev->lmmio2 = ioremap(pci_resource_start(dev->pci, 2),
- pci_resource_len(dev->pci, 2));
+ dev->lmmio2 = pci_ioremap_bar(dev->pci, 2);
+ if (!dev->lmmio2) {
+ dev_err(&dev->pci->dev, "Failed to remap MMIO BAR 2\n");
+ goto err_ioremap_bar2;
+ }
dev->bmmio = (u8 __iomem *)dev->lmmio;
dev->bmmio2 = (u8 __iomem *)dev->lmmio2;
@@ -1019,17 +1034,25 @@ static int saa7164_dev_setup(struct saa7
saa7164_pci_quirks(dev);
return 0;
+
+err_ioremap_bar2:
+ iounmap(dev->lmmio);
+err_ioremap_bar0:
+ release_resources(dev);
+
+ scoped_guard(mutex, &devlist) {
+ list_del(&dev->devlist);
+ }
+ saa7164_devcount--;
+
+ return -ENODEV;
}
static void saa7164_dev_unregister(struct saa7164_dev *dev)
{
dprintk(1, "%s()\n", __func__);
- release_mem_region(pci_resource_start(dev->pci, 0),
- pci_resource_len(dev->pci, 0));
-
- release_mem_region(pci_resource_start(dev->pci, 2),
- pci_resource_len(dev->pci, 2));
+ release_resources(dev);
if (!atomic_dec_and_test(&dev->refcount))
return;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 057/201] spi: amlogic-spisg: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (55 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 056/201] media: saa7164: add ioremap return checks and cleanups Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 058/201] spi: aspeed-smc: " Greg Kroah-Hartman
` (149 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Sunny Luo, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 84d31bb1f6256eea0db6cf64a3c7a53145f92bb9 upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver")
Cc: stable@vger.kernel.org # 6.17: b8db95529979
Cc: stable@vger.kernel.org # 6.17
Cc: Sunny Luo <sunny.luo@amlogic.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-amlogic-spisg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-amlogic-spisg.c
+++ b/drivers/spi/spi-amlogic-spisg.c
@@ -800,7 +800,7 @@ static int aml_spisg_probe(struct platfo
goto out_clk;
}
- ret = devm_spi_register_controller(dev, ctlr);
+ ret = spi_register_controller(ctlr);
if (ret) {
dev_err(&pdev->dev, "spi controller registration failed\n");
goto out_clk;
@@ -823,6 +823,8 @@ static void aml_spisg_remove(struct plat
{
struct spisg_device *spisg = platform_get_drvdata(pdev);
+ spi_unregister_controller(spisg->controller);
+
if (!pm_runtime_suspended(&pdev->dev)) {
pinctrl_pm_select_sleep_state(&spisg->pdev->dev);
clk_disable_unprepare(spisg->core);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 058/201] spi: aspeed-smc: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (56 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 057/201] spi: amlogic-spisg: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 059/201] drm/colorop: Preserve bypass value in duplicate_state() Greg Kroah-Hartman
` (148 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Cédric Le Goater, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 1044e5a4ccd57bf5a64f90100a321b498e0267a2 upstream.
Make sure to deregister the controller before disabling it to allow
SPI device drivers to do I/O during deregistration.
Fixes: e3228ed92893 ("spi: spi-mem: Convert Aspeed SMC driver to spi-mem")
Cc: stable@vger.kernel.org # 5.19
Cc: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-aspeed-smc.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/drivers/spi/spi-aspeed-smc.c
+++ b/drivers/spi/spi-aspeed-smc.c
@@ -972,7 +972,7 @@ static int aspeed_spi_probe(struct platf
return -ENOMEM;
aspi = spi_controller_get_devdata(ctlr);
- platform_set_drvdata(pdev, aspi);
+ platform_set_drvdata(pdev, ctlr);
aspi->data = data;
aspi->dev = dev;
@@ -1021,7 +1021,7 @@ static int aspeed_spi_probe(struct platf
return ret;
}
- ret = devm_spi_register_controller(dev, ctlr);
+ ret = spi_register_controller(ctlr);
if (ret)
dev_err(&pdev->dev, "spi_register_controller failed\n");
@@ -1030,7 +1030,10 @@ static int aspeed_spi_probe(struct platf
static void aspeed_spi_remove(struct platform_device *pdev)
{
- struct aspeed_spi *aspi = platform_get_drvdata(pdev);
+ struct spi_controller *ctlr = platform_get_drvdata(pdev);
+ struct aspeed_spi *aspi = spi_controller_get_devdata(ctlr);
+
+ spi_unregister_controller(ctlr);
aspeed_spi_enable(aspi, false);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 059/201] drm/colorop: Preserve bypass value in duplicate_state()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (57 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 058/201] spi: aspeed-smc: " Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 060/201] drm/atomic: Add affected colorops with affected planes Greg Kroah-Hartman
` (147 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Uma Shankar, Chaitanya Kumar Borah,
Harry Wentland, Suraj Kandpal
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
commit 0d9710aeb6959ae244f255986187562fa50504b9 upstream.
__drm_atomic_helper_colorop_duplicate_state() unconditionally
sets state->bypass = true after copying the existing state.
This override causes the new atomic state to no longer reflect
the currently committed hardware state. Since the bypass property
directly controls whether the colorop is active in hardware,
resetting it to true can inadvertently disable an active colorop
during a subsequent commit, particularly for internal driver commits
where userspace does not touch the property.
Drop the unconditional assignment and preserve the duplicated
bypass value.
Fixes: 8c5ea1745f4c ("drm/colorop: Add BYPASS property")
Cc: <stable@vger.kernel.org> #v6.19+
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260310113238.3495981-2-chaitanya.kumar.borah@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/drm_colorop.c | 2 --
1 file changed, 2 deletions(-)
--- a/drivers/gpu/drm/drm_colorop.c
+++ b/drivers/gpu/drm/drm_colorop.c
@@ -441,8 +441,6 @@ static void __drm_atomic_helper_colorop_
if (state->data)
drm_property_blob_get(state->data);
-
- state->bypass = true;
}
struct drm_colorop_state *
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 060/201] drm/atomic: Add affected colorops with affected planes
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (58 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 059/201] drm/colorop: Preserve bypass value in duplicate_state() Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 061/201] platform/x86: hp-wmi: Ignore backlight and FnLock events Greg Kroah-Hartman
` (146 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chaitanya Kumar Borah,
Harry Wentland, Suraj Kandpal, Uma Shankar
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
commit 6955d6bca0531ffbbaeecac844b7bae84345b3fb upstream.
When drm_atomic_add_affected_planes() adds a plane to the atomic
state, the associated colorops are not guaranteed to be included.
This can leave colorop state out of the transaction when planes
are pulled in implicitly (eg. during modeset or internal commits).
Also add affected colorops when adding affected planes to keep
plane and color pipeline state consistent within the atomic
transaction.
v2: Add affected colorops only when a pipeline is enabled
Fixes: 2afc3184f3b3 ("drm/plane: Add COLOR PIPELINE property")
Cc: <stable@vger.kernel.org> #v6.19+
Reviewed-by: Uma Shankar <uma.shankar@intel.com> #v1
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260310113238.3495981-3-chaitanya.kumar.borah@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/drm_atomic.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1569,6 +1569,7 @@ drm_atomic_add_affected_planes(struct dr
const struct drm_crtc_state *old_crtc_state =
drm_atomic_get_old_crtc_state(state, crtc);
struct drm_plane *plane;
+ int ret;
WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc));
@@ -1582,6 +1583,12 @@ drm_atomic_add_affected_planes(struct dr
if (IS_ERR(plane_state))
return PTR_ERR(plane_state);
+
+ if (plane_state->color_pipeline) {
+ ret = drm_atomic_add_affected_colorops(state, plane);
+ if (ret)
+ return ret;
+ }
}
return 0;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 061/201] platform/x86: hp-wmi: Ignore backlight and FnLock events
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (59 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 060/201] drm/atomic: Add affected colorops with affected planes Greg Kroah-Hartman
@ 2026-05-15 15:47 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 062/201] vsock/virtio: fix MSG_PEEK ignoring skb offset when calculating bytes to copy Greg Kroah-Hartman
` (145 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:47 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Artem S. Tashkinov, Krishna Chomal,
Ilpo Järvinen
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krishna Chomal <krishna.chomal108@gmail.com>
commit e8c597368b8500a824c639bfb5ed0044068c6870 upstream.
On HP OmniBook 7 the keyboard backlight and FnLock keys are handled
directly by the firmware. However, they still trigger WMI events which
results in "Unknown key code" warnings in dmesg.
Add these key codes to the keymap with KE_IGNORE to silence the warnings
since no software action is needed.
Tested-by: Artem S. Tashkinov <aros@gmx.com>
Reported-by: Artem S. Tashkinov <aros@gmx.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221181
Signed-off-by: Krishna Chomal <krishna.chomal108@gmail.com>
Link: https://patch.msgid.link/20260403080155.169653-1-krishna.chomal108@gmail.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/platform/x86/hp/hp-wmi.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -399,6 +399,11 @@ static const struct key_entry hp_wmi_key
{ KE_KEY, 0x21a9, { KEY_TOUCHPAD_OFF } },
{ KE_KEY, 0x121a9, { KEY_TOUCHPAD_ON } },
{ KE_KEY, 0x231b, { KEY_HELP } },
+ { KE_IGNORE, 0x21ab, }, /* FnLock on */
+ { KE_IGNORE, 0x121ab, }, /* FnLock off */
+ { KE_IGNORE, 0x30021aa, }, /* kbd backlight: level 2 -> off */
+ { KE_IGNORE, 0x33221aa, }, /* kbd backlight: off -> level 1 */
+ { KE_IGNORE, 0x36421aa, }, /* kbd backlight: level 1 -> level 2*/
{ KE_END, 0 }
};
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 062/201] vsock/virtio: fix MSG_PEEK ignoring skb offset when calculating bytes to copy
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (60 preceding siblings ...)
2026-05-15 15:47 ` [PATCH 7.0 061/201] platform/x86: hp-wmi: Ignore backlight and FnLock events Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 063/201] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add fixes for pinctrl/pinctrl_aon Greg Kroah-Hartman
` (144 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stefano Garzarella, Arseniy Krasnov,
Luigi Leonardi, Jakub Kicinski
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luigi Leonardi <leonardi@redhat.com>
commit 080f22f5d30233faf3d83be3098f35b8be9b7a00 upstream.
`virtio_transport_stream_do_peek()` does not account for the skb offset
when computing the number of bytes to copy.
This means that, after a partial recv() that advances the offset, a peek
requesting more bytes than are available in the sk_buff causes
`skb_copy_datagram_iter()` to go past the valid payload, resulting in
a -EFAULT.
The dequeue path already handles this correctly.
Apply the same logic to the peek path.
Fixes: 0df7cd3c13e4 ("vsock/virtio/vhost: read data from non-linear skb")
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Link: https://patch.msgid.link/20260415-fix_peek-v4-1-8207e872759e@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/vmw_vsock/virtio_transport_common.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -547,9 +547,8 @@ virtio_transport_stream_do_peek(struct v
skb_queue_walk(&vvs->rx_queue, skb) {
size_t bytes;
- bytes = len - total;
- if (bytes > skb->len)
- bytes = skb->len;
+ bytes = min_t(size_t, len - total,
+ skb->len - VIRTIO_VSOCK_SKB_CB(skb)->offset);
spin_unlock_bh(&vvs->rx_lock);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 063/201] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add fixes for pinctrl/pinctrl_aon
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (61 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 062/201] vsock/virtio: fix MSG_PEEK ignoring skb offset when calculating bytes to copy Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 064/201] arm64: dts: broadcom: bcm2712-d-rpi-5-b: update uart10 interrupt Greg Kroah-Hartman
` (143 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Gregor Herburger, Florian Fainelli
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gregor Herburger <gregor.herburger@linutronix.de>
commit aeb078cebc40d421f61a8f07b0e7919aeb44d751 upstream.
On the -d revision of the bcm2712 the pinctrl differs from the c0
revision. The driver already supports both and distinguishes the two
with the compatible string.
Update the compatible string and reg length to reflect the different
pinctrl.
Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
Link: https://lore.kernel.org/r/20260226-raspi-dts-updates-v1-5-60832d20ff04@linutronix.de
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
@@ -35,3 +35,13 @@
"PMIC_SCL", // AON_SGPIO_04
"PMIC_SDA"; // AON_SGPIO_05
};
+
+&pinctrl {
+ compatible = "brcm,bcm2712d0-pinctrl";
+ reg = <0x7d504100 0x20>;
+};
+
+&pinctrl_aon {
+ compatible = "brcm,bcm2712d0-aon-pinctrl";
+ reg = <0x7d510700 0x1c>;
+};
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 064/201] arm64: dts: broadcom: bcm2712-d-rpi-5-b: update uart10 interrupt
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (62 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 063/201] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add fixes for pinctrl/pinctrl_aon Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 065/201] media: pci: zoran: fix potential memory leak in zoran_probe() Greg Kroah-Hartman
` (142 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gregor Herburger, Florian Fainelli,
Rasmus Villemoes
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gregor Herburger <gregor.herburger@linutronix.de>
commit 18d4a06e10051681de074a9250e54afc1f3ee312 upstream.
On the -d revision of bcm2712 the uart interrupt is on 120. Update it
accordingly.
Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
Link: https://lore.kernel.org/r/20260226-raspi-dts-updates-v1-6-60832d20ff04@linutronix.de
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Rasmus Villemoes <ravi@prevas.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 4 ++++
1 file changed, 4 insertions(+)
--- a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
@@ -45,3 +45,7 @@
compatible = "brcm,bcm2712d0-aon-pinctrl";
reg = <0x7d510700 0x1c>;
};
+
+&uart10 {
+ interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+};
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 065/201] media: pci: zoran: fix potential memory leak in zoran_probe()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (63 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 064/201] arm64: dts: broadcom: bcm2712-d-rpi-5-b: update uart10 interrupt Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 066/201] media: dib8000: avoid division by 0 in dib8000_set_dds() Greg Kroah-Hartman
` (141 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abdun Nihaal, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdun Nihaal <nihaal@cse.iitm.ac.in>
commit 8ea21435fe36fb853706f4935d78bc11beb63fb4 upstream.
The memory allocated for codec in videocodec_attach() is not freed in
one of the error paths, due to an incorrect goto label. Fix the label
to free it on error.
Fixes: 8f7cc5c0b0eb ("media: staging: media: zoran: introduce zoran_i2c_init")
Cc: stable@vger.kernel.org
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/pci/zoran/zoran_card.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/pci/zoran/zoran_card.c
+++ b/drivers/media/pci/zoran/zoran_card.c
@@ -1373,7 +1373,7 @@ static int zoran_probe(struct pci_dev *p
}
if (zr->codec->type != zr->card.video_codec) {
pci_err(pdev, "%s - wrong codec\n", __func__);
- goto zr_unreg_videocodec;
+ goto zr_detach_codec;
}
}
if (zr->card.video_vfe != 0) {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 066/201] media: dib8000: avoid division by 0 in dib8000_set_dds()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (64 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 065/201] media: pci: zoran: fix potential memory leak in zoran_probe() Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 067/201] media: i2c: imx412: Assert reset GPIO during probe Greg Kroah-Hartman
` (140 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Sergey Shtylyov, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sergey Shtylyov <s.shtylyov@auroraos.dev>
commit dde3c37af95cd6fa301c4906f33d627bc9dd874c upstream.
In dib8000_set_dds(), 1 << 26 (67108864) divided by e.g. 1 apparently can't
fit into 16-bit variable unit_khz_dds_val, being truncated to 0; this will
cause division by 0 while calling dprintk() with debugging enabled (via the
module parameter). Use s32 instead of s16 to declare the variable, getting
rid of the cast to u16 in the *else* branch as well...
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Fixes: 173a64cb3fcf ("[media] dib8000: enhancement")
Cc: stable@vger.kernel.org
Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/dvb-frontends/dib8000.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/media/dvb-frontends/dib8000.c
+++ b/drivers/media/dvb-frontends/dib8000.c
@@ -2695,7 +2695,7 @@ static void dib8000_viterbi_state(struct
static void dib8000_set_dds(struct dib8000_state *state, s32 offset_khz)
{
- s16 unit_khz_dds_val;
+ s32 unit_khz_dds_val;
u32 abs_offset_khz = abs(offset_khz);
u32 dds = state->cfg.pll->ifreq & 0x1ffffff;
u8 invert = !!(state->cfg.pll->ifreq & (1 << 25));
@@ -2716,7 +2716,7 @@ static void dib8000_set_dds(struct dib80
dds = (1<<26) - dds;
} else {
ratio = 2;
- unit_khz_dds_val = (u16) (67108864 / state->cfg.pll->internal);
+ unit_khz_dds_val = 67108864 / state->cfg.pll->internal;
if (offset_khz < 0)
unit_khz_dds_val *= -1;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 067/201] media: i2c: imx412: Assert reset GPIO during probe
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (65 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 066/201] media: dib8000: avoid division by 0 in dib8000_set_dds() Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 068/201] media: staging: imx: request mbus_config in csi_start Greg Kroah-Hartman
` (139 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wenmeng Liu, Sakari Ailus,
Mauro Carvalho Chehab
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
commit 8467c5ff5acae28513bc1e0af535e06b41b04344 upstream.
Assert the reset GPIO before first power up. This avoids a mismatch where
the first power up (when the reset GPIO defaults deasserted) differs from
subsequent cycles.
Signed-off-by: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
Fixes: 9214e86c0cc1 ("media: i2c: Add imx412 camera sensor driver")
Cc: stable@vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/i2c/imx412.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/i2c/imx412.c
+++ b/drivers/media/i2c/imx412.c
@@ -925,7 +925,7 @@ static int imx412_parse_hw_config(struct
/* Request optional reset pin */
imx412->reset_gpio = devm_gpiod_get_optional(imx412->dev, "reset",
- GPIOD_OUT_LOW);
+ GPIOD_OUT_HIGH);
if (IS_ERR(imx412->reset_gpio)) {
dev_err(imx412->dev, "failed to get reset gpio %pe\n",
imx412->reset_gpio);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 068/201] media: staging: imx: request mbus_config in csi_start
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (66 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 067/201] media: i2c: imx412: Assert reset GPIO during probe Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 069/201] media: i2c: ov08d10: fix image vertical start setting Greg Kroah-Hartman
` (138 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Frank Li, Michael Tretter,
Philipp Zabel, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Tretter <m.tretter@pengutronix.de>
commit 9df2aaa64890c0b6226057eb6fcb6352bd2df432 upstream.
Request the upstream mbus_config in csi_start, which starts the stream,
instead of caching it in link_validate.
This allows to get rid of the mbus_cfg field in the struct csi_priv and
avoids state in the driver.
Fixes: 4a34ec8e470c ("[media] media: imx: Add CSI subdev driver")
Cc: stable@vger.kernel.org
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/media/imx/imx-media-csi.c | 40 ++++++++++++++++++------------
1 file changed, 24 insertions(+), 16 deletions(-)
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -97,9 +97,6 @@ struct csi_priv {
/* the mipi virtual channel number at link validate */
int vc_num;
- /* media bus config of the upstream subdevice CSI is receiving from */
- struct v4l2_mbus_config mbus_cfg;
-
spinlock_t irqlock; /* protect eof_irq handler */
struct timer_list eof_timeout_timer;
int eof_irq;
@@ -403,7 +400,8 @@ static void csi_idmac_unsetup_vb2_buf(st
}
/* init the SMFC IDMAC channel */
-static int csi_idmac_setup_channel(struct csi_priv *priv)
+static int csi_idmac_setup_channel(struct csi_priv *priv,
+ struct v4l2_mbus_config *mbus_cfg)
{
struct imx_media_video_dev *vdev = priv->vdev;
const struct imx_media_pixfmt *incc;
@@ -432,7 +430,7 @@ static int csi_idmac_setup_channel(struc
image.phys0 = phys[0];
image.phys1 = phys[1];
- passthrough = requires_passthrough(&priv->mbus_cfg, infmt, incc);
+ passthrough = requires_passthrough(mbus_cfg, infmt, incc);
passthrough_cycles = 1;
/*
@@ -572,11 +570,12 @@ static void csi_idmac_unsetup(struct csi
csi_idmac_unsetup_vb2_buf(priv, state);
}
-static int csi_idmac_setup(struct csi_priv *priv)
+static int csi_idmac_setup(struct csi_priv *priv,
+ struct v4l2_mbus_config *mbus_cfg)
{
int ret;
- ret = csi_idmac_setup_channel(priv);
+ ret = csi_idmac_setup_channel(priv, mbus_cfg);
if (ret)
return ret;
@@ -595,7 +594,8 @@ static int csi_idmac_setup(struct csi_pr
return 0;
}
-static int csi_idmac_start(struct csi_priv *priv)
+static int csi_idmac_start(struct csi_priv *priv,
+ struct v4l2_mbus_config *mbus_cfg)
{
struct imx_media_video_dev *vdev = priv->vdev;
int ret;
@@ -619,7 +619,7 @@ static int csi_idmac_start(struct csi_pr
priv->last_eof = false;
priv->nfb4eof = false;
- ret = csi_idmac_setup(priv);
+ ret = csi_idmac_setup(priv, mbus_cfg);
if (ret) {
v4l2_err(&priv->sd, "csi_idmac_setup failed: %d\n", ret);
goto out_free_dma_buf;
@@ -701,7 +701,8 @@ static void csi_idmac_stop(struct csi_pr
}
/* Update the CSI whole sensor and active windows */
-static int csi_setup(struct csi_priv *priv)
+static int csi_setup(struct csi_priv *priv,
+ struct v4l2_mbus_config *mbus_cfg)
{
struct v4l2_mbus_framefmt *infmt, *outfmt;
const struct imx_media_pixfmt *incc;
@@ -719,7 +720,7 @@ static int csi_setup(struct csi_priv *pr
* if cycles is set, we need to handle this over multiple cycles as
* generic/bayer data
*/
- if (is_parallel_bus(&priv->mbus_cfg) && incc->cycles) {
+ if (is_parallel_bus(mbus_cfg) && incc->cycles) {
if_fmt.width *= incc->cycles;
crop.width *= incc->cycles;
}
@@ -730,7 +731,7 @@ static int csi_setup(struct csi_priv *pr
priv->crop.width == 2 * priv->compose.width,
priv->crop.height == 2 * priv->compose.height);
- ipu_csi_init_interface(priv->csi, &priv->mbus_cfg, &if_fmt, outfmt);
+ ipu_csi_init_interface(priv->csi, mbus_cfg, &if_fmt, outfmt);
ipu_csi_set_dest(priv->csi, priv->dest);
@@ -745,9 +746,17 @@ static int csi_setup(struct csi_priv *pr
static int csi_start(struct csi_priv *priv)
{
+ struct v4l2_mbus_config mbus_cfg = { .type = 0 };
struct v4l2_fract *input_fi, *output_fi;
int ret;
+ ret = csi_get_upstream_mbus_config(priv, &mbus_cfg);
+ if (ret) {
+ v4l2_err(&priv->sd,
+ "failed to get upstream media bus configuration\n");
+ return ret;
+ }
+
input_fi = &priv->frame_interval[CSI_SINK_PAD];
output_fi = &priv->frame_interval[priv->active_output_pad];
@@ -758,7 +767,7 @@ static int csi_start(struct csi_priv *pr
return ret;
/* Skip first few frames from a BT.656 source */
- if (priv->mbus_cfg.type == V4L2_MBUS_BT656) {
+ if (mbus_cfg.type == V4L2_MBUS_BT656) {
u32 delay_usec, bad_frames = 20;
delay_usec = DIV_ROUND_UP_ULL((u64)USEC_PER_SEC *
@@ -769,12 +778,12 @@ static int csi_start(struct csi_priv *pr
}
if (priv->dest == IPU_CSI_DEST_IDMAC) {
- ret = csi_idmac_start(priv);
+ ret = csi_idmac_start(priv, &mbus_cfg);
if (ret)
goto stop_upstream;
}
- ret = csi_setup(priv);
+ ret = csi_setup(priv, &mbus_cfg);
if (ret)
goto idmac_stop;
@@ -1138,7 +1147,6 @@ static int csi_link_validate(struct v4l2
mutex_lock(&priv->lock);
- priv->mbus_cfg = mbus_cfg;
is_csi2 = !is_parallel_bus(&mbus_cfg);
if (is_csi2) {
/*
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 069/201] media: i2c: ov08d10: fix image vertical start setting
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (67 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 068/201] media: staging: imx: request mbus_config in csi_start Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 070/201] media: i2c: ov08d10: fix runtime PM handling in probe Greg Kroah-Hartman
` (137 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matthias Fend, Sakari Ailus,
Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthias Fend <matthias.fend@emfend.at>
commit 5d150fa0f16096d736bd24d13e04495da5116fab upstream.
The current settings for the "image vertical start" register appear to be
incorrect. While this only results in an incorrect start line for native
modes, this faulty setting causes actual problems in binning mode. At least
on an i.MX8MP test system, only corrupted frames could be received.
To correct this, the recommended settings from the reference register sets
are used for all modes. Since this shifts the start by one line, the Bayer
pattern also changes, which has also been corrected.
Fixes: 7be91e02ed57 ("media: i2c: Add ov08d10 camera sensor driver")
Cc: stable@vger.kernel.org
Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/i2c/ov08d10.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/media/i2c/ov08d10.c
+++ b/drivers/media/i2c/ov08d10.c
@@ -217,7 +217,7 @@ static const struct ov08d10_reg lane_2_m
{0x9a, 0x30},
{0xa8, 0x02},
{0xfd, 0x02},
- {0xa1, 0x01},
+ {0xa1, 0x00},
{0xa2, 0x09},
{0xa3, 0x9c},
{0xa5, 0x00},
@@ -335,7 +335,7 @@ static const struct ov08d10_reg lane_2_m
{0x9a, 0x30},
{0xa8, 0x02},
{0xfd, 0x02},
- {0xa1, 0x09},
+ {0xa1, 0x08},
{0xa2, 0x09},
{0xa3, 0x90},
{0xa5, 0x08},
@@ -467,7 +467,7 @@ static const struct ov08d10_reg lane_2_m
{0xaa, 0xd0},
{0xab, 0x06},
{0xac, 0x68},
- {0xa1, 0x09},
+ {0xa1, 0x04},
{0xa2, 0x04},
{0xa3, 0xc8},
{0xa5, 0x04},
@@ -613,8 +613,8 @@ static const struct ov08d10_lane_cfg lan
static u32 ov08d10_get_format_code(struct ov08d10 *ov08d10)
{
static const u32 codes[2][2] = {
- { MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SRGGB10_1X10},
- { MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SGBRG10_1X10},
+ { MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SGBRG10_1X10 },
+ { MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SRGGB10_1X10 },
};
return codes[ov08d10->vflip->val][ov08d10->hflip->val];
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 070/201] media: i2c: ov08d10: fix runtime PM handling in probe
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (68 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 069/201] media: i2c: ov08d10: fix image vertical start setting Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 071/201] media: omap3isp: drop the use count of v4l2 pipeline Greg Kroah-Hartman
` (136 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Philipp Zabel, Matthias Fend,
Sakari Ailus, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthias Fend <matthias.fend@emfend.at>
commit 35c7046be2be5e60be8128facb359a47f39e99cd upstream.
Set the device's runtime PM status and enable runtime PM before registering
the async sub-device. This is needed to avoid the case where the device is
runtime PM resumed while runtime PM has not been enabled yet.
Remove the related, non-driver-specific comment while at it.
Fixes: 7be91e02ed57 ("media: i2c: Add ov08d10 camera sensor driver")
Cc: stable@vger.kernel.org
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/i2c/ov08d10.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
--- a/drivers/media/i2c/ov08d10.c
+++ b/drivers/media/i2c/ov08d10.c
@@ -1430,6 +1430,9 @@ static int ov08d10_probe(struct i2c_clie
goto probe_error_v4l2_ctrl_handler_free;
}
+ pm_runtime_set_active(ov08d10->dev);
+ pm_runtime_enable(ov08d10->dev);
+
ret = v4l2_async_register_subdev_sensor(&ov08d10->sd);
if (ret < 0) {
dev_err(ov08d10->dev, "failed to register V4L2 subdev: %d",
@@ -1437,17 +1440,13 @@ static int ov08d10_probe(struct i2c_clie
goto probe_error_media_entity_cleanup;
}
- /*
- * Device is already turned on by i2c-core with ACPI domain PM.
- * Enable runtime PM and turn off the device.
- */
- pm_runtime_set_active(ov08d10->dev);
- pm_runtime_enable(ov08d10->dev);
pm_runtime_idle(ov08d10->dev);
return 0;
probe_error_media_entity_cleanup:
+ pm_runtime_disable(ov08d10->dev);
+ pm_runtime_set_suspended(ov08d10->dev);
media_entity_cleanup(&ov08d10->sd.entity);
probe_error_v4l2_ctrl_handler_free:
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 071/201] media: omap3isp: drop the use count of v4l2 pipeline
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (69 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 070/201] media: i2c: ov08d10: fix runtime PM handling in probe Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 072/201] media: iris: fix QCOM_MDT_LOADER dependency Greg Kroah-Hartman
` (135 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Haoxiang Li, Sakari Ailus,
Mauro Carvalho Chehab
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
commit 9da49bd9d4224035cff39b40d7395310abb10201 upstream.
In isp_video_open(), drop the use count of v4l2
pipeline if vb2_queue_init() fails.
Fixes: 8fd390b89cc8 ("media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put}")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/ti/omap3isp/ispvideo.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/media/platform/ti/omap3isp/ispvideo.c
+++ b/drivers/media/platform/ti/omap3isp/ispvideo.c
@@ -1403,6 +1403,7 @@ static int isp_video_open(struct file *f
ret = vb2_queue_init(&handle->queue);
if (ret < 0) {
+ v4l2_pipeline_pm_put(&video->video.entity);
omap3isp_put(video->isp);
goto done;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 072/201] media: iris: fix QCOM_MDT_LOADER dependency
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (70 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 071/201] media: omap3isp: drop the use count of v4l2 pipeline Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 073/201] media: iris: Fix use-after-free in iris_release_internal_buffers() Greg Kroah-Hartman
` (134 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Arnd Bergmann, Konrad Dybcio,
Dikshita Agarwal, Bryan ODonoghue, Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <arnd@arndb.de>
commit a297c5165f91366cbc3490e630aabd1c0f70efb8 upstream.
When build-testined with CONFIG_QCOM_MDT_LOADER=m and VIDEO_QCOM_IRIS=y,
the kernel fails to link:
x86_64-linux-ld: drivers/media/platform/qcom/iris/iris_firmware.o: in function `iris_fw_load':
iris_firmware.c:(.text+0xb0): undefined reference to `qcom_mdt_get_size'
iris_firmware.c:(.text+0xfd): undefined reference to `qcom_mdt_load'
The problem is the conditional 'select' statement. Change this to
make the driver built-in here regardless of CONFIG_ARCH_QCOM.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Fixes: d19b163356b8 ("media: iris: implement video firmware load/unload")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/iris/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/platform/qcom/iris/Kconfig
+++ b/drivers/media/platform/qcom/iris/Kconfig
@@ -3,7 +3,7 @@ config VIDEO_QCOM_IRIS
depends on VIDEO_DEV
depends on ARCH_QCOM || COMPILE_TEST
select V4L2_MEM2MEM_DEV
- select QCOM_MDT_LOADER if ARCH_QCOM
+ select QCOM_MDT_LOADER
select QCOM_SCM
select VIDEOBUF2_DMA_CONTIG
help
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 073/201] media: iris: Fix use-after-free in iris_release_internal_buffers()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (71 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 072/201] media: iris: fix QCOM_MDT_LOADER dependency Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 074/201] media: qcom: camss: Fix csid clock configuration for sa8775p Greg Kroah-Hartman
` (133 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dan Carpenter, Dikshita Agarwal,
Vikash Garodia, Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
commit f27cfdcfc916bb59297825805f4c3499f89f9e76 upstream.
The recent change in commit 1dabf00ee206 ("media: iris: gen1: Destroy
internal buffers after FW releases") introduced a regression where
session_release_buf() may free the buffer. The caller,
iris_release_internal_buffers(), continued to access `buffer` after the
call, leading to a potential use-after-free.
Fix this by setting BUF_ATTR_PENDING_RELEASE before calling
session_release_buf(), and reverting the flag if the call fails. This
ensures no dereference occurs after potential freeing.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Closes: https://lore.kernel.org/lkml/aYXvKAX3Pg3sL37P@stanley.mountain/#r
Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Fixes: 1dabf00ee206 ("media: iris: gen1: Destroy internal buffers after FW releases")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/iris/iris_buffer.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/media/platform/qcom/iris/iris_buffer.c
+++ b/drivers/media/platform/qcom/iris/iris_buffer.c
@@ -582,10 +582,12 @@ static int iris_release_internal_buffers
continue;
if (!(buffer->attr & BUF_ATTR_QUEUED))
continue;
+ buffer->attr |= BUF_ATTR_PENDING_RELEASE;
ret = hfi_ops->session_release_buf(inst, buffer);
- if (ret)
+ if (ret) {
+ buffer->attr &= ~BUF_ATTR_PENDING_RELEASE;
return ret;
- buffer->attr |= BUF_ATTR_PENDING_RELEASE;
+ }
}
return 0;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 074/201] media: qcom: camss: Fix csid clock configuration for sa8775p
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (72 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 073/201] media: iris: Fix use-after-free in iris_release_internal_buffers() Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 075/201] media: qcom: camss: Fix csid IRQ offset " Greg Kroah-Hartman
` (132 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wenmeng Liu, Bryan ODonoghue,
Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
commit fe56c674118aa46da1a3e65aa22ca709ebd7d812 upstream.
Fix the mismatch between clock list and clock rate table for CSID lite
instances. The current implementation has 5 clocks defined but only 2
are actually needed (vfe_lite_csid and vfe_lite_cphy_rx), while the
clock rate table doesn't match this configuration.
Update both clock list and rate table to maintain consistency:
- Remove unused clocks: cpas_vfe_lite, vfe_lite_ahb, vfe_lite
- Update clock rate table to match the remaining two clocks
Signed-off-by: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Fixes: ed03e99de0fa ("media: qcom: camss: Add support for CSID 690")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/camss/camss.c | 40 +++++++++++-------------------
1 file changed, 15 insertions(+), 25 deletions(-)
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -3598,12 +3598,10 @@ static const struct camss_subdev_resourc
/* CSID2 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
- "vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" },
.clock_rate = {
- { 0, 0, 400000000, 400000000, 0},
- { 0, 0, 400000000, 480000000, 0}
+ { 400000000, 480000000 },
+ { 400000000, 480000000 }
},
.reg = { "csid_lite0" },
.interrupt = { "csid_lite0" },
@@ -3617,12 +3615,10 @@ static const struct camss_subdev_resourc
/* CSID3 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
- "vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" },
.clock_rate = {
- { 0, 0, 400000000, 400000000, 0},
- { 0, 0, 400000000, 480000000, 0}
+ { 400000000, 480000000 },
+ { 400000000, 480000000 }
},
.reg = { "csid_lite1" },
.interrupt = { "csid_lite1" },
@@ -3636,12 +3632,10 @@ static const struct camss_subdev_resourc
/* CSID4 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
- "vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" },
.clock_rate = {
- { 0, 0, 400000000, 400000000, 0},
- { 0, 0, 400000000, 480000000, 0}
+ { 400000000, 480000000 },
+ { 400000000, 480000000 }
},
.reg = { "csid_lite2" },
.interrupt = { "csid_lite2" },
@@ -3655,12 +3649,10 @@ static const struct camss_subdev_resourc
/* CSID5 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
- "vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" },
.clock_rate = {
- { 0, 0, 400000000, 400000000, 0},
- { 0, 0, 400000000, 480000000, 0}
+ { 400000000, 480000000 },
+ { 400000000, 480000000 }
},
.reg = { "csid_lite3" },
.interrupt = { "csid_lite3" },
@@ -3674,12 +3666,10 @@ static const struct camss_subdev_resourc
/* CSID6 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
- "vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx" },
.clock_rate = {
- { 0, 0, 400000000, 400000000, 0},
- { 0, 0, 400000000, 480000000, 0}
+ { 400000000, 480000000 },
+ { 400000000, 480000000 }
},
.reg = { "csid_lite4" },
.interrupt = { "csid_lite4" },
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 075/201] media: qcom: camss: Fix csid IRQ offset for sa8775p
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (73 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 074/201] media: qcom: camss: Fix csid clock configuration for sa8775p Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 076/201] media: qcom: iris: increase H265D_MAX_SLICE to fix H.265 decoding on SC7280 Greg Kroah-Hartman
` (131 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wenmeng Liu, Bryan ODonoghue,
Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
commit dd1b373941079cc102cc18bc68884e18245f5912 upstream.
Fix BUF_DONE_IRQ_STATUS_RDI_OFFSET calculation for csid lite on
sa8775p platform. The offset should be 0 for csid lite on sa8775p,
Signed-off-by: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Fixes: ed03e99de0fa ("media: qcom: camss: Add support for CSID 690")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/camss/camss-csid-gen3.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/media/platform/qcom/camss/camss-csid-gen3.c
+++ b/drivers/media/platform/qcom/camss/camss-csid-gen3.c
@@ -48,9 +48,9 @@
#define IS_CSID_690(csid) ((csid->camss->res->version == CAMSS_8775P) \
|| (csid->camss->res->version == CAMSS_8300))
#define CSID_BUF_DONE_IRQ_STATUS 0x8C
-#define BUF_DONE_IRQ_STATUS_RDI_OFFSET (csid_is_lite(csid) ?\
- 1 : (IS_CSID_690(csid) ?\
- 13 : 14))
+#define BUF_DONE_IRQ_STATUS_RDI_OFFSET (csid_is_lite(csid) ? \
+ ((IS_CSID_690(csid) ? 0 : 1)) : \
+ ((IS_CSID_690(csid) ? 13 : 14)))
#define CSID_BUF_DONE_IRQ_MASK 0x90
#define CSID_BUF_DONE_IRQ_CLEAR 0x94
#define CSID_BUF_DONE_IRQ_SET 0x98
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 076/201] media: qcom: iris: increase H265D_MAX_SLICE to fix H.265 decoding on SC7280
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (74 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 075/201] media: qcom: camss: Fix csid IRQ offset " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 077/201] media: venus: fix QCOM_MDT_LOADER dependency Greg Kroah-Hartman
` (130 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dmitry Baryshkov, Dikshita Agarwal,
Vikash Garodia, Konrad Dybcio, Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
commit 3e0b2053751657ed2924adfe3ff25b1450231e33 upstream.
Follow the commit bfe1326573ff ("venus: Fix for H265 decoding failure.")
and increase H265D_MAX_SLICE following firmware requirements on that
platform. Otherwise decoding of the H.265 streams fails with the
"insufficient scratch_1 buffer size" from the firmware.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
[bod: Fixed commit log withthe => with the]
Fixes: e1f5d32608ec ("media: iris: Add internal buffer calculation for HEVC and VP9 decoders")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
+++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
@@ -67,7 +67,7 @@ struct iris_inst;
#define SIZE_DOLBY_RPU_METADATA (41 * 1024)
#define H264_CABAC_HDR_RATIO_HD_TOT 1
#define H264_CABAC_RES_RATIO_HD_TOT 3
-#define H265D_MAX_SLICE 1200
+#define H265D_MAX_SLICE 3600
#define SIZE_H265D_HW_PIC_T SIZE_H264D_HW_PIC_T
#define H265_CABAC_HDR_RATIO_HD_TOT 2
#define H265_CABAC_RES_RATIO_HD_TOT 2
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 077/201] media: venus: fix QCOM_MDT_LOADER dependency
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (75 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 076/201] media: qcom: iris: increase H265D_MAX_SLICE to fix H.265 decoding on SC7280 Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 078/201] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init() Greg Kroah-Hartman
` (129 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Arnd Bergmann, Konrad Dybcio,
Dikshita Agarwal, Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <arnd@arndb.de>
commit aa23c94cc433b145d1ce93820ecdfe16d8940e28 upstream.
When build-testined with CONFIG_QCOM_MDT_LOADER=m and VIDEO_QCOM_VENUS=y,
the kernel fails to link:
x86_64-linux-ld: drivers/media/platform/qcom/venus/firmware.o: in function `venus_boot':
firmware.c:(.text+0x1e3): undefined reference to `qcom_mdt_get_size'
firmware.c:(.text+0x25a): undefined reference to `qcom_mdt_load'
firmware.c:(.text+0x272): undefined reference to `qcom_mdt_load_no_init'
The problem is the conditional 'select' statement. Change this to
make the driver built-in here regardless of CONFIG_ARCH_QCOM,
same as for the similar IRIS driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Fixes: 0399b696f7f4 ("media: venus: fix compile-test build on non-qcom ARM platform")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/venus/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/platform/qcom/venus/Kconfig
+++ b/drivers/media/platform/qcom/venus/Kconfig
@@ -4,7 +4,7 @@ config VIDEO_QCOM_VENUS
depends on VIDEO_DEV && QCOM_SMEM
depends on (ARCH_QCOM && ARM64 && IOMMU_API) || COMPILE_TEST
select OF_DYNAMIC if ARCH_QCOM
- select QCOM_MDT_LOADER if ARCH_QCOM
+ select QCOM_MDT_LOADER
select QCOM_SCM
select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 078/201] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (76 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 077/201] media: venus: fix QCOM_MDT_LOADER dependency Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 079/201] media: iris: fix use-after-free of fmt_src during MBPF check Greg Kroah-Hartman
` (128 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Thomas Fourier, Dikshita Agarwal,
Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Fourier <fourier.thomas@gmail.com>
commit 4a49ae56b0e4268d48fd96babe0cc68596bc301a upstream.
The core->iface_q_table_vaddr buffer is alloc'd with size queue_size
but freed with sizeof(*q_tbl_hdr) which is different.
Change the dma_free_attrs() size.
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Fixes: d7378f84e94e ("media: iris: introduce iris core state management with shared queues")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/iris/iris_hfi_queue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/platform/qcom/iris/iris_hfi_queue.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
@@ -263,7 +263,7 @@ int iris_hfi_queues_init(struct iris_cor
GFP_KERNEL, DMA_ATTR_WRITE_COMBINE);
if (!core->sfr_vaddr) {
dev_err(core->dev, "sfr alloc and map failed\n");
- dma_free_attrs(core->dev, sizeof(*q_tbl_hdr), core->iface_q_table_vaddr,
+ dma_free_attrs(core->dev, queue_size, core->iface_q_table_vaddr,
core->iface_q_table_daddr, DMA_ATTR_WRITE_COMBINE);
return -ENOMEM;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 079/201] media: iris: fix use-after-free of fmt_src during MBPF check
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (77 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 078/201] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init() Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 080/201] media: iris: switch to hardware mode after firmware boot Greg Kroah-Hartman
` (127 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vikash Garodia, Vishnu Reddy,
Dikshita Agarwal, Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
commit 3d9593ad1a58c5acc3e5fa2a48222bb7632e6812 upstream.
During concurrency testing, multiple instances can run in parallel, and
each instance uses its own inst->lock while the core->lock protects the
list of active instances. The race happens because these locks cover
different scopes, inst->lock protects only the internals of a single
instance, while the Macro Blocks Per Frame (MBPF) checker walks the
core list under core->lock and reads fields like fmt_src->width and
fmt_src->height. At the same time, iris_close() may free fmt_src and
fmt_dst under inst->lock while the instance is still present in the core
list. This allows a situation where the MBPF checker, still iterating
through the core list, reaches an instance whose fmt_src was already
freed by another thread and ends up dereferencing a dangling pointer,
resulting in a use-after-free. This happens because the MBPF checker
assumes that any instance in the core list is fully valid, but the
freeing of fmt_src and fmt_dst without removing the instance from the
core list is not correct.
The correct ordering is to defer freeing fmt_src and fmt_dst until after
the instance has been removed from the core list and all teardown under
the core lock has completed, ensuring that no dangling pointers are ever
exposed during MBPF checks.
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Fixes: 5ad964ad5656 ("media: iris: Initialize and deinitialize encoder instance structure")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/iris/iris_vdec.c | 6 ------
drivers/media/platform/qcom/iris/iris_vdec.h | 1 -
drivers/media/platform/qcom/iris/iris_venc.c | 6 ------
drivers/media/platform/qcom/iris/iris_venc.h | 1 -
drivers/media/platform/qcom/iris/iris_vidc.c | 6 ++----
5 files changed, 2 insertions(+), 18 deletions(-)
--- a/drivers/media/platform/qcom/iris/iris_vdec.c
+++ b/drivers/media/platform/qcom/iris/iris_vdec.c
@@ -61,12 +61,6 @@ int iris_vdec_inst_init(struct iris_inst
return iris_ctrls_init(inst);
}
-void iris_vdec_inst_deinit(struct iris_inst *inst)
-{
- kfree(inst->fmt_dst);
- kfree(inst->fmt_src);
-}
-
static const struct iris_fmt iris_vdec_formats_cap[] = {
[IRIS_FMT_NV12] = {
.pixfmt = V4L2_PIX_FMT_NV12,
--- a/drivers/media/platform/qcom/iris/iris_vdec.h
+++ b/drivers/media/platform/qcom/iris/iris_vdec.h
@@ -9,7 +9,6 @@
struct iris_inst;
int iris_vdec_inst_init(struct iris_inst *inst);
-void iris_vdec_inst_deinit(struct iris_inst *inst);
int iris_vdec_enum_fmt(struct iris_inst *inst, struct v4l2_fmtdesc *f);
int iris_vdec_try_fmt(struct iris_inst *inst, struct v4l2_format *f);
int iris_vdec_s_fmt(struct iris_inst *inst, struct v4l2_format *f);
--- a/drivers/media/platform/qcom/iris/iris_venc.c
+++ b/drivers/media/platform/qcom/iris/iris_venc.c
@@ -79,12 +79,6 @@ int iris_venc_inst_init(struct iris_inst
return iris_ctrls_init(inst);
}
-void iris_venc_inst_deinit(struct iris_inst *inst)
-{
- kfree(inst->fmt_dst);
- kfree(inst->fmt_src);
-}
-
static const struct iris_fmt iris_venc_formats_cap[] = {
[IRIS_FMT_H264] = {
.pixfmt = V4L2_PIX_FMT_H264,
--- a/drivers/media/platform/qcom/iris/iris_venc.h
+++ b/drivers/media/platform/qcom/iris/iris_venc.h
@@ -9,7 +9,6 @@
struct iris_inst;
int iris_venc_inst_init(struct iris_inst *inst);
-void iris_venc_inst_deinit(struct iris_inst *inst);
int iris_venc_enum_fmt(struct iris_inst *inst, struct v4l2_fmtdesc *f);
int iris_venc_try_fmt(struct iris_inst *inst, struct v4l2_format *f);
int iris_venc_s_fmt(struct iris_inst *inst, struct v4l2_format *f);
--- a/drivers/media/platform/qcom/iris/iris_vidc.c
+++ b/drivers/media/platform/qcom/iris/iris_vidc.c
@@ -289,10 +289,6 @@ int iris_close(struct file *filp)
v4l2_m2m_ctx_release(inst->m2m_ctx);
v4l2_m2m_release(inst->m2m_dev);
mutex_lock(&inst->lock);
- if (inst->domain == DECODER)
- iris_vdec_inst_deinit(inst);
- else if (inst->domain == ENCODER)
- iris_venc_inst_deinit(inst);
iris_session_close(inst);
iris_inst_change_state(inst, IRIS_INST_DEINIT);
iris_v4l2_fh_deinit(inst, filp);
@@ -304,6 +300,8 @@ int iris_close(struct file *filp)
mutex_unlock(&inst->lock);
mutex_destroy(&inst->ctx_q_lock);
mutex_destroy(&inst->lock);
+ kfree(inst->fmt_src);
+ kfree(inst->fmt_dst);
kfree(inst);
return 0;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 080/201] media: iris: switch to hardware mode after firmware boot
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (78 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 079/201] media: iris: fix use-after-free of fmt_src during MBPF check Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 081/201] media: qcom: camss: Add missing clocks for VFE lite on sa8775p Greg Kroah-Hartman
` (126 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vishnu Reddy, Vikash Garodia,
Dikshita Agarwal, Dmitry Baryshkov, Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
commit 95a337f92f0a602d4f935315bfbc8bf07f475e65 upstream.
Currently the driver switches the vcodec GDSC to hardware (HW) mode
before firmware load and boot sequence. GDSC can be powered off, keeping
in hw mode, thereby the vcodec registers programmed in TrustZone (TZ)
carry default (reset) values.
Move the transition to HW mode after firmware load and boot sequence.
The bug was exposed with driver configuring different stream ids to
different devices via iommu-map. With registers carrying reset values,
VPU would not generate desired stream-id, thereby leading to SMMU fault.
For vpu4, when GDSC is switched to HW mode, there is a need to perform
the reset operation. Without reset, there are occasional issues of
register corruption observed. Hence the vpu GDSC switch also involves
the reset.
Co-developed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[bod: occassional => occasional]
Fixes: dde659d37036 ("media: iris: Introduce vpu ops for vpu4 with necessary hooks")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/iris/iris_core.c | 4 +++
drivers/media/platform/qcom/iris/iris_hfi_common.c | 4 +++
drivers/media/platform/qcom/iris/iris_vpu2.c | 1
drivers/media/platform/qcom/iris/iris_vpu3x.c | 9 ++-----
drivers/media/platform/qcom/iris/iris_vpu4x.c | 24 +++++++++++----------
drivers/media/platform/qcom/iris/iris_vpu_common.c | 16 ++++++++------
drivers/media/platform/qcom/iris/iris_vpu_common.h | 3 ++
7 files changed, 38 insertions(+), 23 deletions(-)
--- a/drivers/media/platform/qcom/iris/iris_core.c
+++ b/drivers/media/platform/qcom/iris/iris_core.c
@@ -75,6 +75,10 @@ int iris_core_init(struct iris_core *cor
if (ret)
goto error_unload_fw;
+ ret = iris_vpu_switch_to_hwmode(core);
+ if (ret)
+ goto error_unload_fw;
+
ret = iris_hfi_core_init(core);
if (ret)
goto error_unload_fw;
--- a/drivers/media/platform/qcom/iris/iris_hfi_common.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_common.c
@@ -159,6 +159,10 @@ int iris_hfi_pm_resume(struct iris_core
if (ret)
goto err_suspend_hw;
+ ret = iris_vpu_switch_to_hwmode(core);
+ if (ret)
+ goto err_suspend_hw;
+
ret = ops->sys_interframe_powercollapse(core);
if (ret)
goto err_suspend_hw;
--- a/drivers/media/platform/qcom/iris/iris_vpu2.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu2.c
@@ -44,4 +44,5 @@ const struct vpu_ops iris_vpu2_ops = {
.power_off_controller = iris_vpu_power_off_controller,
.power_on_controller = iris_vpu_power_on_controller,
.calc_freq = iris_vpu2_calc_freq,
+ .set_hwmode = iris_vpu_set_hwmode,
};
--- a/drivers/media/platform/qcom/iris/iris_vpu3x.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c
@@ -234,14 +234,8 @@ static int iris_vpu35_power_on_hw(struct
if (ret)
goto err_disable_hw_free_clk;
- ret = dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN], true);
- if (ret)
- goto err_disable_hw_clk;
-
return 0;
-err_disable_hw_clk:
- iris_disable_unprepare_clock(core, IRIS_HW_CLK);
err_disable_hw_free_clk:
iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK);
err_disable_axi_clk:
@@ -266,6 +260,7 @@ const struct vpu_ops iris_vpu3_ops = {
.power_off_controller = iris_vpu_power_off_controller,
.power_on_controller = iris_vpu_power_on_controller,
.calc_freq = iris_vpu3x_vpu4x_calculate_frequency,
+ .set_hwmode = iris_vpu_set_hwmode,
};
const struct vpu_ops iris_vpu33_ops = {
@@ -274,6 +269,7 @@ const struct vpu_ops iris_vpu33_ops = {
.power_off_controller = iris_vpu33_power_off_controller,
.power_on_controller = iris_vpu_power_on_controller,
.calc_freq = iris_vpu3x_vpu4x_calculate_frequency,
+ .set_hwmode = iris_vpu_set_hwmode,
};
const struct vpu_ops iris_vpu35_ops = {
@@ -283,4 +279,5 @@ const struct vpu_ops iris_vpu35_ops = {
.power_on_controller = iris_vpu35_vpu4x_power_on_controller,
.program_bootup_registers = iris_vpu35_vpu4x_program_bootup_registers,
.calc_freq = iris_vpu3x_vpu4x_calculate_frequency,
+ .set_hwmode = iris_vpu_set_hwmode,
};
--- a/drivers/media/platform/qcom/iris/iris_vpu4x.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu4x.c
@@ -252,21 +252,10 @@ static int iris_vpu4x_power_on_hardware(
ret = iris_vpu4x_power_on_apv(core);
if (ret)
goto disable_hw_clocks;
-
- iris_vpu4x_ahb_sync_reset_apv(core);
}
- iris_vpu4x_ahb_sync_reset_hardware(core);
-
- ret = iris_vpu4x_genpd_set_hwmode(core, true, efuse_value);
- if (ret)
- goto disable_apv_power_domain;
-
return 0;
-disable_apv_power_domain:
- if (!(efuse_value & DISABLE_VIDEO_APV_BIT))
- iris_vpu4x_power_off_apv(core);
disable_hw_clocks:
iris_vpu4x_disable_hardware_clocks(core, efuse_value);
disable_vpp1_power_domain:
@@ -359,6 +348,18 @@ disable_clocks_and_power:
iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN]);
}
+static int iris_vpu4x_set_hwmode(struct iris_core *core)
+{
+ u32 efuse_value = readl(core->reg_base + WRAPPER_EFUSE_MONITOR);
+
+ if (!(efuse_value & DISABLE_VIDEO_APV_BIT))
+ iris_vpu4x_ahb_sync_reset_apv(core);
+
+ iris_vpu4x_ahb_sync_reset_hardware(core);
+
+ return iris_vpu4x_genpd_set_hwmode(core, true, efuse_value);
+}
+
const struct vpu_ops iris_vpu4x_ops = {
.power_off_hw = iris_vpu4x_power_off_hardware,
.power_on_hw = iris_vpu4x_power_on_hardware,
@@ -366,4 +367,5 @@ const struct vpu_ops iris_vpu4x_ops = {
.power_on_controller = iris_vpu35_vpu4x_power_on_controller,
.program_bootup_registers = iris_vpu35_vpu4x_program_bootup_registers,
.calc_freq = iris_vpu3x_vpu4x_calculate_frequency,
+ .set_hwmode = iris_vpu4x_set_hwmode,
};
--- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
@@ -292,14 +292,8 @@ int iris_vpu_power_on_hw(struct iris_cor
if (ret && ret != -ENOENT)
goto err_disable_hw_clock;
- ret = dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN], true);
- if (ret)
- goto err_disable_hw_ahb_clock;
-
return 0;
-err_disable_hw_ahb_clock:
- iris_disable_unprepare_clock(core, IRIS_HW_AHB_CLK);
err_disable_hw_clock:
iris_disable_unprepare_clock(core, IRIS_HW_CLK);
err_disable_power:
@@ -308,6 +302,16 @@ err_disable_power:
return ret;
}
+int iris_vpu_set_hwmode(struct iris_core *core)
+{
+ return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN], true);
+}
+
+int iris_vpu_switch_to_hwmode(struct iris_core *core)
+{
+ return core->iris_platform_data->vpu_ops->set_hwmode(core);
+}
+
int iris_vpu35_vpu4x_power_off_controller(struct iris_core *core)
{
u32 clk_rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
--- a/drivers/media/platform/qcom/iris/iris_vpu_common.h
+++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h
@@ -21,6 +21,7 @@ struct vpu_ops {
int (*power_on_controller)(struct iris_core *core);
void (*program_bootup_registers)(struct iris_core *core);
u64 (*calc_freq)(struct iris_inst *inst, size_t data_size);
+ int (*set_hwmode)(struct iris_core *core);
};
int iris_vpu_boot_firmware(struct iris_core *core);
@@ -30,6 +31,8 @@ int iris_vpu_watchdog(struct iris_core *
int iris_vpu_prepare_pc(struct iris_core *core);
int iris_vpu_power_on_controller(struct iris_core *core);
int iris_vpu_power_on_hw(struct iris_core *core);
+int iris_vpu_set_hwmode(struct iris_core *core);
+int iris_vpu_switch_to_hwmode(struct iris_core *core);
int iris_vpu_power_on(struct iris_core *core);
int iris_vpu_power_off_controller(struct iris_core *core);
void iris_vpu_power_off_hw(struct iris_core *core);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 081/201] media: qcom: camss: Add missing clocks for VFE lite on sa8775p
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (79 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 080/201] media: iris: switch to hardware mode after firmware boot Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 082/201] drm/xe/hdcp: Add NULL check for media_gt in intel_hdcp_gsc_check_status() Greg Kroah-Hartman
` (125 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bryan ODonoghue, Wenmeng Liu,
Bryan ODonoghue, Hans Verkuil
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
commit d31fac47b39f5e1ed85a587688ca70b793e421b4 upstream.
Add missing required clocks (cpas_ahb and camnoc_axi) for VFE lite
instances on sa8775p platform. These clocks are necessary for proper
VFE lite operation:
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
Fixes: e7b59e1d06fb ("media: qcom: camss: Add support for VFE 690")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/qcom/camss/camss.c | 40 ++++++++++++++++++------------
1 file changed, 25 insertions(+), 15 deletions(-)
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -3742,15 +3742,17 @@ static const struct camss_subdev_resourc
/* VFE2 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
+ .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb",
"vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ "vfe_lite", "camnoc_axi"},
.clock_rate = {
- { 0, 0, 0, 0 },
+ { 0 },
+ { 0 },
{ 300000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 480000000, 600000000, 600000000, 600000000 },
+ { 400000000 },
},
.reg = { "vfe_lite0" },
.interrupt = { "vfe_lite0" },
@@ -3765,15 +3767,17 @@ static const struct camss_subdev_resourc
/* VFE3 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
+ .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb",
"vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ "vfe_lite", "camnoc_axi"},
.clock_rate = {
- { 0, 0, 0, 0 },
+ { 0 },
+ { 0 },
{ 300000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 480000000, 600000000, 600000000, 600000000 },
+ { 400000000 },
},
.reg = { "vfe_lite1" },
.interrupt = { "vfe_lite1" },
@@ -3788,15 +3792,17 @@ static const struct camss_subdev_resourc
/* VFE4 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
+ .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb",
"vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ "vfe_lite", "camnoc_axi"},
.clock_rate = {
- { 0, 0, 0, 0 },
+ { 0 },
+ { 0 },
{ 300000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 480000000, 600000000, 600000000, 600000000 },
+ { 400000000 },
},
.reg = { "vfe_lite2" },
.interrupt = { "vfe_lite2" },
@@ -3811,15 +3817,17 @@ static const struct camss_subdev_resourc
/* VFE5 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
+ .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb",
"vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ "vfe_lite", "camnoc_axi"},
.clock_rate = {
- { 0, 0, 0, 0 },
+ { 0 },
+ { 0 },
{ 300000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 480000000, 600000000, 600000000, 600000000 },
+ { 400000000 },
},
.reg = { "vfe_lite3" },
.interrupt = { "vfe_lite3" },
@@ -3834,15 +3842,17 @@ static const struct camss_subdev_resourc
/* VFE6 (lite) */
{
.regulators = {},
- .clock = { "cpas_vfe_lite", "vfe_lite_ahb",
+ .clock = { "cpas_ahb", "cpas_vfe_lite", "vfe_lite_ahb",
"vfe_lite_csid", "vfe_lite_cphy_rx",
- "vfe_lite"},
+ "vfe_lite", "camnoc_axi"},
.clock_rate = {
- { 0, 0, 0, 0 },
+ { 0 },
+ { 0 },
{ 300000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 400000000, 400000000, 400000000, 400000000 },
{ 480000000, 600000000, 600000000, 600000000 },
+ { 400000000 },
},
.reg = { "vfe_lite4" },
.interrupt = { "vfe_lite4" },
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 082/201] drm/xe/hdcp: Add NULL check for media_gt in intel_hdcp_gsc_check_status()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (80 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 081/201] media: qcom: camss: Add missing clocks for VFE lite on sa8775p Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 083/201] spi: mxs: fix controller deregistration Greg Kroah-Hartman
` (124 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matt Roper, Shuicheng Lin,
Gustavo Sousa, Matthew Brost
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gustavo Sousa <gustavo.sousa@intel.com>
commit 60a1e131a811b68703da58fd805ab359b704ab03 upstream.
When media GT is disabled via configfs, there is no allocation for
media_gt, which is kept as NULL. In such scenario,
intel_hdcp_gsc_check_status() results in a kernel pagefault error due to
>->uc.gsc being evaluated as an invalid memory address.
Fix that by introducing a NULL check on media_gt and bailing out early
if so.
While at it, also drop the NULL check for gsc, since it can't be NULL if
media_gt is not NULL.
v2:
- Get address for gsc only after checking that gt is not NULL.
(Shuicheng)
- Drop the NULL check for gsc. (Shuicheng)
v3:
- Add "Fixes" and "Cc: <stable...>" tags. (Matt)
Fixes: 4af50beb4e0f ("drm/xe: Use gsc_proxy_init_done to check proxy status")
Cc: <stable@vger.kernel.org> # v6.10+
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com>
Link: https://patch.msgid.link/20260416-check-for-null-media_gt-in-intel_hdcp_gsc_check_status-v2-1-9adb9fd3b621@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
(cherry picked from commit bfaf87e84ca3ca3f6e275f9ae56da47a8b55ffd1)
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/xe/display/xe_hdcp_gsc.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
+++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
@@ -37,9 +37,17 @@ static bool intel_hdcp_gsc_check_status(
struct xe_device *xe = to_xe_device(drm);
struct xe_tile *tile = xe_device_get_root_tile(xe);
struct xe_gt *gt = tile->media_gt;
- struct xe_gsc *gsc = >->uc.gsc;
+ struct xe_gsc *gsc;
- if (!gsc || !xe_uc_fw_is_available(&gsc->fw)) {
+ if (!gt) {
+ drm_dbg_kms(&xe->drm,
+ "not checking GSC status for HDCP2.x: media GT not present or disabled\n");
+ return false;
+ }
+
+ gsc = >->uc.gsc;
+
+ if (!xe_uc_fw_is_available(&gsc->fw)) {
drm_dbg_kms(&xe->drm,
"GSC Components not ready for HDCP2.x\n");
return false;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 083/201] spi: mxs: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (81 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 082/201] drm/xe/hdcp: Add NULL check for media_gt in intel_hdcp_gsc_check_status() Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 084/201] spi: mt65xx: " Greg Kroah-Hartman
` (123 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jingoo Han, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 8b0d0011af20fb547aa67a1cefbf320992fd5e92 upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: 33e195acf268 ("spi: mxs: use devm_spi_register_master()")
Cc: stable@vger.kernel.org # 3.13
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-mxs.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -619,7 +619,7 @@ static int mxs_spi_probe(struct platform
if (ret)
goto out_pm_runtime_put;
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret) {
dev_err(&pdev->dev, "Cannot register SPI host, %d\n", ret);
goto out_pm_runtime_put;
@@ -650,11 +650,17 @@ static void mxs_spi_remove(struct platfo
spi = spi_controller_get_devdata(host);
ssp = &spi->ssp;
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev))
mxs_spi_runtime_suspend(&pdev->dev);
dma_release_channel(ssp->dmach);
+
+ spi_controller_put(host);
}
static struct platform_driver mxs_spi_driver = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 084/201] spi: mt65xx: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (82 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 083/201] spi: mxs: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 085/201] spi: dln2: " Greg Kroah-Hartman
` (122 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Leilk Liu, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 2ad30599cccc572ba2fc11010670eb6e01ea6bfc upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: a568231f4632 ("spi: mediatek: Add spi bus for Mediatek MT8173")
Cc: stable@vger.kernel.org # 4.3: ace145802350
Cc: stable@vger.kernel.org # 4.3
Cc: Leilk Liu <leilk.liu@mediatek.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-mt65xx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -1325,7 +1325,7 @@ static int mtk_spi_probe(struct platform
pm_runtime_enable(dev);
- ret = devm_spi_register_controller(dev, host);
+ ret = spi_register_controller(host);
if (ret) {
pm_runtime_disable(dev);
return dev_err_probe(dev, ret, "failed to register host\n");
@@ -1340,6 +1340,8 @@ static void mtk_spi_remove(struct platfo
struct mtk_spi *mdata = spi_controller_get_devdata(host);
int ret;
+ spi_unregister_controller(host);
+
cpu_latency_qos_remove_request(&mdata->qos_request);
if (mdata->use_spimem && !completion_done(&mdata->spimem_done))
complete(&mdata->spimem_done);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 085/201] spi: dln2: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (83 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 084/201] spi: mt65xx: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 086/201] spi: s3c64xx: " Greg Kroah-Hartman
` (121 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurentiu Palcu, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit c353020fbfa8514ee91a6de2d88de4e5edca5803 upstream.
Make sure to deregister the controller before disabling it to allow
SPI device drivers to do I/O during deregistration.
Fixes: 3d8c0d749da3 ("spi: add support for DLN-2 USB-SPI adapter")
Cc: stable@vger.kernel.org # 4.0
Cc: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-12-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-dln2.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-dln2.c
+++ b/drivers/spi/spi-dln2.c
@@ -758,7 +758,7 @@ static int dln2_spi_probe(struct platfor
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret < 0) {
dev_err(&pdev->dev, "Failed to register host\n");
goto exit_register;
@@ -783,10 +783,16 @@ static void dln2_spi_remove(struct platf
struct spi_controller *host = platform_get_drvdata(pdev);
struct dln2_spi *dln2 = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
pm_runtime_disable(&pdev->dev);
if (dln2_spi_enable(dln2, false) < 0)
dev_err(&pdev->dev, "Failed to disable SPI module\n");
+
+ spi_controller_put(host);
}
#ifdef CONFIG_PM_SLEEP
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 086/201] spi: s3c64xx: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (84 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 085/201] spi: dln2: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 087/201] spi: fsl-espi: " Greg Kroah-Hartman
` (120 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit c1446b61e472da24d1547525193467b4bea4a7cb upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: 91800f0e9005 ("spi/s3c64xx: Use managed registration")
Cc: stable@vger.kernel.org # 3.13: 76fbad410c0f
Cc: stable@vger.kernel.org # 3.13
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-12-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-s3c64xx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1369,7 +1369,7 @@ static int s3c64xx_spi_probe(struct plat
S3C64XX_SPI_INT_TX_OVERRUN_EN | S3C64XX_SPI_INT_TX_UNDERRUN_EN,
sdd->regs + S3C64XX_SPI_INT_EN);
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret != 0) {
dev_err(&pdev->dev, "cannot register SPI host: %d\n", ret);
goto err_pm_put;
@@ -1399,6 +1399,8 @@ static void s3c64xx_spi_remove(struct pl
pm_runtime_get_sync(&pdev->dev);
+ spi_unregister_controller(host);
+
writel(0, sdd->regs + S3C64XX_SPI_INT_EN);
pm_runtime_put_noidle(&pdev->dev);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 087/201] spi: fsl-espi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (85 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 086/201] spi: s3c64xx: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 088/201] spi: omap2-mcspi: " Greg Kroah-Hartman
` (119 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Heiner Kallweit, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit e506a700a7ad229f5c8f01f4b8350119cccb4158 upstream.
Make sure to deregister the controller before disabling runtime PM
(which can leave the controller disabled) to allow SPI device drivers to
do I/O during deregistration.
Fixes: e9abb4db8d10 ("spi: fsl-espi: add runtime PM")
Cc: stable@vger.kernel.org # 4.3
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-14-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-fsl-espi.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -718,7 +718,7 @@ static int fsl_espi_probe(struct device
pm_runtime_enable(dev);
pm_runtime_get_sync(dev);
- ret = devm_spi_register_controller(dev, host);
+ ret = spi_register_controller(host);
if (ret < 0)
goto err_pm;
@@ -782,7 +782,15 @@ static int of_fsl_espi_probe(struct plat
static void of_fsl_espi_remove(struct platform_device *dev)
{
+ struct spi_controller *host = platform_get_drvdata(dev);
+
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
pm_runtime_disable(&dev->dev);
+
+ spi_controller_put(host);
}
#ifdef CONFIG_PM_SLEEP
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 088/201] spi: omap2-mcspi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (86 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 087/201] spi: fsl-espi: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 089/201] spi: pic32: " Greg Kroah-Hartman
` (118 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit fb45f95c377e4a4bdece2c5e17643b459c9c13e7 upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: ccdc7bf92573 ("SPI: omap2_mcspi driver")
Cc: stable@vger.kernel.org # 2.6.23
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-6-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-omap2-mcspi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1585,7 +1585,7 @@ static int omap2_mcspi_probe(struct plat
if (status < 0)
goto disable_pm;
- status = devm_spi_register_controller(&pdev->dev, ctlr);
+ status = spi_register_controller(ctlr);
if (status < 0)
goto disable_pm;
@@ -1606,11 +1606,17 @@ static void omap2_mcspi_remove(struct pl
struct spi_controller *ctlr = platform_get_drvdata(pdev);
struct omap2_mcspi *mcspi = spi_controller_get_devdata(ctlr);
+ spi_controller_get(ctlr);
+
+ spi_unregister_controller(ctlr);
+
omap2_mcspi_release_dma(ctlr);
pm_runtime_dont_use_autosuspend(mcspi->dev);
pm_runtime_put_sync(mcspi->dev);
pm_runtime_disable(&pdev->dev);
+
+ spi_controller_put(ctlr);
}
/* work with hotplug and coldplug */
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 089/201] spi: pic32: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (87 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 088/201] spi: omap2-mcspi: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 090/201] spi: ep93xx: " Greg Kroah-Hartman
` (117 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Purna Chandra Mandal, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 6b627bfe0c44e064aba464839e430dc1ca2b0bb8 upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: 1bcb9f8ceb67 ("spi: spi-pic32: Add PIC32 SPI master driver")
Cc: stable@vger.kernel.org # 4.7
Cc: Purna Chandra Mandal <purna.mandal@microchip.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-7-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-pic32.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/drivers/spi/spi-pic32.c
+++ b/drivers/spi/spi-pic32.c
@@ -821,7 +821,7 @@ static int pic32_spi_probe(struct platfo
}
/* register host */
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret) {
dev_err(&host->dev, "failed registering spi host\n");
goto err_bailout;
@@ -840,11 +840,16 @@ err_host:
static void pic32_spi_remove(struct platform_device *pdev)
{
- struct pic32_spi *pic32s;
+ struct pic32_spi *pic32s = platform_get_drvdata(pdev);
+
+ spi_controller_get(pic32s->host);
+
+ spi_unregister_controller(pic32s->host);
- pic32s = platform_get_drvdata(pdev);
pic32_spi_disable(pic32s);
pic32_spi_dma_unprep(pic32s);
+
+ spi_controller_put(pic32s->host);
}
static const struct of_device_id pic32_spi_of_match[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 090/201] spi: ep93xx: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (88 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 089/201] spi: pic32: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 091/201] spi: mtk-nor: " Greg Kroah-Hartman
` (116 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit f4838934b695a58eda0833583cb8028e73a19529 upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: 011f23a3c2f2 ("spi/ep93xx: implemented driver for Cirrus EP93xx SPI controller")
Cc: stable@vger.kernel.org # 2.6.35
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-13-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-ep93xx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -689,7 +689,7 @@ static int ep93xx_spi_probe(struct platf
/* make sure that the hardware is disabled */
writel(0, espi->mmio + SSPCR1);
- error = devm_spi_register_controller(&pdev->dev, host);
+ error = spi_register_controller(host);
if (error) {
dev_err(&pdev->dev, "failed to register SPI host\n");
goto fail_free_dma;
@@ -713,7 +713,13 @@ static void ep93xx_spi_remove(struct pla
struct spi_controller *host = platform_get_drvdata(pdev);
struct ep93xx_spi *espi = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
ep93xx_spi_release_dma(espi);
+
+ spi_controller_put(host);
}
static const struct of_device_id ep93xx_spi_of_ids[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 091/201] spi: mtk-nor: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (89 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 090/201] spi: ep93xx: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 092/201] spi: pl022: " Greg Kroah-Hartman
` (115 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Chuanhong Guo, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 76336f24934621db286cabb20b483773ee01dcaa upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: 881d1ee9fe81 ("spi: add support for mediatek spi-nor controller")
Cc: stable@vger.kernel.org # 5.7
Cc: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-mtk-nor.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-mtk-nor.c
+++ b/drivers/spi/spi-mtk-nor.c
@@ -913,7 +913,7 @@ static int mtk_nor_probe(struct platform
pm_runtime_enable(&pdev->dev);
pm_runtime_get_noresume(&pdev->dev);
- ret = devm_spi_register_controller(&pdev->dev, ctlr);
+ ret = spi_register_controller(ctlr);
if (ret < 0)
goto err_probe;
@@ -938,6 +938,8 @@ static void mtk_nor_remove(struct platfo
struct spi_controller *ctlr = dev_get_drvdata(&pdev->dev);
struct mtk_nor *sp = spi_controller_get_devdata(ctlr);
+ spi_unregister_controller(ctlr);
+
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 092/201] spi: pl022: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (90 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 091/201] spi: mtk-nor: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 093/201] spi: ch341: fix devres lifetime Greg Kroah-Hartman
` (114 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 994b33366be9148240690e3e94bffe17c4d89458 upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: b43d65f7e818 ("[ARM] 5546/1: ARM PL022 SSP/SPI driver v3")
Cc: stable@vger.kernel.org # 2.6.31
Cc: Linus Walleij <linusw@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-9-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-pl022.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -1956,7 +1956,7 @@ static int pl022_probe(struct amba_devic
/* Register with the SPI framework */
amba_set_drvdata(adev, pl022);
- status = devm_spi_register_controller(&adev->dev, host);
+ status = spi_register_controller(host);
if (status != 0) {
dev_err_probe(&adev->dev, status,
"problem registering spi host\n");
@@ -1997,6 +1997,10 @@ pl022_remove(struct amba_device *adev)
if (!pl022)
return;
+ spi_controller_get(pl022->host);
+
+ spi_unregister_controller(pl022->host);
+
/*
* undo pm_runtime_put() in probe. I assume that we're not
* accessing the primecell here.
@@ -2008,6 +2012,8 @@ pl022_remove(struct amba_device *adev)
pl022_dma_remove(pl022);
amba_release_regions(adev);
+
+ spi_controller_put(pl022->host);
}
#ifdef CONFIG_PM_SLEEP
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 093/201] spi: ch341: fix devres lifetime
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (91 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 092/201] spi: pl022: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 094/201] spi: sh-hspi: fix controller deregistration Greg Kroah-Hartman
` (113 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Johannes Thumshirn, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit abe572f630bc1f0e77041012ab075869036ede4f upstream.
USB drivers bind to USB interfaces and any device managed resources
should have their lifetime tied to the interface rather than parent USB
device. This avoids issues like memory leaks when drivers are unbound
without their devices being physically disconnected (e.g. on probe
deferral or configuration changes).
Fix the controller and driver data lifetime so that they are released
on driver unbind.
Note that this also makes sure that the SPI controller is placed
correctly under the USB interface in the device tree.
Fixes: 8846739f52af ("spi: add ch341a usb2spi driver")
Cc: stable@vger.kernel.org # 6.11
Cc: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260327104305.1309915-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-ch341.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/spi/spi-ch341.c
+++ b/drivers/spi/spi-ch341.c
@@ -152,7 +152,7 @@ static int ch341_probe(struct usb_interf
if (ret)
return ret;
- ctrl = devm_spi_alloc_host(&udev->dev, sizeof(struct ch341_spi_dev));
+ ctrl = devm_spi_alloc_host(&intf->dev, sizeof(struct ch341_spi_dev));
if (!ctrl)
return -ENOMEM;
@@ -163,7 +163,7 @@ static int ch341_probe(struct usb_interf
ch341->read_pipe = usb_rcvbulkpipe(udev, usb_endpoint_num(in));
ch341->rx_len = usb_endpoint_maxp(in);
- ch341->rx_buf = devm_kzalloc(&udev->dev, ch341->rx_len, GFP_KERNEL);
+ ch341->rx_buf = devm_kzalloc(&intf->dev, ch341->rx_len, GFP_KERNEL);
if (!ch341->rx_buf)
return -ENOMEM;
@@ -171,8 +171,7 @@ static int ch341_probe(struct usb_interf
if (!ch341->rx_urb)
return -ENOMEM;
- ch341->tx_buf =
- devm_kzalloc(&udev->dev, CH341_PACKET_LENGTH, GFP_KERNEL);
+ ch341->tx_buf = devm_kzalloc(&intf->dev, CH341_PACKET_LENGTH, GFP_KERNEL);
if (!ch341->tx_buf) {
ret = -ENOMEM;
goto err_free_urb;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 094/201] spi: sh-hspi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (92 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 093/201] spi: ch341: fix devres lifetime Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 095/201] spi: fsl: " Greg Kroah-Hartman
` (112 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit e63982e6392e45a6ecd68d6c317a081cc8e70143 upstream.
Make sure to deregister the controller before releasing underlying
resources like clocks during driver unbind.
Fixes: 49e599b8595f ("spi: sh-hspi: control spi clock more correctly")
Cc: stable@vger.kernel.org # 3.4
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-13-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-sh-hspi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/spi/spi-sh-hspi.c
+++ b/drivers/spi/spi-sh-hspi.c
@@ -257,9 +257,9 @@ static int hspi_probe(struct platform_de
ctlr->transfer_one_message = hspi_transfer_one_message;
ctlr->bits_per_word_mask = SPI_BPW_MASK(8);
- ret = devm_spi_register_controller(&pdev->dev, ctlr);
+ ret = spi_register_controller(ctlr);
if (ret < 0) {
- dev_err(&pdev->dev, "devm_spi_register_controller error.\n");
+ dev_err(&pdev->dev, "failed to register controller\n");
goto error2;
}
@@ -279,9 +279,15 @@ static void hspi_remove(struct platform_
{
struct hspi_priv *hspi = platform_get_drvdata(pdev);
+ spi_controller_get(hspi->ctlr);
+
+ spi_unregister_controller(hspi->ctlr);
+
pm_runtime_disable(&pdev->dev);
clk_put(hspi->clk);
+
+ spi_controller_put(hspi->ctlr);
}
static const struct of_device_id hspi_of_match[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 095/201] spi: fsl: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (93 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 094/201] spi: sh-hspi: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 096/201] spi: bcmbca-hsspi: " Greg Kroah-Hartman
` (111 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Heiner Kallweit, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 9b7abfed4c3754062d1f3ffd452e65a38667f586 upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: 4178b6b1b595 ("spi: fsl-(e)spi: migrate to using devm_ functions to simplify cleanup")
Cc: stable@vger.kernel.org # 4.3
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410064749.496888-1-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-fsl-spi.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -614,7 +614,7 @@ static struct spi_controller *fsl_spi_pr
mpc8xxx_spi_write_reg(®_base->mode, regval);
- ret = devm_spi_register_controller(dev, host);
+ ret = spi_register_controller(host);
if (ret < 0)
goto err_probe;
@@ -705,7 +705,13 @@ static void of_fsl_spi_remove(struct pla
struct spi_controller *host = platform_get_drvdata(ofdev);
struct mpc8xxx_spi *mpc8xxx_spi = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
fsl_spi_cpm_free(mpc8xxx_spi);
+
+ spi_controller_put(host);
}
static struct platform_driver of_fsl_spi_driver = {
@@ -751,7 +757,13 @@ static void plat_mpc8xxx_spi_remove(stru
struct spi_controller *host = platform_get_drvdata(pdev);
struct mpc8xxx_spi *mpc8xxx_spi = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
fsl_spi_cpm_free(mpc8xxx_spi);
+
+ spi_controller_put(host);
}
MODULE_ALIAS("platform:mpc8xxx_spi");
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 096/201] spi: bcmbca-hsspi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (94 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 095/201] spi: fsl: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 097/201] spi: coldfire-qspi: " Greg Kroah-Hartman
` (110 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, William Zhang, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit c3d97c3320b9a1ebbd6119857341be034f7b3efc upstream.
Make sure to deregister the controller before disabling underlying
resources like interrupts during driver unbind to allow SPI drivers to
do I/O during deregistration.
Note that clocks were also disabled before the recent commit
e532e21a246d ("spi: bcm63xx-hsspi: Simplify clock handling with
devm_clk_get_enabled()").
Fixes: a38a2233f23b ("spi: bcmbca-hsspi: Add driver for newer HSSPI controller")
Cc: stable@vger.kernel.org # 6.3: deb269e0394f
Cc: stable@vger.kernel.org # 6.3
Cc: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-8-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-bcmbca-hsspi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-bcmbca-hsspi.c
+++ b/drivers/spi/spi-bcmbca-hsspi.c
@@ -549,7 +549,7 @@ static int bcmbca_hsspi_probe(struct pla
}
/* register and we are done */
- ret = devm_spi_register_controller(dev, host);
+ ret = spi_register_controller(host);
if (ret)
goto out_sysgroup_disable;
@@ -571,6 +571,8 @@ static void bcmbca_hsspi_remove(struct p
struct spi_controller *host = platform_get_drvdata(pdev);
struct bcmbca_hsspi *bs = spi_controller_get_devdata(host);
+ spi_unregister_controller(host);
+
/* reset the hardware and block queue progress */
__raw_writel(0, bs->regs + HSSPI_INT_MASK_REG);
clk_disable_unprepare(bs->pll_clk);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 097/201] spi: coldfire-qspi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (95 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 096/201] spi: bcmbca-hsspi: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 098/201] spi: npcm-pspi: " Greg Kroah-Hartman
` (109 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Steven King, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit e7c510e192ff2a1264d999575eea39a506424264 upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks (via runtime pm) during driver unbind.
Fixes: 34b8c6617366 ("spi: Add Freescale/Motorola Coldfire QSPI driver")
Cc: stable@vger.kernel.org # 2.6.34
Cc: Steven King <sfking@fdwdc.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-11-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-coldfire-qspi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -410,9 +410,9 @@ static int mcfqspi_probe(struct platform
platform_set_drvdata(pdev, host);
pm_runtime_enable(&pdev->dev);
- status = devm_spi_register_controller(&pdev->dev, host);
+ status = spi_register_controller(host);
if (status) {
- dev_dbg(&pdev->dev, "devm_spi_register_controller failed\n");
+ dev_dbg(&pdev->dev, "failed to register controller\n");
goto fail1;
}
@@ -436,11 +436,17 @@ static void mcfqspi_remove(struct platfo
struct spi_controller *host = platform_get_drvdata(pdev);
struct mcfqspi *mcfqspi = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
pm_runtime_disable(&pdev->dev);
/* disable the hardware (set the baud rate to 0) */
mcfqspi_wr_qmr(mcfqspi, MCFQSPI_QMR_MSTR);
mcfqspi_cs_teardown(mcfqspi);
+
+ spi_controller_put(host);
}
#ifdef CONFIG_PM_SLEEP
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 098/201] spi: npcm-pspi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (96 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 097/201] spi: coldfire-qspi: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 099/201] spi: cavium-thunderx: " Greg Kroah-Hartman
` (108 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Tomer Maimon, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit ebd81199e00e107980bf8c4d2c747ae50158f797 upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver")
Cc: stable@vger.kernel.org # 5.0
Cc: Tomer Maimon <tmaimon77@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-npcm-pspi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-npcm-pspi.c
+++ b/drivers/spi/spi-npcm-pspi.c
@@ -413,7 +413,7 @@ static int npcm_pspi_probe(struct platfo
/* set to default clock rate */
npcm_pspi_set_baudrate(priv, NPCM_PSPI_DEFAULT_CLK);
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret)
goto out_disable_clk;
@@ -434,8 +434,14 @@ static void npcm_pspi_remove(struct plat
struct spi_controller *host = platform_get_drvdata(pdev);
struct npcm_pspi *priv = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
npcm_pspi_reset_hw(priv);
clk_disable_unprepare(priv->clk);
+
+ spi_controller_put(host);
}
static const struct of_device_id npcm_pspi_match[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 099/201] spi: cavium-thunderx: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (97 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 098/201] spi: npcm-pspi: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 100/201] spi: pic32-sqi: " Greg Kroah-Hartman
` (107 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jan Glauber, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit dbb6b01267c0c866eaac4019cec19f414beec61d upstream.
Make sure to deregister the controller before disabling it to avoid
hanging or leaking resources associated with the queue when the queue
non-empty.
Fixes: 7347a6c7af8d ("spi: octeon: Add ThunderX driver")
Cc: stable@vger.kernel.org # 4.9
Cc: Jan Glauber <jan.glauber@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-10-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cavium-thunderx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-cavium-thunderx.c
+++ b/drivers/spi/spi-cavium-thunderx.c
@@ -70,7 +70,7 @@ static int thunderx_spi_probe(struct pci
pci_set_drvdata(pdev, host);
- ret = devm_spi_register_controller(dev, host);
+ ret = spi_register_controller(host);
if (ret)
goto error;
@@ -90,8 +90,14 @@ static void thunderx_spi_remove(struct p
if (!p)
return;
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
/* Put everything in a known state. */
writeq(0, p->register_base + OCTEON_SPI_CFG(p));
+
+ spi_controller_put(host);
}
static const struct pci_device_id thunderx_spi_pci_id_table[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 100/201] spi: pic32-sqi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (98 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 099/201] spi: cavium-thunderx: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 101/201] spi: sprd: " Greg Kroah-Hartman
` (106 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Purna Chandra Mandal, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 420df79d1a618951eb0eb4331df95c9f4f763b8b upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: 3270ac230f66 ("spi: pic32-sqi: add SPI driver for PIC32 SQI controller.")
Cc: stable@vger.kernel.org # 4.7
Cc: Purna Chandra Mandal <purna.mandal@microchip.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-8-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-pic32-sqi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-pic32-sqi.c
+++ b/drivers/spi/spi-pic32-sqi.c
@@ -642,7 +642,7 @@ static int pic32_sqi_probe(struct platfo
host->prepare_transfer_hardware = pic32_sqi_prepare_hardware;
host->unprepare_transfer_hardware = pic32_sqi_unprepare_hardware;
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret) {
dev_err(&host->dev, "failed registering spi host\n");
free_irq(sqi->irq, sqi);
@@ -665,9 +665,15 @@ static void pic32_sqi_remove(struct plat
{
struct pic32_sqi *sqi = platform_get_drvdata(pdev);
+ spi_controller_get(sqi->host);
+
+ spi_unregister_controller(sqi->host);
+
/* release resources */
free_irq(sqi->irq, sqi);
ring_desc_ring_free(sqi);
+
+ spi_controller_put(sqi->host);
}
static const struct of_device_id pic32_sqi_of_ids[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 101/201] spi: sprd: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (99 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 100/201] spi: pic32-sqi: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 102/201] spi: rspi: " Greg Kroah-Hartman
` (105 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Lanqing Liu, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 123d17dbc5f07059752fa5e616385ca29a8f935a upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Note that the controller is suspended before disabling and releasing
resources since commit de082d866cce ("spi: sprd: Add the SPI irq
function for the SPI DMA mode") which avoids issues like unclocked
accesses but prevents SPI device drivers from doing I/O during
deregistration.
Fixes: e7d973a31c24 ("spi: sprd: Add SPI driver for Spreadtrum SC9860")
Cc: stable@vger.kernel.org # 4.20
Cc: Lanqing Liu <lanqing.liu@spreadtrum.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-17-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-sprd.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/spi/spi-sprd.c
+++ b/drivers/spi/spi-sprd.c
@@ -977,7 +977,7 @@ static int sprd_spi_probe(struct platfor
goto err_rpm_put;
}
- ret = devm_spi_register_controller(&pdev->dev, sctlr);
+ ret = spi_register_controller(sctlr);
if (ret)
goto err_rpm_put;
@@ -1008,7 +1008,9 @@ static void sprd_spi_remove(struct platf
if (ret < 0)
dev_err(ss->dev, "failed to resume SPI controller\n");
- spi_controller_suspend(sctlr);
+ spi_controller_get(sctlr);
+
+ spi_unregister_controller(sctlr);
if (ret >= 0) {
if (ss->dma.enable)
@@ -1017,6 +1019,8 @@ static void sprd_spi_remove(struct platf
}
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+
+ spi_controller_put(sctlr);
}
static int __maybe_unused sprd_spi_runtime_suspend(struct device *dev)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 102/201] spi: rspi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (100 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 101/201] spi: sprd: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 103/201] spi: sh-msiof: " Greg Kroah-Hartman
` (104 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jingoo Han, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 9944fa6726afb1e6eb7e2212764e7da0c97f2dcc upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: 9e03d05eee4c ("spi: rcar: Use devm_spi_register_master()")
Cc: stable@vger.kernel.org # 3.14
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-11-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-rspi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -1171,8 +1171,14 @@ static void rspi_remove(struct platform_
{
struct rspi_data *rspi = platform_get_drvdata(pdev);
+ spi_controller_get(rspi->ctlr);
+
+ spi_unregister_controller(rspi->ctlr);
+
rspi_release_dma(rspi->ctlr);
pm_runtime_disable(&pdev->dev);
+
+ spi_controller_put(rspi->ctlr);
}
static const struct spi_ops rspi_ops = {
@@ -1376,9 +1382,9 @@ static int rspi_probe(struct platform_de
if (ret < 0)
dev_warn(&pdev->dev, "DMA not available, using PIO\n");
- ret = devm_spi_register_controller(&pdev->dev, ctlr);
+ ret = spi_register_controller(ctlr);
if (ret < 0) {
- dev_err(&pdev->dev, "devm_spi_register_controller error.\n");
+ dev_err(&pdev->dev, "failed to register controller\n");
goto error3;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 103/201] spi: sh-msiof: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (101 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 102/201] spi: rspi: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 104/201] spi: slave-mt27xx: " Greg Kroah-Hartman
` (103 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 45170f67a08b912ead6ccc387ba06954d1d4e53a upstream.
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Fixes: 1bd6363bc0c6 ("spi: sh-msiof: Use core message handling instead of spi-bitbang")
Cc: stable@vger.kernel.org # 3.15
Cc: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-14-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-sh-msiof.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -1289,9 +1289,9 @@ static int sh_msiof_spi_probe(struct pla
if (ret < 0)
dev_warn(dev, "DMA not available, using PIO\n");
- ret = devm_spi_register_controller(dev, ctlr);
+ ret = spi_register_controller(ctlr);
if (ret < 0) {
- dev_err(dev, "devm_spi_register_controller error.\n");
+ dev_err(dev, "failed to register controller\n");
goto err2;
}
@@ -1309,8 +1309,14 @@ static void sh_msiof_spi_remove(struct p
{
struct sh_msiof_spi_priv *p = platform_get_drvdata(pdev);
+ spi_controller_get(p->ctlr);
+
+ spi_unregister_controller(p->ctlr);
+
sh_msiof_release_dma(p);
pm_runtime_disable(&pdev->dev);
+
+ spi_controller_put(p->ctlr);
}
static const struct platform_device_id spi_driver_ids[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 104/201] spi: slave-mt27xx: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (102 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 103/201] spi: sh-msiof: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 105/201] spi: img-spfi: " Greg Kroah-Hartman
` (102 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Leilk Liu, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit ab840cbda4fe6c40e52f6415c47056797c663bb2 upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks (by disabling runtime PM) during driver unbind.
Fixes: 805be7ddf367 ("spi: mediatek: add spi slave for Mediatek MT2712")
Cc: stable@vger.kernel.org # 4.20
Cc: Leilk Liu <leilk.liu@mediatek.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-16-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-slave-mt27xx.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-slave-mt27xx.c
+++ b/drivers/spi/spi-slave-mt27xx.c
@@ -453,7 +453,7 @@ static int mtk_spi_slave_probe(struct pl
pm_runtime_enable(&pdev->dev);
- ret = devm_spi_register_controller(&pdev->dev, ctlr);
+ ret = spi_register_controller(ctlr);
clk_disable_unprepare(mdata->spi_clk);
if (ret) {
dev_err(&pdev->dev,
@@ -473,7 +473,15 @@ err_put_ctlr:
static void mtk_spi_slave_remove(struct platform_device *pdev)
{
+ struct spi_controller *ctlr = platform_get_drvdata(pdev);
+
+ spi_controller_get(ctlr);
+
+ spi_unregister_controller(ctlr);
+
pm_runtime_disable(&pdev->dev);
+
+ spi_controller_put(ctlr);
}
#ifdef CONFIG_PM_SLEEP
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 105/201] spi: img-spfi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (103 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 104/201] spi: slave-mt27xx: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 106/201] spi: mpfs: " Greg Kroah-Hartman
` (101 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andrew Bresticker, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit fc3a83b0d9c16b941c9028f5a8db9541dce4ddf2 upstream.
Make sure to deregister the controller before disabling and releasing
underlying resources like clocks and DMA during driver unbind.
Fixes: deba25800a12 ("spi: Add driver for IMG SPFI controller")
Cc: stable@vger.kernel.org # 3.19
Cc: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-16-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-img-spfi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-img-spfi.c
+++ b/drivers/spi/spi-img-spfi.c
@@ -643,7 +643,7 @@ static int img_spfi_probe(struct platfor
pm_runtime_set_active(spfi->dev);
pm_runtime_enable(spfi->dev);
- ret = devm_spi_register_controller(spfi->dev, host);
+ ret = spi_register_controller(host);
if (ret)
goto disable_pm;
@@ -669,6 +669,10 @@ static void img_spfi_remove(struct platf
struct spi_controller *host = platform_get_drvdata(pdev);
struct img_spfi *spfi = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
if (spfi->tx_ch)
dma_release_channel(spfi->tx_ch);
if (spfi->rx_ch)
@@ -679,6 +683,8 @@ static void img_spfi_remove(struct platf
clk_disable_unprepare(spfi->spfi_clk);
clk_disable_unprepare(spfi->sys_clk);
}
+
+ spi_controller_put(host);
}
#ifdef CONFIG_PM
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 106/201] spi: mpfs: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (104 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 105/201] spi: img-spfi: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 107/201] spi: octeon: " Greg Kroah-Hartman
` (100 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Conor Dooley, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 573c7db8fce91a1b07dd64a260bb44b9e6d05943 upstream.
Make sure to deregister the controller before disabling underlying
resources like interrupts during driver unbind.
Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers")
Cc: stable@vger.kernel.org # 6.0
Cc: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260409120419.388546-21-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-mpfs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-mpfs.c
+++ b/drivers/spi/spi-mpfs.c
@@ -574,7 +574,7 @@ static int mpfs_spi_probe(struct platfor
mpfs_spi_init(host, spi);
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret) {
mpfs_spi_disable_ints(spi);
mpfs_spi_disable(spi);
@@ -592,6 +592,8 @@ static void mpfs_spi_remove(struct platf
struct spi_controller *host = platform_get_drvdata(pdev);
struct mpfs_spi *spi = spi_controller_get_devdata(host);
+ spi_unregister_controller(host);
+
mpfs_spi_disable_ints(spi);
mpfs_spi_disable(spi);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 107/201] spi: octeon: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (105 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 106/201] spi: mpfs: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 108/201] spi: imx: fix runtime pm leak on probe deferral Greg Kroah-Hartman
` (99 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jingoo Han, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 3c49a4d8799bee423a80f392ba95b26af8e9ab91 upstream.
Make sure to deregister the controller before disabling it to avoid
hanging or leaking resources associated with the queue when the queue is
non-empty.
Fixes: 22ad2d8df77d ("spi: octeon: use devm_spi_register_master()")
Cc: stable@vger.kernel.org # 3.13
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-9-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cavium-octeon.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-cavium-octeon.c
+++ b/drivers/spi/spi-cavium-octeon.c
@@ -54,7 +54,7 @@ static int octeon_spi_probe(struct platf
host->bits_per_word_mask = SPI_BPW_MASK(8);
host->max_speed_hz = OCTEON_SPI_MAX_CLOCK_HZ;
- err = devm_spi_register_controller(&pdev->dev, host);
+ err = spi_register_controller(host);
if (err) {
dev_err(&pdev->dev, "register host failed: %d\n", err);
goto fail;
@@ -73,8 +73,14 @@ static void octeon_spi_remove(struct pla
struct spi_controller *host = platform_get_drvdata(pdev);
struct octeon_spi *p = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
/* Clear the CSENA* and put everything in a known state. */
writeq(0, p->register_base + OCTEON_SPI_CFG(p));
+
+ spi_controller_put(host);
}
static const struct of_device_id octeon_spi_match[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 108/201] spi: imx: fix runtime pm leak on probe deferral
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (106 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 107/201] spi: octeon: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 109/201] spi: mxic: fix controller deregistration Greg Kroah-Hartman
` (98 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Sascha Hauer, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit a1d50a37d3b1df84f536a982f692371039df4a48 upstream.
Make sure to balance the runtime PM usage count before returning on
probe failure (e.g. probe deferral) so that the controller can be
suspended when a driver is later bound.
Fixes: 43b6bf406cd0 ("spi: imx: fix runtime pm support for !CONFIG_PM")
Cc: stable@vger.kernel.org # 5.10
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421125632.1537235-1-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-imx.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -2384,6 +2384,7 @@ out_register_controller:
out_runtime_pm_put:
pm_runtime_dont_use_autosuspend(spi_imx->dev);
pm_runtime_disable(spi_imx->dev);
+ pm_runtime_put_noidle(spi_imx->dev);
pm_runtime_set_suspended(&pdev->dev);
clk_disable_unprepare(spi_imx->clk_ipg);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 109/201] spi: mxic: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (107 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 108/201] spi: imx: fix runtime pm leak on probe deferral Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 110/201] spi: orion: " Greg Kroah-Hartman
` (97 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mason Yang, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit adbc595e272052181d40ec307a4c5ba98571b0fe upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks (via runtime pm) during driver unbind.
Fixes: b942d80b0a39 ("spi: Add MXIC controller driver")
Cc: stable@vger.kernel.org # 5.0: cc53711b2191
Cc: stable@vger.kernel.org # 5.0
Cc: Mason Yang <masonccyang@mxic.com.tw>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260414134319.978196-6-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-mxic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-mxic.c
+++ b/drivers/spi/spi-mxic.c
@@ -832,9 +832,10 @@ static void mxic_spi_remove(struct platf
struct spi_controller *host = platform_get_drvdata(pdev);
struct mxic_spi *mxic = spi_controller_get_devdata(host);
+ spi_unregister_controller(host);
+
pm_runtime_disable(&pdev->dev);
mxic_spi_mem_ecc_remove(mxic);
- spi_unregister_controller(host);
}
static const struct of_device_id mxic_spi_of_ids[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 110/201] spi: orion: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (108 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 109/201] spi: mxic: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 111/201] spi: orion: fix runtime pm leak on unbind Greg Kroah-Hartman
` (96 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 220f4f11104a7f83b71543ef0e48dde1da2bc5d3 upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: 60cadec9da7b ("spi: new orion_spi driver")
Cc: stable@vger.kernel.org # 2.6.27
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260414134319.978196-7-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-orion.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -801,10 +801,15 @@ static void orion_spi_remove(struct plat
struct spi_controller *host = platform_get_drvdata(pdev);
struct orion_spi *spi = spi_controller_get_devdata(host);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
pm_runtime_get_sync(&pdev->dev);
clk_disable_unprepare(spi->axi_clk);
- spi_unregister_controller(host);
+ spi_controller_put(host);
+
pm_runtime_disable(&pdev->dev);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 111/201] spi: orion: fix runtime pm leak on unbind
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (109 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 110/201] spi: orion: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 112/201] spi: orion: fix clock imbalance on registration failure Greg Kroah-Hartman
` (95 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Russell King, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 97b17dd8266d2e26d9ee3c75a0fa34ecde6944f0 upstream.
Make sure to balance the runtime PM usage count on driver unbind so that
the controller can be suspended when a driver is rebound.
Also restore the autosuspend setting.
This issue was flagged by Sashiko when reviewing a controller
deregistration fix.
Fixes: 5c6786945b4e ("spi: spi-orion: add runtime PM support")
Cc: stable@vger.kernel.org # 3.17
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Link: https://sashiko.dev/#/patchset/20260414134319.978196-1-johan%40kernel.org?part=6
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421130211.1537628-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-orion.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -811,6 +811,9 @@ static void orion_spi_remove(struct plat
spi_controller_put(host);
pm_runtime_disable(&pdev->dev);
+ pm_runtime_put_noidle(&pdev->dev);
+ pm_runtime_set_suspended(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
}
MODULE_ALIAS("platform:" DRIVER_NAME);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 112/201] spi: orion: fix clock imbalance on registration failure
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (110 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 111/201] spi: orion: fix runtime pm leak on unbind Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 113/201] spi: mpc52xx: fix use-after-free " Greg Kroah-Hartman
` (94 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Russell King, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 443cde0dc59c5d154156ac9f27a7dadef8ebc0c2 upstream.
Make sure that the controller is not runtime suspended before disabling
clocks on probe failure.
Also restore the autosuspend setting.
Fixes: 5c6786945b4e ("spi: spi-orion: add runtime PM support")
Cc: stable@vger.kernel.org # 3.17
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421130211.1537628-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-orion.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -774,6 +774,7 @@ static int orion_spi_probe(struct platfo
pm_runtime_set_active(&pdev->dev);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
+ pm_runtime_get_noresume(&pdev->dev);
pm_runtime_enable(&pdev->dev);
status = orion_spi_reset(spi);
@@ -784,10 +785,15 @@ static int orion_spi_probe(struct platfo
if (status < 0)
goto out_rel_pm;
+ pm_runtime_put_autosuspend(&pdev->dev);
+
return status;
out_rel_pm:
pm_runtime_disable(&pdev->dev);
+ pm_runtime_put_noidle(&pdev->dev);
+ pm_runtime_set_suspended(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
out_rel_axi_clk:
clk_disable_unprepare(spi->axi_clk);
out:
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 113/201] spi: mpc52xx: fix use-after-free on registration failure
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (111 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 112/201] spi: orion: fix clock imbalance on registration failure Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 114/201] spi: mpc52xx: fix controller deregistration Greg Kroah-Hartman
` (93 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Grant Likely, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit f62c060272b9d7423b1650b844e8e4e7b8f9f925 upstream.
Make sure to disable and free the interrupts in case controller
registration fails to avoid a potential use-after-free and resource
leak.
This issue was flagged by Sashiko when reviewing a controller
deregistration fix.
Fixes: 42bbb70980f3 ("powerpc/5200: Add mpc5200-spi (non-PSC) device driver")
Cc: stable@vger.kernel.org # 2.6.33
Cc: Grant Likely <grant.likely@secretlab.ca>
Link: https://sashiko.dev/#/patchset/20260414134319.978196-1-johan%40kernel.org?part=3
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421125800.1537361-1-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-mpc52xx.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/spi/spi-mpc52xx.c
+++ b/drivers/spi/spi-mpc52xx.c
@@ -498,6 +498,9 @@ static int mpc52xx_spi_probe(struct plat
err_register:
dev_err(&ms->host->dev, "initialization failed\n");
+ free_irq(ms->irq0, ms);
+ free_irq(ms->irq1, ms);
+ cancel_work_sync(&ms->work);
err_gpio:
while (i-- > 0)
gpiod_put(ms->gpio_cs[i]);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 114/201] spi: mpc52xx: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (112 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 113/201] spi: mpc52xx: fix use-after-free " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 115/201] spi: mpc52xx: fix use-after-free on unbind Greg Kroah-Hartman
` (92 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Grant Likely, Luotao Fu,
Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 0f997fdae819a8c2cc83bd4ff7d935ad76c727c9 upstream.
Make sure to deregister the controller before disabling and releasing
underlying resources like interrupts and gpios during driver unbind.
Fixes: 42bbb70980f3 ("powerpc/5200: Add mpc5200-spi (non-PSC) device driver")
Fixes: b8d4e2ce60b6 ("mpc52xx_spi: add gpio chipselect")
Cc: stable@vger.kernel.org # 2.6.33
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260414134319.978196-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-mpc52xx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-mpc52xx.c
+++ b/drivers/spi/spi-mpc52xx.c
@@ -520,6 +520,8 @@ static void mpc52xx_spi_remove(struct pl
struct mpc52xx_spi *ms = spi_controller_get_devdata(host);
int i;
+ spi_unregister_controller(host);
+
cancel_work_sync(&ms->work);
free_irq(ms->irq0, ms);
free_irq(ms->irq1, ms);
@@ -528,7 +530,6 @@ static void mpc52xx_spi_remove(struct pl
gpiod_put(ms->gpio_cs[i]);
kfree(ms->gpio_cs);
- spi_unregister_controller(host);
iounmap(ms->regs);
spi_controller_put(host);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 115/201] spi: mpc52xx: fix use-after-free on unbind
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (113 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 114/201] spi: mpc52xx: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 116/201] spi: cadence: fix controller deregistration Greg Kroah-Hartman
` (91 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pei Xiao, Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 706b3dc2ac7a998c55e14b3fd2e8f934c367e6e0 upstream.
The state machine work is scheduled by the interrupt handler and
therefore needs to be cancelled after disabling interrupts to avoid a
potential use-after-free.
Fixes: 984836621aad ("spi: mpc52xx: Add cancel_work_sync before module remove")
Cc: stable@vger.kernel.org
Cc: Pei Xiao <xiaopei01@kylinos.cn>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260414134319.978196-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-mpc52xx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-mpc52xx.c
+++ b/drivers/spi/spi-mpc52xx.c
@@ -522,10 +522,11 @@ static void mpc52xx_spi_remove(struct pl
spi_unregister_controller(host);
- cancel_work_sync(&ms->work);
free_irq(ms->irq0, ms);
free_irq(ms->irq1, ms);
+ cancel_work_sync(&ms->work);
+
for (i = 0; i < ms->gpio_cs_count; i++)
gpiod_put(ms->gpio_cs[i]);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 116/201] spi: cadence: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (114 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 115/201] spi: mpc52xx: fix use-after-free on unbind Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 117/201] spi: cadence-quadspi: " Greg Kroah-Hartman
` (90 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Harini Katakam, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 666fa7e9ca98e71c880086ca24147ae843f1ed6e upstream.
Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.
Fixes: c474b3866546 ("spi: Add driver for Cadence SPI controller")
Cc: stable@vger.kernel.org # 3.16
Cc: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260414134319.978196-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cadence.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -777,6 +777,10 @@ static void cdns_spi_remove(struct platf
struct spi_controller *ctlr = platform_get_drvdata(pdev);
struct cdns_spi *xspi = spi_controller_get_devdata(ctlr);
+ spi_controller_get(ctlr);
+
+ spi_unregister_controller(ctlr);
+
cdns_spi_write(xspi, CDNS_SPI_ER, CDNS_SPI_ER_DISABLE);
if (!spi_controller_is_target(ctlr)) {
@@ -784,7 +788,7 @@ static void cdns_spi_remove(struct platf
pm_runtime_set_suspended(&pdev->dev);
}
- spi_unregister_controller(ctlr);
+ spi_controller_put(ctlr);
}
/**
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 117/201] spi: cadence-quadspi: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (115 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 116/201] spi: cadence: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 118/201] spi: cadence: fix unclocked access on unbind Greg Kroah-Hartman
` (89 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Khairul Anuar Romli, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 964ee9793760e825b5c011741b4e3cfe06c87efc upstream.
Make sure to deregister the controller before dropping the reference
count that allows new operations to start to allow SPI drivers to do I/O
during deregistration.
Fixes: 7446284023e8 ("spi: cadence-quadspi: Implement refcount to handle unbind during busy")
Cc: stable@vger.kernel.org # 6.17
Cc: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260414134319.978196-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cadence-quadspi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -2020,13 +2020,13 @@ static void cqspi_remove(struct platform
ddata = of_device_get_match_data(dev);
+ spi_unregister_controller(cqspi->host);
+
refcount_set(&cqspi->refcount, 0);
if (!refcount_dec_and_test(&cqspi->inflight_ops))
cqspi_wait_idle(cqspi);
- spi_unregister_controller(cqspi->host);
-
if (cqspi->rx_chan)
dma_release_channel(cqspi->rx_chan);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 118/201] spi: cadence: fix unclocked access on unbind
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (116 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 117/201] spi: cadence-quadspi: " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 119/201] spi: cadence: fix clock imbalance on probe failure Greg Kroah-Hartman
` (88 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shubhrajyoti Datta, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 5b1689a41f02955c5361944f748a4812a6ff9307 upstream.
Make sure that the controller is runtime resumed before disabling it
during driver unbind to avoid unclocked register access and unbalanced
clock disable.
Also restore the autosuspend setting.
This issue was flagged by Sashiko when reviewing a controller
deregistration fix.
Fixes: d36ccd9f7ea4 ("spi: cadence: Runtime pm adaptation")
Cc: stable@vger.kernel.org # 4.7
Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://sashiko.dev/#/patchset/20260414134319.978196-1-johan%40kernel.org?part=1
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421123615.1533617-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cadence.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -776,16 +776,23 @@ static void cdns_spi_remove(struct platf
{
struct spi_controller *ctlr = platform_get_drvdata(pdev);
struct cdns_spi *xspi = spi_controller_get_devdata(ctlr);
+ int ret = 0;
+
+ if (!spi_controller_is_target(ctlr))
+ ret = pm_runtime_get_sync(&pdev->dev);
spi_controller_get(ctlr);
spi_unregister_controller(ctlr);
- cdns_spi_write(xspi, CDNS_SPI_ER, CDNS_SPI_ER_DISABLE);
+ if (ret >= 0)
+ cdns_spi_write(xspi, CDNS_SPI_ER, CDNS_SPI_ER_DISABLE);
if (!spi_controller_is_target(ctlr)) {
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
+ pm_runtime_put_noidle(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
}
spi_controller_put(ctlr);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 119/201] spi: cadence: fix clock imbalance on probe failure
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (117 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 118/201] spi: cadence: fix unclocked access on unbind Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 120/201] spi: cadence-quadspi: fix runtime pm disable " Greg Kroah-Hartman
` (87 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shubhrajyoti Datta, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit ecea4f0e9db2fb6ab4a68a59c5aba0d8f59a9566 upstream.
Make sure that the controller is active before disabling clocks on probe
failure to avoid unbalanced clock disable.
Also drop the usage count before returning (so that the controller can
be suspended after a probe deferral) and restore the autosuspend
setting.
Fixes: d36ccd9f7ea4 ("spi: cadence: Runtime pm adaptation")
Cc: stable@vger.kernel.org # 4.7
Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421123615.1533617-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cadence.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -741,7 +741,6 @@ static int cdns_spi_probe(struct platfor
/* Set to default valid value */
ctlr->max_speed_hz = xspi->clk_rate / 4;
xspi->speed_hz = ctlr->max_speed_hz;
- pm_runtime_put_autosuspend(&pdev->dev);
} else {
ctlr->mode_bits |= SPI_NO_CS;
ctlr->target_abort = cdns_target_abort;
@@ -752,12 +751,17 @@ static int cdns_spi_probe(struct platfor
goto clk_dis_all;
}
+ if (!spi_controller_is_target(ctlr))
+ pm_runtime_put_autosuspend(&pdev->dev);
+
return ret;
clk_dis_all:
if (!spi_controller_is_target(ctlr)) {
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
+ pm_runtime_put_noidle(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
}
remove_ctlr:
spi_controller_put(ctlr);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 120/201] spi: cadence-quadspi: fix runtime pm disable imbalance on probe failure
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (118 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 119/201] spi: cadence: fix clock imbalance on probe failure Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 121/201] spi: cadence-quadspi: fix clock " Greg Kroah-Hartman
` (86 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Miquel Raynal (Schneider Electric),
Johan Hovold, Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 5ff4d5d1af0c7517bd8db83c95c4247a9729a548 upstream.
A recent attempt to fix the probe error handling introduced a runtime PM
disable depth imbalance by incorrectly disabling runtime PM on early
failures (e.g. probe deferral).
Fixes: f18c8cfa4f1a ("spi: cadence-qspi: Fix probe error path and remove")
Cc: stable@vger.kernel.org # 7.0
Cc: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421125354.1534871-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cadence-quadspi.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1871,7 +1871,7 @@ static int cqspi_probe(struct platform_d
ret = clk_bulk_prepare_enable(CLK_QSPI_NUM, cqspi->clks);
if (ret) {
dev_err(dev, "Cannot enable QSPI clocks.\n");
- goto disable_rpm;
+ return ret;
}
/* Obtain QSPI reset control */
@@ -1981,7 +1981,7 @@ static int cqspi_probe(struct platform_d
ret = cqspi_request_mmap_dma(cqspi);
if (ret == -EPROBE_DEFER) {
dev_err_probe(&pdev->dev, ret, "Failed to request mmap DMA\n");
- goto disable_controller;
+ goto disable_rpm;
}
}
@@ -1999,14 +1999,13 @@ static int cqspi_probe(struct platform_d
release_dma_chan:
if (cqspi->rx_chan)
dma_release_channel(cqspi->rx_chan);
-disable_controller:
+disable_rpm:
+ if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM)))
+ pm_runtime_disable(dev);
cqspi_controller_enable(cqspi, 0);
disable_clks:
if (pm_runtime_get_sync(&pdev->dev) >= 0)
clk_bulk_disable_unprepare(CLK_QSPI_NUM, cqspi->clks);
-disable_rpm:
- if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM)))
- pm_runtime_disable(dev);
return ret;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 121/201] spi: cadence-quadspi: fix clock imbalance on probe failure
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (119 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 120/201] spi: cadence-quadspi: fix runtime pm disable " Greg Kroah-Hartman
@ 2026-05-15 15:48 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 122/201] spi: cadence-quadspi: fix runtime pm and clock imbalance on unbind Greg Kroah-Hartman
` (85 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:48 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Anurag Dutta, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit cba53fe20c18688c17ca668ad0e4ec05e31c70d3 upstream.
Drop the bogus runtime PM get on probe failures that was never needed
and that leaks a usage count reference while preventing the clocks from
being disabled (as runtime PM has not yet been enabled).
Fixes: 1889dd208197 ("spi: cadence-quadspi: Fix clock disable on probe failure path")
Cc: stable@vger.kernel.org # 6.19
Cc: Anurag Dutta <a-dutta@ti.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421125354.1534871-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cadence-quadspi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -2004,8 +2004,7 @@ disable_rpm:
pm_runtime_disable(dev);
cqspi_controller_enable(cqspi, 0);
disable_clks:
- if (pm_runtime_get_sync(&pdev->dev) >= 0)
- clk_bulk_disable_unprepare(CLK_QSPI_NUM, cqspi->clks);
+ clk_bulk_disable_unprepare(CLK_QSPI_NUM, cqspi->clks);
return ret;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 122/201] spi: cadence-quadspi: fix runtime pm and clock imbalance on unbind
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (120 preceding siblings ...)
2026-05-15 15:48 ` [PATCH 7.0 121/201] spi: cadence-quadspi: fix clock " Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 123/201] spi: cadence-quadspi: fix unclocked access " Greg Kroah-Hartman
` (84 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Dhruva Gole, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 5e8bb0cc72f1d52d8ac2a88f4c952e2e98056aed upstream.
Make sure to balance the runtime PM usage count before returning on
probe failure (to allow the controller to suspend after a probe
deferral) and to only drop the usage count on driver unbind to avoid a
clock disable imbalance.
Also restore the autosuspend setting.
Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support")
Cc: stable@vger.kernel.org # 6.7
Cc: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421125354.1534871-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cadence-quadspi.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1864,10 +1864,6 @@ static int cqspi_probe(struct platform_d
if (irq < 0)
return -ENXIO;
- ret = pm_runtime_set_active(dev);
- if (ret)
- return ret;
-
ret = clk_bulk_prepare_enable(CLK_QSPI_NUM, cqspi->clks);
if (ret) {
dev_err(dev, "Cannot enable QSPI clocks.\n");
@@ -1966,10 +1962,11 @@ static int cqspi_probe(struct platform_d
cqspi->sclk = 0;
if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) {
- pm_runtime_enable(dev);
pm_runtime_set_autosuspend_delay(dev, CQSPI_AUTOSUSPEND_TIMEOUT);
pm_runtime_use_autosuspend(dev);
pm_runtime_get_noresume(dev);
+ pm_runtime_set_active(dev);
+ pm_runtime_enable(dev);
}
host->num_chipselect = cqspi->num_chipselect;
@@ -2000,8 +1997,12 @@ release_dma_chan:
if (cqspi->rx_chan)
dma_release_channel(cqspi->rx_chan);
disable_rpm:
- if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM)))
+ if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) {
pm_runtime_disable(dev);
+ pm_runtime_set_suspended(dev);
+ pm_runtime_put_noidle(dev);
+ pm_runtime_dont_use_autosuspend(dev);
+ }
cqspi_controller_enable(cqspi, 0);
disable_clks:
clk_bulk_disable_unprepare(CLK_QSPI_NUM, cqspi->clks);
@@ -2038,8 +2039,10 @@ static void cqspi_remove(struct platform
clk_bulk_disable_unprepare(CLK_QSPI_NUM, cqspi->clks);
if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) {
- pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+ pm_runtime_set_suspended(&pdev->dev);
+ pm_runtime_put_noidle(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
}
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 123/201] spi: cadence-quadspi: fix unclocked access on unbind
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (121 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 122/201] spi: cadence-quadspi: fix runtime pm and clock imbalance on unbind Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 124/201] drm/msm/gem: fix error handling in msm_ioctl_gem_info_get_metadata() Greg Kroah-Hartman
` (83 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Dhruva Gole, Johan Hovold,
Mark Brown
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 233db2cb14db8b1935dda52a6affd97276462b82 upstream.
Make sure that the controller is runtime resumed before disabling it
during driver unbind to avoid an unclocked register access.
This issue was flagged by Sashiko when reviewing a controller
deregistration fix.
Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support")
Cc: stable@vger.kernel.org # 6.7
Cc: Dhruva Gole <d-gole@ti.com>
Link: https://sashiko.dev/#/patchset/20260414134319.978196-1-johan%40kernel.org?part=2
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421125354.1534871-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-cadence-quadspi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -2029,14 +2029,13 @@ static void cqspi_remove(struct platform
if (cqspi->rx_chan)
dma_release_channel(cqspi->rx_chan);
- cqspi_controller_enable(cqspi, 0);
-
-
if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM)))
ret = pm_runtime_get_sync(&pdev->dev);
- if (ret >= 0)
+ if (ret >= 0) {
+ cqspi_controller_enable(cqspi, 0);
clk_bulk_disable_unprepare(CLK_QSPI_NUM, cqspi->clks);
+ }
if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) {
pm_runtime_disable(&pdev->dev);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 124/201] drm/msm/gem: fix error handling in msm_ioctl_gem_info_get_metadata()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (122 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 123/201] spi: cadence-quadspi: fix unclocked access " Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 125/201] drm/colorop: Fix blob property reference tracking in state lifecycle Greg Kroah-Hartman
` (82 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yasuaki Torimaru, Rob Clark
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yasuaki Torimaru <yasuakitorimaru@gmail.com>
commit 47cbfe2608314b833ad61a65827d8fb363bc2d2d upstream.
msm_ioctl_gem_info_get_metadata() always returns 0 regardless of
errors. When copy_to_user() fails or the user buffer is too small,
the error code stored in ret is ignored because the function
unconditionally returns 0. This causes userspace to believe the
ioctl succeeded when it did not.
Additionally, kmemdup() can return NULL on allocation failure, but
the return value is not checked. This leads to a NULL pointer
dereference in the subsequent copy_to_user() call.
Add the missing NULL check for kmemdup() and return ret instead of 0.
Note that the SET counterpart (msm_ioctl_gem_info_set_metadata)
correctly returns ret.
Fixes: 9902cb999e4e ("drm/msm/gem: Add metadata")
Cc: stable@vger.kernel.org
Signed-off-by: Yasuaki Torimaru <yasuakitorimaru@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/714478/
Message-ID: <20260325114635.383241-1-yasuakitorimaru@gmail.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/msm/msm_drv.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -536,6 +536,11 @@ static int msm_ioctl_gem_info_get_metada
len = msm_obj->metadata_size;
buf = kmemdup(msm_obj->metadata, len, GFP_KERNEL);
+ if (!buf) {
+ msm_gem_unlock(obj);
+ return -ENOMEM;
+ }
+
msm_gem_unlock(obj);
if (*metadata_size < len) {
@@ -548,7 +553,7 @@ static int msm_ioctl_gem_info_get_metada
kfree(buf);
- return 0;
+ return ret;
}
static int msm_ioctl_gem_info(struct drm_device *dev, void *data,
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 125/201] drm/colorop: Fix blob property reference tracking in state lifecycle
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (123 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 124/201] drm/msm/gem: fix error handling in msm_ioctl_gem_info_get_metadata() Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 126/201] drm/imx: parallel-display: Prefer bus format set via legacy "interface-pix-fmt" DT property Greg Kroah-Hartman
` (81 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Simon Ser, Alex Hung, Harry Wentland,
Daniel Stone, Melissa Wen, Sebastian Wick, Uma Shankar,
Ville Syrjälä, Maarten Lankhorst, Jani Nikula,
Louis Chauvet, Chaitanya Kumar Borah
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Harry Wentland <harry.wentland@amd.com>
commit 235b333e2878d791cee09e1e72f44611a9400114 upstream.
The colorop state blob property handling had memory leaks during state
duplication, destruction, and reset operations. The implementation
failed to follow the established pattern from drm_crtc's handling of
DEGAMMA/GAMMA blob properties.
Issues fixed:
- drm_colorop_atomic_destroy_state() was freeing state memory without
releasing the blob reference, causing a leak
- drm_colorop_reset() was directly freeing old state with kfree()
instead of properly destroying it, leaking blob references
- drm_colorop_cleanup() had duplicate blob cleanup code
Changes:
- Add __drm_atomic_helper_colorop_destroy_state() helper to properly
release blob references before freeing state memory
- Update drm_colorop_atomic_destroy_state() to call the helper
- Fix drm_colorop_reset() to use drm_colorop_atomic_destroy_state()
for proper cleanup of old state
- Simplify drm_colorop_cleanup() to use the common destruction path
This matches the well-tested pattern used by drm_crtc since 2016 and
ensures proper reference counting throughout the state lifecycle.
Co-developed by Claude Sonnet 4.5.
Fixes: cfc27680ee20 ("drm/colorop: Introduce new drm_colorop mode object")
Cc: Simon Ser <contact@emersion.fr>
Cc: Alex Hung <alex.hung@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Melissa Wen <mwen@igalia.com>
Cc: Sebastian Wick <sebastian.wick@redhat.com>
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Louis Chauvet <louis.chauvet@bootlin.com>
Cc: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Cc: <stable@vger.kernel.org> #v6.19+
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Link: https://patch.msgid.link/20260312204145.829714-1-harry.wentland@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/drm_colorop.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
--- a/drivers/gpu/drm/drm_colorop.c
+++ b/drivers/gpu/drm/drm_colorop.c
@@ -169,12 +169,8 @@ void drm_colorop_cleanup(struct drm_colo
list_del(&colorop->head);
config->num_colorop--;
- if (colorop->state && colorop->state->data) {
- drm_property_blob_put(colorop->state->data);
- colorop->state->data = NULL;
- }
-
- kfree(colorop->state);
+ if (colorop->state)
+ drm_colorop_atomic_destroy_state(colorop, colorop->state);
}
EXPORT_SYMBOL(drm_colorop_cleanup);
@@ -458,9 +454,23 @@ drm_atomic_helper_colorop_duplicate_stat
return state;
}
+/**
+ * __drm_atomic_helper_colorop_destroy_state - release colorop state
+ * @state: colorop state object to release
+ *
+ * Releases all resources stored in the colorop state without actually freeing
+ * the memory of the colorop state. This is useful for drivers that subclass the
+ * colorop state.
+ */
+static void __drm_atomic_helper_colorop_destroy_state(struct drm_colorop_state *state)
+{
+ drm_property_blob_put(state->data);
+}
+
void drm_colorop_atomic_destroy_state(struct drm_colorop *colorop,
struct drm_colorop_state *state)
{
+ __drm_atomic_helper_colorop_destroy_state(state);
kfree(state);
}
@@ -511,7 +521,9 @@ static void __drm_colorop_reset(struct d
void drm_colorop_reset(struct drm_colorop *colorop)
{
- kfree(colorop->state);
+ if (colorop->state)
+ drm_colorop_atomic_destroy_state(colorop, colorop->state);
+
colorop->state = kzalloc_obj(*colorop->state);
if (colorop->state)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 126/201] drm/imx: parallel-display: Prefer bus format set via legacy "interface-pix-fmt" DT property
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (124 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 125/201] drm/colorop: Fix blob property reference tracking in state lifecycle Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 127/201] drm/msm: always recover the gpu Greg Kroah-Hartman
` (80 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Marek Vasut, Philipp Zabel
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <marex@nabladev.com>
commit cdf26e1462c220629bb79d487263b66f8b679eab upstream.
Prefer bus format set via legacy "interface-pix-fmt" DT property
over panel bus format. This is necessary to retain support for
DTs which configure the IPUv3 parallel output as 24bit DPI, but
connect 18bit DPI panels to it with hardware swizzling.
This used to work up to Linux 6.12, but stopped working in 6.13,
reinstate the behavior to support old DTs.
Cc: stable@vger.kernel.org
Fixes: 5f6e56d3319d ("drm/imx: parallel-display: switch to drm_panel_bridge")
Signed-off-by: Marek Vasut <marex@nabladev.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patch.msgid.link/20260110171510.692666-1-marex@nabladev.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/imx/ipuv3/parallel-display.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/imx/ipuv3/parallel-display.c
+++ b/drivers/gpu/drm/imx/ipuv3/parallel-display.c
@@ -110,8 +110,7 @@ imx_pd_bridge_atomic_get_input_bus_fmts(
output_fmt = imxpd->bus_format ? : MEDIA_BUS_FMT_RGB888_1X24;
/* Now make sure the requested output format is supported. */
- if ((imxpd->bus_format && imxpd->bus_format != output_fmt) ||
- !imx_pd_format_supported(output_fmt)) {
+ if (!imx_pd_format_supported(output_fmt)) {
*num_input_fmts = 0;
return NULL;
}
@@ -121,7 +120,17 @@ imx_pd_bridge_atomic_get_input_bus_fmts(
if (!input_fmts)
return NULL;
- input_fmts[0] = output_fmt;
+ /*
+ * Prefer bus format set via legacy "interface-pix-fmt" DT property
+ * over panel bus format. This is necessary to retain support for
+ * DTs which configure the IPUv3 parallel output as 24bit, but
+ * connect 18bit DPI panels to it with hardware swizzling.
+ */
+ if (imxpd->bus_format && imxpd->bus_format != output_fmt)
+ input_fmts[0] = imxpd->bus_format;
+ else
+ input_fmts[0] = output_fmt;
+
return input_fmts;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 127/201] drm/msm: always recover the gpu
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (125 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 126/201] drm/imx: parallel-display: Prefer bus format set via legacy "interface-pix-fmt" DT property Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 128/201] drm/v3d: Reject empty multisync extension to prevent infinite loop Greg Kroah-Hartman
` (79 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Anna Maniscalco, Rob Clark
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anna Maniscalco <anna.maniscalco2000@gmail.com>
commit 01a0d6cd7032e9993feea19fadb03ef9d5b488f2 upstream.
Previously, in case there was no more work to do, recover worker
wouldn't trigger recovery and would instead rely on the gpu going to
sleep and then resuming when more work is submitted.
Recover_worker will first increment the fence of the hung ring so, if
there's only one job submitted to a ring and that causes an hang, it
will early out.
There's no guarantee that the gpu will suspend and resume before more
work is submitted and if the gpu is in a hung state it will stay in that
state and probably trigger a timeout again.
Just stop checking and always recover the gpu.
Signed-off-by: Anna Maniscalco <anna.maniscalco2000@gmail.com>
Cc: stable@vger.kernel.org
Patchwork: https://patchwork.freedesktop.org/patch/704066/
Message-ID: <20260210-recovery_suspend_fix-v1-1-00ed9013da04@gmail.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/msm/msm_gpu.c | 42 ++++++++++++++++++++----------------------
1 file changed, 20 insertions(+), 22 deletions(-)
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -546,32 +546,30 @@ static void recover_worker(struct kthrea
msm_update_fence(ring->fctx, fence);
}
- if (msm_gpu_active(gpu)) {
- /* retire completed submits, plus the one that hung: */
- retire_submits(gpu);
+ /* retire completed submits, plus the one that hung: */
+ retire_submits(gpu);
- gpu->funcs->recover(gpu);
+ gpu->funcs->recover(gpu);
- /*
- * Replay all remaining submits starting with highest priority
- * ring
- */
- for (i = 0; i < gpu->nr_rings; i++) {
- struct msm_ringbuffer *ring = gpu->rb[i];
- unsigned long flags;
+ /*
+ * Replay all remaining submits starting with highest priority
+ * ring
+ */
+ for (i = 0; i < gpu->nr_rings; i++) {
+ struct msm_ringbuffer *ring = gpu->rb[i];
+ unsigned long flags;
- spin_lock_irqsave(&ring->submit_lock, flags);
- list_for_each_entry(submit, &ring->submits, node) {
- /*
- * If the submit uses an unusable vm make sure
- * we don't actually run it
- */
- if (to_msm_vm(submit->vm)->unusable)
- submit->nr_cmds = 0;
- gpu->funcs->submit(gpu, submit);
- }
- spin_unlock_irqrestore(&ring->submit_lock, flags);
+ spin_lock_irqsave(&ring->submit_lock, flags);
+ list_for_each_entry(submit, &ring->submits, node) {
+ /*
+ * If the submit uses an unusable vm make sure
+ * we don't actually run it
+ */
+ if (to_msm_vm(submit->vm)->unusable)
+ submit->nr_cmds = 0;
+ gpu->funcs->submit(gpu, submit);
}
+ spin_unlock_irqrestore(&ring->submit_lock, flags);
}
pm_runtime_put(&gpu->pdev->dev);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 128/201] drm/v3d: Reject empty multisync extension to prevent infinite loop
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (126 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 127/201] drm/msm: always recover the gpu Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 129/201] drm/i915/psr: Init variable to avoid early exit from et alignment loop Greg Kroah-Hartman
` (78 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ashutosh Desai, Maíra Canal
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ashutosh Desai <ashutoshdesai993@gmail.com>
commit fb44d589bf3148e13452185a6e772a7efbf2d684 upstream.
v3d_get_extensions() walks a userspace-provided singly-linked list of
ioctl extensions without any bound on the chain length. A local user
can craft a self-referential extension (ext->next == &ext) with zero
in_sync_count and out_sync_count, which bypasses the existing duplicate-
extension guard:
if (se->in_sync_count || se->out_sync_count)
return -EINVAL;
The guard never fires because v3d_get_multisync_post_deps() returns
immediately when count is zero, leaving both fields at zero on every
iteration. The result is an infinite loop in kernel context, blocking
the calling thread and pegging a CPU core indefinitely.
Fix this by rejecting a multisync extension where both in_sync_count
and out_sync_count are zero in v3d_get_multisync_submit_deps(). An
empty multisync carries no synchronization information and serves no
useful purpose, so returning -EINVAL for such an extension is the
correct defense against this attack vector.
Fixes: e4165ae8304e ("drm/v3d: add multiple syncobjs support")
Cc: stable@vger.kernel.org
Signed-off-by: Ashutosh Desai <ashutoshdesai993@gmail.com>
Link: https://patch.msgid.link/20260415050000.3816128-1-ashutoshdesai993@gmail.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/v3d/v3d_submit.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/gpu/drm/v3d/v3d_submit.c
+++ b/drivers/gpu/drm/v3d/v3d_submit.c
@@ -393,6 +393,11 @@ v3d_get_multisync_submit_deps(struct drm
if (multisync.pad)
return -EINVAL;
+ if (!multisync.in_sync_count && !multisync.out_sync_count) {
+ drm_dbg(&v3d->drm, "Empty multisync extension\n");
+ return -EINVAL;
+ }
+
ret = v3d_get_multisync_post_deps(file_priv, se, multisync.out_sync_count,
multisync.out_syncs);
if (ret)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 129/201] drm/i915/psr: Init variable to avoid early exit from et alignment loop
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (127 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 128/201] drm/v3d: Reject empty multisync extension to prevent infinite loop Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 130/201] drm/amdkfd: Clear VRAM on allocation to prevent stale data exposure Greg Kroah-Hartman
` (77 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jouni Högander, Nemesa Garg,
Dan Carpenter, Andi Shyti, Tvrtko Ursulin
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jouni Högander <jouni.hogander@intel.com>
commit 314f6179e370988ac00dadf373a4f6166eb3db15 upstream.
Uninitialized boolean variable may cause unwanted exit from et alignment
loop. Fix this by initializing it as false.
Fixes: 1be2fca84f52 ("drm/i915/psr: Repeat Selective Update area alignment")
Cc: <stable@vger.kernel.org> # v6.9+
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Nemesa Garg <nemesa.garg@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patch.msgid.link/20260413112345.88853-1-jouni.hogander@intel.com
(cherry picked from commit 289678a90b8cf81e3514c9d6c667235cd39c7acf)
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -2970,7 +2970,7 @@ int intel_psr2_sel_fetch_update(struct i
return ret;
do {
- bool cursor_in_su_area;
+ bool cursor_in_su_area = false;
/*
* Adjust su area to cover cursor fully as necessary
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 130/201] drm/amdkfd: Clear VRAM on allocation to prevent stale data exposure
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (128 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 129/201] drm/i915/psr: Init variable to avoid early exit from et alignment loop Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 131/201] drm/amd/display: fix math_mod() using arg1 instead of arg2 Greg Kroah-Hartman
` (76 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Amir Shetaia, Christian König,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amir Shetaia <Amir.Shetaia@amd.com>
commit ad52d61d82181dbdb7f05826de38352d5e550cc2 upstream.
KFD VRAM allocations set AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE
but not AMDGPU_GEM_CREATE_VRAM_CLEARED, leaving freshly allocated
VRAM with stale data from prior use observable by compute kernels.
The GEM ioctl path already sets VRAM_CLEARED for all userspace
allocations via amdgpu_gem_create_ioctl() and
amdgpu_mode_dumb_create(). The KFD path was missing this flag,
allowing stale page table remnants to leak into user buffers.
This causes crashes in RCCL P2P transport where non-zero data in
ptrExchange/head/tail fields corrupts the protocol handshake.
Signed-off-by: Amir Shetaia <Amir.Shetaia@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1735,7 +1735,8 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_
alloc_domain = AMDGPU_GEM_DOMAIN_GTT;
alloc_flags = 0;
} else {
- alloc_flags = AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
+ alloc_flags = AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE |
+ AMDGPU_GEM_CREATE_VRAM_CLEARED;
alloc_flags |= (flags & KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC) ?
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED : 0;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 131/201] drm/amd/display: fix math_mod() using arg1 instead of arg2
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (129 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 130/201] drm/amdkfd: Clear VRAM on allocation to prevent stale data exposure Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 132/201] drm/amd: Add missing firmware declaration for PSP v15.0.0 Greg Kroah-Hartman
` (75 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mario Limonciello, Alex Deucher,
Dillon Varone, Wenjing Liu, Aurabindo Pillai, Dan Wheeler
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wenjing Liu <wenjing.liu@amd.com>
commit 2b104fc31be0607c04188fadbd4a9fa5b50f3b99 upstream.
[Why]
math_mod() multiplied by arg1 instead of arg2, returning a wrong
result for any non-trivial modulo operation.
[How]
Replace arg1 with arg2 in the subtraction term to correctly
implement fmod(arg1, arg2).
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.c
@@ -23,7 +23,7 @@ double math_mod(const double arg1, const
return arg2;
if (isNaN(arg2))
return arg1;
- return arg1 - arg1 * ((int)(arg1 / arg2));
+ return arg1 - arg2 * ((int)(arg1 / arg2));
}
double math_min2(const double arg1, const double arg2)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 132/201] drm/amd: Add missing firmware declaration for PSP v15.0.0
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (130 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 131/201] drm/amd/display: fix math_mod() using arg1 instead of arg2 Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 133/201] drm/amdgpu: Use NBIF offset for register RCC_STRAP0_RCC_DEV0_EPF0_STRAP0 Greg Kroah-Hartman
` (74 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pratik Vishwakarma,
Mario Limonciello, Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello <mario.limonciello@amd.com>
commit 2744103f58e8e03ce675c670bbfe3f46034e5f24 upstream.
PSP v15.0.0 needs both TOC and TA firmware. Without the declaration
it won't get included in initramfs and leads to following failure:
```
Direct firmware load for amdgpu/psp_15_0_0_ta.bin failed with error -2
early_init of IP block <psp> failed -19
Fatal error during GPU init
```
Fixes: 9b24f63d825e7 ("drm/amdgpu: Enable support for PSP 15_0_0")
Reviewed-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/psp_v15_0.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/gpu/drm/amd/amdgpu/psp_v15_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v15_0.c
@@ -32,6 +32,7 @@
#include "mp/mp_15_0_0_sh_mask.h"
MODULE_FIRMWARE("amdgpu/psp_15_0_0_toc.bin");
+MODULE_FIRMWARE("amdgpu/psp_15_0_0_ta.bin");
static int psp_v15_0_0_init_microcode(struct psp_context *psp)
{
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 133/201] drm/amdgpu: Use NBIF offset for register RCC_STRAP0_RCC_DEV0_EPF0_STRAP0 .
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (131 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 132/201] drm/amd: Add missing firmware declaration for PSP v15.0.0 Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 134/201] drm/amdgpu: Use SMUIO 15.0.0 offsets for TSC upper and lower count Greg Kroah-Hartman
` (73 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pratik Vishwakarma,
Ramalingeswara Reddy, Kanala, Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ramalingeswara Reddy, Kanala <Kanala.RamalingeswaraReddy@amd.com>
commit 08cdf07b55bff236aeaea3d52a8d1ffe11d801ec upstream.
Define and use regRCC_STRAP0_RCC_DEV0_EPF0_STRAP0_nbif_4_10,
to get correct rev_id in nbif_v6_3_1_get_rev_id().
Reviewed-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Signed-off-by: Ramalingeswara Reddy, Kanala <Kanala.RamalingeswaraReddy@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c
@@ -54,6 +54,8 @@
#define regGDC_S2A0_S2A_DOORBELL_ENTRY_5_CTRL_nbif_4_10_BASE_IDX 3
#define regGDC_S2A0_S2A_DOORBELL_ENTRY_5_CTRL1_nbif_4_10 0x4f0af6
#define regGDC_S2A0_S2A_DOORBELL_ENTRY_5_CTRL1_nbif_4_10_BASE_IDX 3
+#define regRCC_STRAP0_RCC_DEV0_EPF0_STRAP0_nbif_4_10 0x0021
+#define regRCC_STRAP0_RCC_DEV0_EPF0_STRAP0_nbif_4_10_BASE_IDX 2
static void nbif_v6_3_1_remap_hdp_registers(struct amdgpu_device *adev)
{
@@ -65,7 +67,12 @@ static void nbif_v6_3_1_remap_hdp_regist
static u32 nbif_v6_3_1_get_rev_id(struct amdgpu_device *adev)
{
- u32 tmp = RREG32_SOC15(NBIO, 0, regRCC_STRAP0_RCC_DEV0_EPF0_STRAP0);
+ u32 tmp;
+
+ if (amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 4))
+ tmp = RREG32_SOC15(NBIO, 0, regRCC_STRAP0_RCC_DEV0_EPF0_STRAP0_nbif_4_10);
+ else
+ tmp = RREG32_SOC15(NBIO, 0, regRCC_STRAP0_RCC_DEV0_EPF0_STRAP0);
tmp &= RCC_STRAP0_RCC_DEV0_EPF0_STRAP0__STRAP_ATI_REV_ID_DEV0_F0_MASK;
tmp >>= RCC_STRAP0_RCC_DEV0_EPF0_STRAP0__STRAP_ATI_REV_ID_DEV0_F0__SHIFT;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 134/201] drm/amdgpu: Use SMUIO 15.0.0 offsets for TSC upper and lower count.
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (132 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 133/201] drm/amdgpu: Use NBIF offset for register RCC_STRAP0_RCC_DEV0_EPF0_STRAP0 Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 135/201] drm/amdgpu: gate VM CPU HDP flush on reset lock Greg Kroah-Hartman
` (72 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alex Deucher, Pratik Vishwakarma,
Ramalingeswara Reddy, Kanala
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ramalingeswara Reddy, Kanala <Kanala.RamalingeswaraReddy@amd.com>
commit 574b3b14f7d1b329fc6e67b79328f0e6f4d4b3d4 upstream.
Define and use regGOLDEN_TSC_COUNT_UPPER_smu_15_0_0 and
regGOLDEN_TSC_COUNT_LOWER_smu_15_0_0 for TSC upper and lower count.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Signed-off-by: Ramalingeswara Reddy, Kanala <Kanala.RamalingeswaraReddy@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -64,6 +64,11 @@
#define regPC_CONFIG_CNTL_1 0x194d
#define regPC_CONFIG_CNTL_1_BASE_IDX 1
+#define regGOLDEN_TSC_COUNT_UPPER_smu_15_0_0 0x0030
+#define regGOLDEN_TSC_COUNT_UPPER_smu_15_0_0_BASE_IDX 1
+#define regGOLDEN_TSC_COUNT_LOWER_smu_15_0_0 0x0031
+#define regGOLDEN_TSC_COUNT_LOWER_smu_15_0_0_BASE_IDX 1
+
#define regCP_GFX_MQD_CONTROL_DEFAULT 0x00000100
#define regCP_GFX_HQD_VMID_DEFAULT 0x00000000
#define regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT 0x00000000
@@ -5187,11 +5192,27 @@ static uint64_t gfx_v11_0_get_gpu_clock_
amdgpu_gfx_off_ctrl(adev, true);
} else {
preempt_disable();
- clock_counter_hi_pre = (uint64_t)RREG32_SOC15(SMUIO, 0, regGOLDEN_TSC_COUNT_UPPER);
- clock_counter_lo = (uint64_t)RREG32_SOC15(SMUIO, 0, regGOLDEN_TSC_COUNT_LOWER);
- clock_counter_hi_after = (uint64_t)RREG32_SOC15(SMUIO, 0, regGOLDEN_TSC_COUNT_UPPER);
- if (clock_counter_hi_pre != clock_counter_hi_after)
- clock_counter_lo = (uint64_t)RREG32_SOC15(SMUIO, 0, regGOLDEN_TSC_COUNT_LOWER);
+ if (amdgpu_ip_version(adev, SMUIO_HWIP, 0) < IP_VERSION(15, 0, 0)) {
+ clock_counter_hi_pre = (uint64_t)RREG32_SOC15(SMUIO, 0,
+ regGOLDEN_TSC_COUNT_UPPER);
+ clock_counter_lo = (uint64_t)RREG32_SOC15(SMUIO, 0,
+ regGOLDEN_TSC_COUNT_LOWER);
+ clock_counter_hi_after = (uint64_t)RREG32_SOC15(SMUIO, 0,
+ regGOLDEN_TSC_COUNT_UPPER);
+ if (clock_counter_hi_pre != clock_counter_hi_after)
+ clock_counter_lo = (uint64_t)RREG32_SOC15(SMUIO, 0,
+ regGOLDEN_TSC_COUNT_LOWER);
+ } else {
+ clock_counter_hi_pre = (uint64_t)RREG32_SOC15(SMUIO, 0,
+ regGOLDEN_TSC_COUNT_UPPER_smu_15_0_0);
+ clock_counter_lo = (uint64_t)RREG32_SOC15(SMUIO, 0,
+ regGOLDEN_TSC_COUNT_LOWER_smu_15_0_0);
+ clock_counter_hi_after = (uint64_t)RREG32_SOC15(SMUIO, 0,
+ regGOLDEN_TSC_COUNT_UPPER_smu_15_0_0);
+ if (clock_counter_hi_pre != clock_counter_hi_after)
+ clock_counter_lo = (uint64_t)RREG32_SOC15(SMUIO, 0,
+ regGOLDEN_TSC_COUNT_LOWER_smu_15_0_0);
+ }
preempt_enable();
}
clock = clock_counter_lo | (clock_counter_hi_after << 32ULL);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 135/201] drm/amdgpu: gate VM CPU HDP flush on reset lock
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (133 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 134/201] drm/amdgpu: Use SMUIO 15.0.0 offsets for TSC upper and lower count Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 136/201] drm/amd/pm: fix incorrect FeatureCtrlMask setting on smu v14.0.x Greg Kroah-Hartman
` (71 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chenglei Xie, Christian König,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chenglei Xie <Chenglei.Xie@amd.com>
commit ddda81c4d7e71e41b1be91d921fd85747eddbd12 upstream.
During GPU reset, the application could still run CPU page table updates. Each commit called
amdgpu_device_flush_hdp(), which on SR-IOV sends work through the KIQ ring.
That can advance sync_seq while the GPU is being reset,
leaving fence writeback out of sync and causing amdgpu_fence_emit_polling()
to time out on later KIQ use.
Fix:
amdgpu_vm_cpu_commit():
Reset will flush HDP anyway, the HDP flush in amdgpu_vm_cpu_commit() can be skipped
when a reset is ongoging.
Take reset_domain->sem with down_read_trylock() before amdgpu_device_flush_hdp().
If the reset path holds the write lock, skip the HDP flush so no HDP-related HW
access (including KIQ) runs during reset; state is re-established after reset.
Signed-off-by: Chenglei Xie <Chenglei.Xie@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
@@ -21,6 +21,8 @@
*/
#include "amdgpu_vm.h"
+#include "amdgpu.h"
+#include "amdgpu_reset.h"
#include "amdgpu_object.h"
#include "amdgpu_trace.h"
@@ -108,11 +110,19 @@ static int amdgpu_vm_cpu_update(struct a
static int amdgpu_vm_cpu_commit(struct amdgpu_vm_update_params *p,
struct dma_fence **fence)
{
+ struct amdgpu_device *adev = p->adev;
+
if (p->needs_flush)
atomic64_inc(&p->vm->tlb_seq);
mb();
- amdgpu_device_flush_hdp(p->adev, NULL);
+ /* A reset flushed the HDP anyway, so that here can be skipped when a reset is ongoing */
+ if (!down_read_trylock(&adev->reset_domain->sem))
+ return 0;
+
+ amdgpu_device_flush_hdp(adev, NULL);
+ up_read(&adev->reset_domain->sem);
+
return 0;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 136/201] drm/amd/pm: fix incorrect FeatureCtrlMask setting on smu v14.0.x
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (134 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 135/201] drm/amdgpu: gate VM CPU HDP flush on reset lock Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 137/201] drm/amdkfd: Add upper bound check for num_of_nodes Greg Kroah-Hartman
` (70 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yang Wang, Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yang Wang <kevinyang.wang@amd.com>
commit 504f0098ebd074ac8c0ce3471795d79f68e3d265 upstream.
OverDriveTable.FanMinimumPwm and FeatureCtrlMask.PP_OD_FEATURE_FAN_LEGACY_BIT
have a hard dependency.
Invalid handling of this dependency leads to disabled thermal monitoring
and temperature boundary validation.
v2: squash in typo fix (Yang)
Fixes: 9710b84e2a6a ("drm/amd/pm: add overdrive support on smu v14.0.2/3")
Cc: stable@vger.kernel.org
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
@@ -2372,6 +2372,7 @@ static int smu_v14_0_2_od_restore_table_
}
od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
+ od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
break;
case PP_OD_EDIT_FAN_ZERO_RPM_ENABLE:
od_table->OverDriveTable.FanZeroRpmEnable =
@@ -2400,7 +2401,8 @@ static int smu_v14_0_2_od_restore_table_
od_table->OverDriveTable.FanMinimumPwm =
boot_overdrive_table->OverDriveTable.FanMinimumPwm;
od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
- od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
+ od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
+ od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
break;
default:
dev_info(adev->dev, "Invalid table index: %ld\n", input);
@@ -2570,6 +2572,7 @@ static int smu_v14_0_2_od_edit_dpm_table
od_table->OverDriveTable.FanLinearPwmPoints[input[0]] = input[2];
od_table->OverDriveTable.FanMode = FAN_MODE_MANUAL_LINEAR;
od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
+ od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
break;
case PP_OD_EDIT_ACOUSTIC_LIMIT:
@@ -2639,7 +2642,7 @@ static int smu_v14_0_2_od_edit_dpm_table
break;
case PP_OD_EDIT_FAN_MINIMUM_PWM:
- if (!smu_v14_0_2_is_od_feature_supported(smu, PP_OD_FEATURE_FAN_CURVE_BIT)) {
+ if (!smu_v14_0_2_is_od_feature_supported(smu, PP_OD_FEATURE_FAN_LEGACY_BIT)) {
dev_warn(adev->dev, "Fan curve setting not supported!\n");
return -ENOTSUPP;
}
@@ -2657,7 +2660,8 @@ static int smu_v14_0_2_od_edit_dpm_table
od_table->OverDriveTable.FanMinimumPwm = input[0];
od_table->OverDriveTable.FanMode = FAN_MODE_AUTO;
- od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
+ od_table->OverDriveTable.FeatureCtrlMask |= BIT(PP_OD_FEATURE_FAN_LEGACY_BIT);
+ od_table->OverDriveTable.FeatureCtrlMask &= ~BIT(PP_OD_FEATURE_FAN_CURVE_BIT);
break;
case PP_OD_EDIT_FAN_ZERO_RPM_ENABLE:
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 137/201] drm/amdkfd: Add upper bound check for num_of_nodes
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (135 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 136/201] drm/amd/pm: fix incorrect FeatureCtrlMask setting on smu v14.0.x Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 138/201] drm/amdgpu: Add bounds checking to ib_{get,set}_value Greg Kroah-Hartman
` (69 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Harish Kasiviswanathan, Alysa Liu,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alysa Liu <Alysa.Liu@amd.com>
commit 74b73fa56a395d46745e4f245225963e9f8be7f1 upstream.
drm/amdkfd: Add upper bound check for num_of_nodes
in kfd_ioctl_get_process_apertures_new.
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alysa Liu <Alysa.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 98ff46a5ea090c14d2cdb4f5b993b05d74f3949f)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +++
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 +
drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 11 +++++++++++
3 files changed, 15 insertions(+)
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -776,6 +776,9 @@ static int kfd_ioctl_get_process_apertur
goto out_unlock;
}
+ if (args->num_of_nodes > kfd_topology_get_num_devices())
+ return -EINVAL;
+
/* Fill in process-aperture information for all available
* nodes, but not more than args->num_of_nodes as that is
* the amount of memory allocated by user
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -1191,6 +1191,7 @@ static inline struct kfd_node *kfd_node_
return NULL;
}
int kfd_topology_enum_kfd_devices(uint8_t idx, struct kfd_node **kdev);
+uint32_t kfd_topology_get_num_devices(void);
int kfd_numa_node_to_apic_id(int numa_node_id);
uint32_t kfd_gpu_node_num(void);
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -2297,6 +2297,17 @@ int kfd_topology_remove_device(struct kf
return res;
}
+uint32_t kfd_topology_get_num_devices(void)
+{
+ uint32_t num_devices;
+
+ down_read(&topology_lock);
+ num_devices = sys_props.num_devices;
+ up_read(&topology_lock);
+
+ return num_devices;
+}
+
/* kfd_topology_enum_kfd_devices - Enumerate through all devices in KFD
* topology. If GPU device is found @idx, then valid kfd_dev pointer is
* returned through @kdev
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 138/201] drm/amdgpu: Add bounds checking to ib_{get,set}_value
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (136 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 137/201] drm/amdkfd: Add upper bound check for num_of_nodes Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 139/201] drm/amdgpu/vcn4: Prevent OOB reads when parsing IB Greg Kroah-Hartman
` (68 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Benjamin Cheng, Christian König,
Ruijing Dong, Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Cheng <benjamin.cheng@amd.com>
commit 66085e206431ef88ce36f53c1f53d570790ccc9e upstream.
The uvd/vce/vcn code accesses the IB at predefined offsets without
checking that the IB is large enough. Check the bounds here. The caller
is responsible for making sure it can handle arbitrary return values.
Also make the idx a uint32_t to prevent overflows causing the condition
to fail.
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -553,15 +553,18 @@ void amdgpu_debugfs_ring_init(struct amd
int amdgpu_ring_init_mqd(struct amdgpu_ring *ring);
-static inline u32 amdgpu_ib_get_value(struct amdgpu_ib *ib, int idx)
+static inline u32 amdgpu_ib_get_value(struct amdgpu_ib *ib, uint32_t idx)
{
- return ib->ptr[idx];
+ if (idx < ib->length_dw)
+ return ib->ptr[idx];
+ return 0;
}
-static inline void amdgpu_ib_set_value(struct amdgpu_ib *ib, int idx,
+static inline void amdgpu_ib_set_value(struct amdgpu_ib *ib, uint32_t idx,
uint32_t value)
{
- ib->ptr[idx] = value;
+ if (idx < ib->length_dw)
+ ib->ptr[idx] = value;
}
int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 139/201] drm/amdgpu/vcn4: Prevent OOB reads when parsing IB
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (137 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 138/201] drm/amdgpu: Add bounds checking to ib_{get,set}_value Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 140/201] drm/amdgpu/vce: Prevent partial address patches Greg Kroah-Hartman
` (67 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Benjamin Cheng, Christian König,
Ruijing Dong, Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Cheng <benjamin.cheng@amd.com>
commit 2444eb0ec8283f4a3845eb7febad378476e1ba3c upstream.
Rewrite the IB parsing to use amdgpu_ib_get_value() which handles the
bounds checks.
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1913,9 +1913,10 @@ out:
static int vcn_v4_0_enc_find_ib_param(struct amdgpu_ib *ib, uint32_t id, int start)
{
int i;
+ uint32_t len;
- for (i = start; i < ib->length_dw && ib->ptr[i] >= 8; i += ib->ptr[i] / 4) {
- if (ib->ptr[i + 1] == id)
+ for (i = start; (len = amdgpu_ib_get_value(ib, i)) >= 8; i += len / 4) {
+ if (amdgpu_ib_get_value(ib, i + 1) == id)
return i;
}
return -1;
@@ -1926,8 +1927,6 @@ static int vcn_v4_0_ring_patch_cs_in_pla
struct amdgpu_ib *ib)
{
struct amdgpu_ring *ring = amdgpu_job_ring(job);
- struct amdgpu_vcn_decode_buffer *decode_buffer;
- uint64_t addr;
uint32_t val;
int idx = 0, sidx;
@@ -1938,20 +1937,22 @@ static int vcn_v4_0_ring_patch_cs_in_pla
while ((idx = vcn_v4_0_enc_find_ib_param(ib, RADEON_VCN_ENGINE_INFO, idx)) >= 0) {
val = amdgpu_ib_get_value(ib, idx + 2); /* RADEON_VCN_ENGINE_TYPE */
if (val == RADEON_VCN_ENGINE_TYPE_DECODE) {
- decode_buffer = (struct amdgpu_vcn_decode_buffer *)&ib->ptr[idx + 6];
+ uint32_t valid_buf_flag = amdgpu_ib_get_value(ib, idx + 6);
+ uint64_t msg_buffer_addr;
- if (!(decode_buffer->valid_buf_flag & 0x1))
+ if (!(valid_buf_flag & 0x1))
return 0;
- addr = ((u64)decode_buffer->msg_buffer_address_hi) << 32 |
- decode_buffer->msg_buffer_address_lo;
- return vcn_v4_0_dec_msg(p, job, addr);
+ msg_buffer_addr = ((u64)amdgpu_ib_get_value(ib, idx + 7)) << 32 |
+ amdgpu_ib_get_value(ib, idx + 8);
+ return vcn_v4_0_dec_msg(p, job, msg_buffer_addr);
} else if (val == RADEON_VCN_ENGINE_TYPE_ENCODE) {
sidx = vcn_v4_0_enc_find_ib_param(ib, RENCODE_IB_PARAM_SESSION_INIT, idx);
- if (sidx >= 0 && ib->ptr[sidx + 2] == RENCODE_ENCODE_STANDARD_AV1)
+ if (sidx >= 0 &&
+ amdgpu_ib_get_value(ib, sidx + 2) == RENCODE_ENCODE_STANDARD_AV1)
return vcn_v4_0_limit_sched(p, job);
}
- idx += ib->ptr[idx] / 4;
+ idx += amdgpu_ib_get_value(ib, idx) / 4;
}
return 0;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 140/201] drm/amdgpu/vce: Prevent partial address patches
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (138 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 139/201] drm/amdgpu/vcn4: Prevent OOB reads when parsing IB Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 141/201] drm/amdgpu/vcn4: Prevent OOB reads when parsing dec msg Greg Kroah-Hartman
` (66 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Benjamin Cheng, Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Cheng <benjamin.cheng@amd.com>
commit de2a02cc28d6d5d37db07d00a9a684c754a5fd74 upstream.
In the case that only one of lo/hi is valid, the patching could result
in a bad address written to in FW.
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -698,6 +698,9 @@ static int amdgpu_vce_cs_reloc(struct am
uint64_t addr;
int r;
+ if (lo >= ib->length_dw || hi >= ib->length_dw)
+ return -EINVAL;
+
if (index == 0xffffffff)
index = 0;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 141/201] drm/amdgpu/vcn4: Prevent OOB reads when parsing dec msg
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (139 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 140/201] drm/amdgpu/vce: Prevent partial address patches Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 142/201] drm/amdgpu/vcn3: " Greg Kroah-Hartman
` (65 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Benjamin Cheng, Christian König,
Ruijing Dong, Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Cheng <benjamin.cheng@amd.com>
commit 0a78f2bac1424deb7c9d5e09c6b8e849d8e8b648 upstream.
Check bounds against the end of the BO whenever we access the msg.
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1826,7 +1826,7 @@ static int vcn_v4_0_dec_msg(struct amdgp
struct ttm_operation_ctx ctx = { false, false };
struct amdgpu_device *adev = p->adev;
struct amdgpu_bo_va_mapping *map;
- uint32_t *msg, num_buffers;
+ uint32_t *msg, num_buffers, len_dw;
struct amdgpu_bo *bo;
uint64_t start, end;
unsigned int i;
@@ -1847,6 +1847,11 @@ static int vcn_v4_0_dec_msg(struct amdgp
return -EINVAL;
}
+ if (end - addr < 16) {
+ DRM_ERROR("VCN messages must be at least 4 DWORDs!\n");
+ return -EINVAL;
+ }
+
bo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
amdgpu_bo_placement_from_domain(bo, bo->allowed_domains);
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
@@ -1863,8 +1868,8 @@ static int vcn_v4_0_dec_msg(struct amdgp
msg = ptr + addr - start;
- /* Check length */
if (msg[1] > end - addr) {
+ DRM_ERROR("VCN message header does not fit in BO!\n");
r = -EINVAL;
goto out;
}
@@ -1872,7 +1877,16 @@ static int vcn_v4_0_dec_msg(struct amdgp
if (msg[3] != RDECODE_MSG_CREATE)
goto out;
+ len_dw = msg[1] / 4;
num_buffers = msg[2];
+
+ /* Verify that all indices fit within the claimed length. Each index is 4 DWORDs */
+ if (num_buffers > len_dw || 6 + num_buffers * 4 > len_dw) {
+ DRM_ERROR("VCN message has too many buffers!\n");
+ r = -EINVAL;
+ goto out;
+ }
+
for (i = 0, msg = &msg[6]; i < num_buffers; ++i, msg += 4) {
uint32_t offset, size, *create;
@@ -1882,7 +1896,8 @@ static int vcn_v4_0_dec_msg(struct amdgp
offset = msg[1];
size = msg[2];
- if (offset + size > end) {
+ if (size < 4 || offset + size > end - addr) {
+ DRM_ERROR("VCN message buffer exceeds BO bounds!\n");
r = -EINVAL;
goto out;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 142/201] drm/amdgpu/vcn3: Prevent OOB reads when parsing dec msg
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (140 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 141/201] drm/amdgpu/vcn4: Prevent OOB reads when parsing dec msg Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 143/201] drm/amd/display: Change dither policy for 10 bpc output back to dithering Greg Kroah-Hartman
` (64 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Benjamin Cheng, Christian König,
Ruijing Dong, Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Cheng <benjamin.cheng@amd.com>
commit b193019860d61e92da395eae2011f2f6716b182f upstream.
Check bounds against the end of the BO whenever we access the msg.
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
@@ -1909,7 +1909,7 @@ static int vcn_v3_0_dec_msg(struct amdgp
struct ttm_operation_ctx ctx = { false, false };
struct amdgpu_device *adev = p->adev;
struct amdgpu_bo_va_mapping *map;
- uint32_t *msg, num_buffers;
+ uint32_t *msg, num_buffers, len_dw;
struct amdgpu_bo *bo;
uint64_t start, end;
unsigned int i;
@@ -1930,6 +1930,11 @@ static int vcn_v3_0_dec_msg(struct amdgp
return -EINVAL;
}
+ if (end - addr < 16) {
+ DRM_ERROR("VCN messages must be at least 4 DWORDs!\n");
+ return -EINVAL;
+ }
+
bo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
amdgpu_bo_placement_from_domain(bo, bo->allowed_domains);
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
@@ -1946,8 +1951,8 @@ static int vcn_v3_0_dec_msg(struct amdgp
msg = ptr + addr - start;
- /* Check length */
if (msg[1] > end - addr) {
+ DRM_ERROR("VCN message header does not fit in BO!\n");
r = -EINVAL;
goto out;
}
@@ -1955,7 +1960,16 @@ static int vcn_v3_0_dec_msg(struct amdgp
if (msg[3] != RDECODE_MSG_CREATE)
goto out;
+ len_dw = msg[1] / 4;
num_buffers = msg[2];
+
+ /* Verify that all indices fit within the claimed length. Each index is 4 DWORDs */
+ if (num_buffers > len_dw || 6 + num_buffers * 4 > len_dw) {
+ DRM_ERROR("VCN message has too many buffers!\n");
+ r = -EINVAL;
+ goto out;
+ }
+
for (i = 0, msg = &msg[6]; i < num_buffers; ++i, msg += 4) {
uint32_t offset, size, *create;
@@ -1965,14 +1979,15 @@ static int vcn_v3_0_dec_msg(struct amdgp
offset = msg[1];
size = msg[2];
- if (offset + size > end) {
+ if (size < 4 || offset + size > end - addr) {
+ DRM_ERROR("VCN message buffer exceeds BO bounds!\n");
r = -EINVAL;
goto out;
}
create = ptr + addr + offset - start;
- /* H246, HEVC and VP9 can run on any instance */
+ /* H264, HEVC and VP9 can run on any instance */
if (create[0] == 0x7 || create[0] == 0x10 || create[0] == 0x11)
continue;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 143/201] drm/amd/display: Change dither policy for 10 bpc output back to dithering
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (141 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 142/201] drm/amdgpu/vcn3: " Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 144/201] drm/gem: Fix inconsistent plane dimension calculation in drm_gem_fb_init_with_funcs() Greg Kroah-Hartman
` (63 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mario Kleiner, Aric Cyr, Anthony Koo,
Rodrigo Siqueira, Krunoslav Kovac, Alex Deucher, Harry Wentland
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Kleiner <mario.kleiner.de@gmail.com>
commit d65bfb1782304b03862c8c725fac608015dffd36 upstream.
Commit d5df648ec830 ("drm/amd/display: Change dither policy for 10bpc to
round") degraded display of 12 bpc color precision output to 10 bpc sinks
by switching 10 bpc output from dithering to "truncate to 10 bpc".
I don't find the argumentation in that commit convincing, but the
consequences highly unfortunate, especially for applications that
require effective > 10 bpc precision output of > 10 bpc framebuffers.
The argument wasn't something strong like "there are hardware design
defects or limitations which require us to work around broken dithering
to 10 bpc", or "there are some special use cases which do require
truncation to 10 bpc", but essentially "at some point in the past we
used truncation in Polaris/Vega times and it looks like it got
inadvertently changed for Navi, so let's do that again". I couldn't find
evidence for that in the git commit logs for this. The commit message also
acknowledges that using dithering "...makes some sense for FP16...
...but not for ARGB2101010 surfaces..."
The problem with this is that it makes fp16 surfaces, and especially
rgba16 fixed point surfaces, less useful. These are now well
supported by Mesa 25.3 and later via OpenGL + EGL, Vulkan/WSI, and by
OSS AMDVLK Vulkan/WSI/display, and also by GNOME 50 mutter under Wayland,
and they used to provide more than 10 bpc effective precision at the
output.
Even for 8 or 10 bpc surfaces, the color pipeline behind the framebuffer,
e.g., gamma tables, CTM, can be used for color correction and will
benefit from an effective > 10 bpc output precision via dithering,
retaining some precision that would get lost on the way through the
pipeline, e.g., due to non-linear gamma functions.
Scientific apps rely on this for > 10 bpc display precision. Truncating
to 10 bpc, instead of dithering the pipeline internal 12 bpc precision
down to 10 bpc, causes a serious loss of precision. This also creates the
undesirable and slightly absurd situation that using a cheap monitor
with only 8 bpc input and display panel will yield roughly 12 bpc
precision via dithering from 12 -> 8 bpc, whereas investment into a
more expensive monitor with 10 bpc input and native 10 bpc display will
only yield 10 bpc, even if a fp16 or rgb16 framebuffer and/or a properly
set up color pipeline (gamma tables, CTM's etc. with more than 10 bpc out
precision) would allow effective 12 bpc precision output.
Therefore this patch proposes reverting that commit and going back to
dithering down to 10 bpc, consistent with the behaviour for 6 bpc or 8 bpc
output.
Successfully tested on AMD Polaris DCE 11.2 and Raven Ridge DCN 1.0 with
a native 10 bpc capable monitor, outputting a RGBA16 unorm framebuffer and
measuring resulting color precision with a photometer. No apparent visual
artifacts or problems were observed, and effective precision was measured
to be 12 bpc again, as expected.
Fixes: d5df648ec830 ("drm/amd/display: Change dither policy for 10bpc to round")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: stable@vger.kernel.org
Cc: Aric Cyr <aric.cyr@amd.com>
Cc: Anthony Koo <anthony.koo@amd.com>
Cc: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Cc: Krunoslav Kovac <krunoslav.kovac@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reported-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -5049,7 +5049,7 @@ void resource_build_bit_depth_reduction_
option = DITHER_OPTION_SPATIAL8;
break;
case COLOR_DEPTH_101010:
- option = DITHER_OPTION_TRUN10;
+ option = DITHER_OPTION_SPATIAL10;
break;
default:
option = DITHER_OPTION_DISABLE;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 144/201] drm/gem: Fix inconsistent plane dimension calculation in drm_gem_fb_init_with_funcs()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (142 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 143/201] drm/amd/display: Change dither policy for 10 bpc output back to dithering Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 145/201] drm/appletbdrm: Use kvzalloc for big allocations Greg Kroah-Hartman
` (62 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Thomas Zimmermann, Ashutosh Desai
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ashutosh Desai <ashutoshdesai993@gmail.com>
commit 3d4c2268bd7243c3780fe32bf24ff876da272acf upstream.
drm_gem_fb_init_with_funcs() computes sub-sampled plane dimensions
using plain integer division:
unsigned int width = mode_cmd->width / (i ? info->hsub : 1);
unsigned int height = mode_cmd->height / (i ? info->vsub : 1);
However, the ioctl-level framebuffer_check() in drm_framebuffer.c uses
drm_format_info_plane_width/height() which round up dimensions via
DIV_ROUND_UP(). This inconsistency corrupts the subsequent GEM object
size check for certain pixel format and dimension combinations.
For example, with NV12 (vsub=2) and a 1-pixel-tall framebuffer the
GEM size validation path sees height=0 instead of height=1. The
expression (height - 1) then wraps to UINT_MAX as an unsigned int,
causing min_size to overflow and wrap back to a small value. A tiny
GEM object therefore passes the size guard, yet when the GPU accesses
the chroma plane it will read or write memory beyond the object's
bounds.
Fix by replacing the open-coded divisions with drm_format_info_plane_width()
and drm_format_info_plane_height(), which use DIV_ROUND_UP() and match
the calculation already used in framebuffer_check().
Fixes: 4c3dbb2c312c ("drm: Add GEM backed framebuffer library")
Cc: stable@vger.kernel.org # v4.14+
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Ashutosh Desai <ashutoshdesai993@gmail.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260420013637.457751-1-ashutoshdesai993@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/drm_gem_framebuffer_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c
+++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
@@ -172,8 +172,8 @@ int drm_gem_fb_init_with_funcs(struct dr
}
for (i = 0; i < info->num_planes; i++) {
- unsigned int width = mode_cmd->width / (i ? info->hsub : 1);
- unsigned int height = mode_cmd->height / (i ? info->vsub : 1);
+ unsigned int width = drm_format_info_plane_width(info, mode_cmd->width, i);
+ unsigned int height = drm_format_info_plane_height(info, mode_cmd->height, i);
unsigned int min_size;
objs[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 145/201] drm/appletbdrm: Use kvzalloc for big allocations
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (143 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 144/201] drm/gem: Fix inconsistent plane dimension calculation in drm_gem_fb_init_with_funcs() Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 146/201] drm/amdkfd: validate SVM ioctl nattr against buffer size Greg Kroah-Hartman
` (61 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, soopyc, Sasha Finkelstein,
Thomas Zimmermann, Aditya Garg
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sasha Finkelstein <k@chaosmail.tech>
commit aaaa684bab1f6d9ecfc49db328facb1771fd0eb2 upstream.
This driver is attached to a ~2000x80 screen, which is a lot more than
a single page. This causes out of memory errors in some rare cases.
Reported-by: soopyc <cassie@soopy.moe>
Closes: https://github.com/t2linux/fedora/issues/51
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Aditya Garg <gargaditya08@live.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")
Cc: <stable@vger.kernel.org> # v6.15+
Link: https://patch.msgid.link/20260420-x86-tb-vmalloc-v1-1-7757ff657223@chaosmail.tech
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/tiny/appletbdrm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/tiny/appletbdrm.c
+++ b/drivers/gpu/drm/tiny/appletbdrm.c
@@ -353,7 +353,7 @@ static int appletbdrm_primary_plane_help
frames_size +
sizeof(struct appletbdrm_fb_request_footer), 16);
- appletbdrm_state->request = kzalloc(request_size, GFP_KERNEL);
+ appletbdrm_state->request = kvzalloc(request_size, GFP_KERNEL);
if (!appletbdrm_state->request)
return -ENOMEM;
@@ -543,7 +543,7 @@ static void appletbdrm_primary_plane_des
{
struct appletbdrm_plane_state *appletbdrm_state = to_appletbdrm_plane_state(state);
- kfree(appletbdrm_state->request);
+ kvfree(appletbdrm_state->request);
kfree(appletbdrm_state->response);
__drm_gem_destroy_shadow_plane_state(&appletbdrm_state->base);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 146/201] drm/amdkfd: validate SVM ioctl nattr against buffer size
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (144 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 145/201] drm/appletbdrm: Use kvzalloc for big allocations Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 147/201] drm/amdgpu: Avoid reset in AMDGPU unload path for APUs with GFX V11 and higher Greg Kroah-Hartman
` (60 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Amir Shetaia, Alysa Liu,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alysa Liu <Alysa.Liu@amd.com>
commit 045e0ff208f0838a246c10204105126611b267a1 upstream.
Validate nattr field against the buffer size, preventing
out-of-bounds buffer access via user-controlled attribute count.
Reviewed-by: Amir Shetaia <Amir.Shetaia@amd.com>
Signed-off-by: Alysa Liu <Alysa.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 5eca8bfdfa456c3304ca77523718fe24254c172f)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 26 ++++++++++++++++++++++++--
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 +++
2 files changed, 27 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -25,6 +25,7 @@
#include <linux/err.h>
#include <linux/fs.h>
#include <linux/file.h>
+#include <linux/overflow.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
@@ -1695,6 +1696,16 @@ static int kfd_ioctl_smi_events(struct f
return kfd_smi_event_open(pdd->dev, &args->anon_fd);
}
+static int kfd_ioctl_svm_validate(void *kdata, unsigned int usize)
+{
+ struct kfd_ioctl_svm_args *args = kdata;
+ size_t expected = struct_size(args, attrs, args->nattr);
+
+ if (expected == SIZE_MAX || usize < expected)
+ return -EINVAL;
+ return 0;
+}
+
#if IS_ENABLED(CONFIG_HSA_AMD_SVM)
static int kfd_ioctl_set_xnack_mode(struct file *filep,
@@ -3209,7 +3220,11 @@ static int kfd_ioctl_create_process(stru
#define AMDKFD_IOCTL_DEF(ioctl, _func, _flags) \
[_IOC_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags, \
- .cmd_drv = 0, .name = #ioctl}
+ .validate = NULL, .cmd_drv = 0, .name = #ioctl}
+
+#define AMDKFD_IOCTL_DEF_V(ioctl, _func, _validate, _flags) \
+ [_IOC_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags, \
+ .validate = _validate, .cmd_drv = 0, .name = #ioctl}
/** Ioctl table */
static const struct amdkfd_ioctl_desc amdkfd_ioctls[] = {
@@ -3306,7 +3321,8 @@ static const struct amdkfd_ioctl_desc am
AMDKFD_IOCTL_DEF(AMDKFD_IOC_SMI_EVENTS,
kfd_ioctl_smi_events, 0),
- AMDKFD_IOCTL_DEF(AMDKFD_IOC_SVM, kfd_ioctl_svm, 0),
+ AMDKFD_IOCTL_DEF_V(AMDKFD_IOC_SVM, kfd_ioctl_svm,
+ kfd_ioctl_svm_validate, 0),
AMDKFD_IOCTL_DEF(AMDKFD_IOC_SET_XNACK_MODE,
kfd_ioctl_set_xnack_mode, 0),
@@ -3431,6 +3447,12 @@ static long kfd_ioctl(struct file *filep
memset(kdata, 0, usize);
}
+ if (ioctl->validate) {
+ retcode = ioctl->validate(kdata, usize);
+ if (retcode)
+ goto err_i1;
+ }
+
retcode = func(filep, process, kdata);
if (cmd & IOC_OUT)
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -1047,10 +1047,13 @@ extern struct srcu_struct kfd_processes_
typedef int amdkfd_ioctl_t(struct file *filep, struct kfd_process *p,
void *data);
+typedef int amdkfd_ioctl_validate_t(void *kdata, unsigned int usize);
+
struct amdkfd_ioctl_desc {
unsigned int cmd;
int flags;
amdkfd_ioctl_t *func;
+ amdkfd_ioctl_validate_t *validate;
unsigned int cmd_drv;
const char *name;
};
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 147/201] drm/amdgpu: Avoid reset in AMDGPU unload path for APUs with GFX V11 and higher.
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (145 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 146/201] drm/amdkfd: validate SVM ioctl nattr against buffer size Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 148/201] drm/udl: Increase GET_URB_TIMEOUT Greg Kroah-Hartman
` (59 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alex Deucher,
Shubhankar Milind Sardeshpande
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shubhankar Milind Sardeshpande <Shubhankar.MilindSardeshpande@amd.com>
commit 47776ac1e3f4a2aefcf7fe7c7e4a11151b676222 upstream.
GFX V11 has GC block as default off IP.
Every time AMDGPU driver sends a request to PMFW
to unload MP1, PMFW will put GC in reset and
power down the voltage.Hence, skipping reset
for APUs with GFX V11 or later to avoid reset
related failures.
Fixes: 34355e61835e ("drm/amdgpu: Fix GFX hang on SteamDeck when amdgpu is reloaded")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Shubhankar Milind Sardeshpande <Shubhankar.MilindSardeshpande@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d0a8cadffc818f51d05bc234d8da1af228bc59a3)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3539,8 +3539,12 @@ static int amdgpu_device_ip_fini_early(s
* that checks whether the PSP is running. A solution for those issues
* in the APU is to trigger a GPU reset, but this should be done during
* the unload phase to avoid adding boot latency and screen flicker.
+ * GFX V11 has GC block as default off IP. Every time AMDGPU driver sends
+ * a request to PMFW to unload MP1, PMFW will put GC in reset and power down
+ * the voltage. Hence, skipping reset for APUs with GFX V11 or later.
*/
- if ((adev->flags & AMD_IS_APU) && !adev->gmc.is_app_apu) {
+ if ((adev->flags & AMD_IS_APU) && !adev->gmc.is_app_apu &&
+ amdgpu_ip_version(adev, GC_HWIP, 0) < IP_VERSION(11, 0, 0)) {
r = amdgpu_asic_reset(adev);
if (r)
dev_err(adev->dev, "asic reset on %s failed\n", __func__);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 148/201] drm/udl: Increase GET_URB_TIMEOUT
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (146 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 147/201] drm/amdgpu: Avoid reset in AMDGPU unload path for APUs with GFX V11 and higher Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 149/201] drm/xe: Fix bo leak in xe_dma_buf_init_obj() on allocation failure Greg Kroah-Hartman
` (58 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Shixiong Ou, Thomas Zimmermann
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shixiong Ou <oushixiong@kylinos.cn>
commit ac2c996675755c725a0065dbe3e2ebffded9080b upstream.
[WHY]
A situation has occurred where udl_handle_damage() executed successfully
and the kernel log appears normal, but the display fails to show any output.
This is because the call to udl_get_urb() in udl_crtc_helper_atomic_enable()
failed without generating any error message.
[HOW]
1. Increase timeout of getting urb.
2. Add error messages when calling udl_get_urb() failed in
udl_crtc_helper_atomic_enable().
Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 5320918b9a87 ("drm/udl: initial UDL driver (v4)")
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: <stable@vger.kernel.org> # v3.4+
Link: https://patch.msgid.link/20260424124427.657-1-oushixiong1025@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/udl/udl_main.c | 3 +--
drivers/gpu/drm/udl/udl_modeset.c | 5 ++++-
2 files changed, 5 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -285,13 +285,12 @@ static struct urb *udl_get_urb_locked(st
return unode->urb;
}
-#define GET_URB_TIMEOUT HZ
struct urb *udl_get_urb(struct udl_device *udl)
{
struct urb *urb;
spin_lock_irq(&udl->urbs.lock);
- urb = udl_get_urb_locked(udl, GET_URB_TIMEOUT);
+ urb = udl_get_urb_locked(udl, HZ * 2);
spin_unlock_irq(&udl->urbs.lock);
return urb;
}
--- a/drivers/gpu/drm/udl/udl_modeset.c
+++ b/drivers/gpu/drm/udl/udl_modeset.c
@@ -21,6 +21,7 @@
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_modeset_helper_vtables.h>
+#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
@@ -342,8 +343,10 @@ static void udl_crtc_helper_atomic_enabl
return;
urb = udl_get_urb(udl);
- if (!urb)
+ if (!urb) {
+ drm_err_ratelimited(dev, "get urb failed when enabling crtc\n");
goto out;
+ }
buf = (char *)urb->transfer_buffer;
buf = udl_vidreg_lock(buf);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 149/201] drm/xe: Fix bo leak in xe_dma_buf_init_obj() on allocation failure
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (147 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 148/201] drm/udl: Increase GET_URB_TIMEOUT Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 150/201] drm/xe/bo: Fix bo leak on GGTT flag validation in xe_bo_init_locked() Greg Kroah-Hartman
` (57 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matthew Brost, Shuicheng Lin,
Rodrigo Vivi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuicheng Lin <shuicheng.lin@intel.com>
commit 93a528f67ce5095bcab46a69839eca97f43dd352 upstream.
When drm_gpuvm_resv_object_alloc() fails, the pre-allocated storage bo
is not freed. Add xe_bo_free(storage) before returning the error.
xe_dma_buf_init_obj() calls xe_bo_init_locked(), which frees the bo on
error. Therefore, xe_dma_buf_init_obj() must also free the bo on its own
error paths. Otherwise, since xe_gem_prime_import() cannot distinguish
whether the failure originated from xe_dma_buf_init_obj() or from
xe_bo_init_locked(), it cannot safely decide whether the bo should be
freed.
Add comments documenting the ownership semantics: on success, ownership
of storage is transferred to the returned drm_gem_object; on failure,
storage is freed before returning.
v2: Add comments to explain the free logic.
Fixes: eb289a5f6cc6 ("drm/xe: Convert xe_dma_buf.c for exhaustive eviction")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408175255.3402838-4-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
(cherry picked from commit 78a6c5f899f22338bbf48b44fb8950409c5a69b9)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/xe/xe_dma_buf.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/xe/xe_dma_buf.c
+++ b/drivers/gpu/drm/xe/xe_dma_buf.c
@@ -238,6 +238,13 @@ struct dma_buf *xe_gem_prime_export(stru
return buf;
}
+/*
+ * Takes ownership of @storage: on success it is transferred to the returned
+ * drm_gem_object; on failure it is freed before returning the error.
+ * This matches the contract of xe_bo_init_locked() which frees @storage on
+ * its error paths, so callers need not (and must not) free @storage after
+ * this call.
+ */
static struct drm_gem_object *
xe_dma_buf_init_obj(struct drm_device *dev, struct xe_bo *storage,
struct dma_buf *dma_buf)
@@ -251,8 +258,10 @@ xe_dma_buf_init_obj(struct drm_device *d
int ret = 0;
dummy_obj = drm_gpuvm_resv_object_alloc(&xe->drm);
- if (!dummy_obj)
+ if (!dummy_obj) {
+ xe_bo_free(storage);
return ERR_PTR(-ENOMEM);
+ }
dummy_obj->resv = resv;
xe_validation_guard(&ctx, &xe->val, &exec, (struct xe_val_flags) {}, ret) {
@@ -261,6 +270,7 @@ xe_dma_buf_init_obj(struct drm_device *d
if (ret)
break;
+ /* xe_bo_init_locked() frees storage on error */
bo = xe_bo_init_locked(xe, storage, NULL, resv, NULL, dma_buf->size,
0, /* Will require 1way or 2way for vm_bind */
ttm_bo_type_sg, XE_BO_FLAG_SYSTEM, &exec);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 150/201] drm/xe/bo: Fix bo leak on GGTT flag validation in xe_bo_init_locked()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (148 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 149/201] drm/xe: Fix bo leak in xe_dma_buf_init_obj() on allocation failure Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 151/201] drm/xe: Fix dma-buf attachment leak in xe_gem_prime_import() Greg Kroah-Hartman
` (56 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matthew Brost, Shuicheng Lin,
Rodrigo Vivi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuicheng Lin <shuicheng.lin@intel.com>
commit 1d0adf2fd94fb0c0037c643fadd8f2cf3cffc009 upstream.
When XE_BO_FLAG_GGTT_ALL is set without XE_BO_FLAG_GGTT, the function
returns an error without freeing a caller-provided bo, violating the
documented contract that bo is freed on failure.
Add xe_bo_free(bo) before returning the error.
Fixes: 5a3b0df25d6a ("drm/xe: Allow bo mapping on multiple ggtts")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408175255.3402838-3-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
(cherry picked from commit 3fbd6cf43cac7b60757f3ce3d95195d3843a902c)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/xe/xe_bo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -2154,8 +2154,10 @@ struct xe_bo *xe_bo_init_locked(struct x
}
/* XE_BO_FLAG_GGTTx requires XE_BO_FLAG_GGTT also be set */
- if ((flags & XE_BO_FLAG_GGTT_ALL) && !(flags & XE_BO_FLAG_GGTT))
+ if ((flags & XE_BO_FLAG_GGTT_ALL) && !(flags & XE_BO_FLAG_GGTT)) {
+ xe_bo_free(bo);
return ERR_PTR(-EINVAL);
+ }
if (flags & (XE_BO_FLAG_VRAM_MASK | XE_BO_FLAG_STOLEN) &&
!(flags & XE_BO_FLAG_IGNORE_MIN_PAGE_SIZE) &&
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 151/201] drm/xe: Fix dma-buf attachment leak in xe_gem_prime_import()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (149 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 150/201] drm/xe/bo: Fix bo leak on GGTT flag validation in xe_bo_init_locked() Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 152/201] drm/xe/bo: Fix bo leak on unaligned size validation in xe_bo_init_locked() Greg Kroah-Hartman
` (55 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mattheq Brost, Shuicheng Lin,
Rodrigo Vivi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuicheng Lin <shuicheng.lin@intel.com>
commit 111ab678471bf1f90d078d5513bb086b70596c3c upstream.
When xe_dma_buf_init_obj() fails, the attachment from
dma_buf_dynamic_attach() is not detached. Add dma_buf_detach() before
returning the error. Note: we cannot use goto out_err here because
xe_dma_buf_init_obj() already frees bo on failure, and out_err would
double-free it.
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Mattheq Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408175255.3402838-5-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
(cherry picked from commit a828eb185aac41800df8eae4b60501ccc0dbbe51)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/xe/xe_dma_buf.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/xe/xe_dma_buf.c
+++ b/drivers/gpu/drm/xe/xe_dma_buf.c
@@ -358,12 +358,15 @@ struct drm_gem_object *xe_gem_prime_impo
goto out_err;
}
- /* Errors here will take care of freeing the bo. */
+ /*
+ * xe_dma_buf_init_obj() takes ownership of bo on both success
+ * and failure, so we must not touch bo after this call.
+ */
obj = xe_dma_buf_init_obj(dev, bo, dma_buf);
- if (IS_ERR(obj))
+ if (IS_ERR(obj)) {
+ dma_buf_detach(dma_buf, attach);
return obj;
-
-
+ }
get_dma_buf(dma_buf);
obj->import_attach = attach;
return obj;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 152/201] drm/xe/bo: Fix bo leak on unaligned size validation in xe_bo_init_locked()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (150 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 151/201] drm/xe: Fix dma-buf attachment leak in xe_gem_prime_import() Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 153/201] drm/xe/uapi: Reject coh_none PAT index for CPU cached memory in madvise Greg Kroah-Hartman
` (54 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matthew Brost, Shuicheng Lin,
Rodrigo Vivi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuicheng Lin <shuicheng.lin@intel.com>
commit 09a8f3c1c11977a6e10c167f26dd298790b31c32 upstream.
When type is ttm_bo_type_device and aligned_size != size, the function
returns an error without freeing a caller-provided bo, violating the
documented contract that bo is freed on failure.
Add xe_bo_free(bo) before returning the error.
Fixes: 4e03b584143e ("drm/xe/uapi: Reject bo creation of unaligned size")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408175255.3402838-2-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
(cherry picked from commit 601c2aa087b6f21014300a3f107a08ee4dde7bdf)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/xe/xe_bo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -2176,8 +2176,10 @@ struct xe_bo *xe_bo_init_locked(struct x
alignment = SZ_4K >> PAGE_SHIFT;
}
- if (type == ttm_bo_type_device && aligned_size != size)
+ if (type == ttm_bo_type_device && aligned_size != size) {
+ xe_bo_free(bo);
return ERR_PTR(-EINVAL);
+ }
if (!bo) {
bo = xe_bo_alloc();
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 153/201] drm/xe/uapi: Reject coh_none PAT index for CPU cached memory in madvise
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (151 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 152/201] drm/xe/bo: Fix bo leak on unaligned size validation in xe_bo_init_locked() Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 154/201] drm: Set old handle to NULL before prime swap in change_handle Greg Kroah-Hartman
` (53 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shuicheng Lin, Mathew Alwin,
Michal Mrozek, Matthew Brost, Matthew Auld, Jia Yao,
José Roberto de Souza, Rodrigo Vivi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jia Yao <jia.yao@intel.com>
commit 4e5591c2fc1b30f4ea5e2eab4c3a695acc404e39 upstream.
Add validation in xe_vm_madvise_ioctl() to reject PAT indices with
XE_COH_NONE coherency mode when applied to CPU cached memory.
Using coh_none with CPU cached buffers is a security issue. When the
kernel clears pages before reallocation, the clear operation stays in
CPU cache (dirty). GPU with coh_none can bypass CPU caches and read
stale sensitive data directly from DRAM, potentially leaking data from
previously freed pages of other processes.
This aligns with the existing validation in vm_bind path
(xe_vm_bind_ioctl_validate_bo).
v2(Matthew brost)
- Add fixes
- Move one debug print to better place
v3(Matthew Auld)
- Should be drm/xe/uapi
- More Cc
v4(Shuicheng Lin)
- Fix kmem leak issues by the way
v5
- Remove kmem leak because it has been merged by another patch
v6
- Remove the fix which is not related to current fix
v7
- No change
v8
- Rebase
v9
- Limit the restrictions to iGPU
v10
- No change
Fixes: ada7486c5668 ("drm/xe: Implement madvise ioctl for xe")
Cc: <stable@vger.kernel.org> # v6.18+
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: Mathew Alwin <alwin.mathew@intel.com>
Cc: Michal Mrozek <michal.mrozek@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Jia Yao <jia.yao@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Michal Mrozek <michal.mrozek@intel.com>
Acked-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patch.msgid.link/20260417055917.2027459-2-jia.yao@intel.com
(cherry picked from commit 016ccdb674b8c899940b3944952c96a6a490d10a)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/xe/xe_vm_madvise.c | 47 +++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
--- a/drivers/gpu/drm/xe/xe_vm_madvise.c
+++ b/drivers/gpu/drm/xe/xe_vm_madvise.c
@@ -357,6 +357,45 @@ static void xe_madvise_details_fini(stru
drm_pagemap_put(details->dpagemap);
}
+static bool check_pat_args_are_sane(struct xe_device *xe,
+ struct xe_vmas_in_madvise_range *madvise_range,
+ u16 pat_index)
+{
+ u16 coh_mode = xe_pat_index_get_coh_mode(xe, pat_index);
+ int i;
+
+ /*
+ * Using coh_none with CPU cached buffers is not allowed on iGPU.
+ * On iGPU the GPU shares the LLC with the CPU, so with coh_none
+ * the GPU bypasses CPU caches and reads directly from DRAM,
+ * potentially seeing stale sensitive data from previously freed
+ * pages. On dGPU this restriction does not apply, because the
+ * platform does not provide a non-coherent system memory access
+ * path that would violate the DMA coherency contract.
+ */
+ if (coh_mode != XE_COH_NONE || IS_DGFX(xe))
+ return true;
+
+ for (i = 0; i < madvise_range->num_vmas; i++) {
+ struct xe_vma *vma = madvise_range->vmas[i];
+ struct xe_bo *bo = xe_vma_bo(vma);
+
+ if (bo) {
+ /* BO with WB caching + COH_NONE is not allowed */
+ if (XE_IOCTL_DBG(xe, bo->cpu_caching == DRM_XE_GEM_CPU_CACHING_WB))
+ return false;
+ /* Imported dma-buf without caching info, assume cached */
+ if (XE_IOCTL_DBG(xe, !bo->cpu_caching))
+ return false;
+ } else if (XE_IOCTL_DBG(xe, xe_vma_is_cpu_addr_mirror(vma) ||
+ xe_vma_is_userptr(vma)))
+ /* System memory (userptr/SVM) is always CPU cached */
+ return false;
+ }
+
+ return true;
+}
+
static bool check_bo_args_are_sane(struct xe_vm *vm, struct xe_vma **vmas,
int num_vmas, u32 atomic_val)
{
@@ -454,6 +493,14 @@ int xe_vm_madvise_ioctl(struct drm_devic
if (err || !madvise_range.num_vmas)
goto madv_fini;
+ if (args->type == DRM_XE_MEM_RANGE_ATTR_PAT) {
+ if (!check_pat_args_are_sane(xe, &madvise_range,
+ args->pat_index.val)) {
+ err = -EINVAL;
+ goto free_vmas;
+ }
+ }
+
if (madvise_range.has_bo_vmas) {
if (args->type == DRM_XE_MEM_RANGE_ATTR_ATOMIC) {
if (!check_bo_args_are_sane(vm, madvise_range.vmas,
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 154/201] drm: Set old handle to NULL before prime swap in change_handle
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (152 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 153/201] drm/xe/uapi: Reject coh_none PAT index for CPU cached memory in madvise Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 155/201] drm/radeon: add missing revision check for CI Greg Kroah-Hartman
` (52 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Francis, Puttimet Thammasaeng,
Vitaly Prosyak, Simona Vetter, Christian Koenig, Dave Airlie,
Dave Airlie
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francis, David <David.Francis@amd.com>
commit 5e28b7b94408897e41c63477aabc9e1db439bc8c upstream.
There was a potential race condition in change_handle. The ioctl
briefly had a single object with two idr entries; a concurrent
gem_close could delete the object and remove one of the handles
while leaving the other one dangling, which could subsequently
be dereferenced for a use-after-free.
To fix this, do the same dance that gem_close itself does.
(f6cd7daecff5 drm: Release driver references to handle before making it available again)
First idr_replace the old handle to NULL. Later, if the prime
operations are successful, actually close it.
create_tail required a similar dance to avoid a similar problem.
(bd46cece51a3 drm/gem: Fix race in drm_gem_handle_create_tail())
It idr_allocs the new handle with NULL, then swaps in the correct
object later to avoid races. We don't need to do that here, since
the only operations that could race are drm_prime, and
change_handle holds the prime lock for the entire duration.
v2: cleanups of error paths
Signed-off-by: David Francis <David.Francis@amd.com>
Co-authored-by: Dave Airlie <airlied@gmail.com>
Reported-by: Puttimet Thammasaeng <pwn8official@gmail.com>
Tested-by: Vitaly Prosyak <Vitaly.Prosyak@amd.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: stable@vger.kernel.org
Cc: Christian Koenig <Christian.Koenig@amd.com>
Fixes: 53096728b8910 ("drm: Add DRM prime interface to reassign GEM handle")
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/drm_gem.c | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -1001,7 +1001,7 @@ int drm_gem_change_handle_ioctl(struct d
struct drm_file *file_priv)
{
struct drm_gem_change_handle *args = data;
- struct drm_gem_object *obj;
+ struct drm_gem_object *obj, *idrobj;
int handle, ret;
if (!drm_core_check_feature(dev, DRIVER_GEM))
@@ -1024,8 +1024,29 @@ int drm_gem_change_handle_ioctl(struct d
mutex_lock(&file_priv->prime.lock);
spin_lock(&file_priv->table_lock);
+
+ /* When create_tail allocs an obj idr, it needs to first alloc as NULL,
+ * then later replace with the correct object. This is not necessary
+ * here, because the only operations that could race are drm_prime
+ * bookkeeping, and we hold the prime lock.
+ */
ret = idr_alloc(&file_priv->object_idr, obj, handle, handle + 1,
GFP_NOWAIT);
+
+ if (ret < 0) {
+ spin_unlock(&file_priv->table_lock);
+ goto out_unlock;
+ }
+
+ idrobj = idr_replace(&file_priv->object_idr, NULL, handle);
+ if (idrobj != obj) {
+ idr_replace(&file_priv->object_idr, idrobj, handle);
+ idr_remove(&file_priv->object_idr, args->new_handle);
+ spin_unlock(&file_priv->table_lock);
+ ret = -ENOENT;
+ goto out_unlock;
+ }
+
spin_unlock(&file_priv->table_lock);
if (ret < 0)
@@ -1037,6 +1058,8 @@ int drm_gem_change_handle_ioctl(struct d
if (ret < 0) {
spin_lock(&file_priv->table_lock);
idr_remove(&file_priv->object_idr, handle);
+ idrobj = idr_replace(&file_priv->object_idr, obj, handle);
+ WARN_ON(idrobj != NULL);
spin_unlock(&file_priv->table_lock);
goto out_unlock;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 155/201] drm/radeon: add missing revision check for CI
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (153 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 154/201] drm: Set old handle to NULL before prime swap in change_handle Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 156/201] drm/amdgpu: zero-initialize GART table on allocation Greg Kroah-Hartman
` (51 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Timur Kristóf, Kent Russell,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 17223816498f7b117d138d18eb0eba63604dc74e upstream.
The memory level workarounds only apply to revision 0 SKUs.
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/1816
Fixes: 127e056e2a82 ("drm/radeon: fix mclk vddc configuration for cards for hawaii")
Fixes: 21b8a369046f ("drm/radeon: fix dram timing for certain hawaii boards")
Fixes: 90b2fee35cb9 ("drm/radeon: fix dpm mc init for certain hawaii boards")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 4d8dcc14311515077062b5740f39f427075de5c9)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/ci_dpm.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/radeon/ci_dpm.c
+++ b/drivers/gpu/drm/radeon/ci_dpm.c
@@ -2461,7 +2461,8 @@ static void ci_register_patching_mc_arb(
if (patch &&
((rdev->pdev->device == 0x67B0) ||
- (rdev->pdev->device == 0x67B1))) {
+ (rdev->pdev->device == 0x67B1)) &&
+ (rdev->pdev->revision == 0)) {
if ((memory_clock > 100000) && (memory_clock <= 125000)) {
tmp2 = (((0x31 * engine_clock) / 125000) - 1) & 0xff;
*dram_timimg2 &= ~0x00ff0000;
@@ -3304,7 +3305,8 @@ static int ci_populate_all_memory_levels
pi->smc_state_table.MemoryLevel[0].EnabledForActivity = 1;
if ((dpm_table->mclk_table.count >= 2) &&
- ((rdev->pdev->device == 0x67B0) || (rdev->pdev->device == 0x67B1))) {
+ ((rdev->pdev->device == 0x67B0) || (rdev->pdev->device == 0x67B1)) &&
+ (rdev->pdev->revision == 0)) {
pi->smc_state_table.MemoryLevel[1].MinVddc =
pi->smc_state_table.MemoryLevel[0].MinVddc;
pi->smc_state_table.MemoryLevel[1].MinVddcPhases =
@@ -4493,7 +4495,8 @@ static int ci_register_patching_mc_seq(s
if (patch &&
((rdev->pdev->device == 0x67B0) ||
- (rdev->pdev->device == 0x67B1))) {
+ (rdev->pdev->device == 0x67B1)) &&
+ (rdev->pdev->revision == 0)) {
for (i = 0; i < table->last; i++) {
if (table->last >= SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE)
return -EINVAL;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 156/201] drm/amdgpu: zero-initialize GART table on allocation
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (154 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 155/201] drm/radeon: add missing revision check for CI Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 157/201] drm/exynos: remove bridge when component_add fails Greg Kroah-Hartman
` (50 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Felix Kuehling, Philip Yang,
Christian König, Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Philip Yang <Philip.Yang@amd.com>
commit e6c2e6c2e1fa066968a16aca1cb66cd1bdde7741 upstream.
GART TLB is flushed after unmapping but not after mapping. Since
amdgpu_bo_create_kernel() does not zero-initialize the buffer, when a
single PTE is written the TLB may speculatively load other uninitialized
entries from the same cacheline. Those garbage entries can appear valid,
and a subsequent write to another PTE in the same cacheline may cause the
GPU to use a stale garbage PTE from the TLB.
Fix this by calling memset_io() to zero-initialize the GART table with
gart_pte_flags immediately after allocation.
Using AMDGPU_GEM_CREATE_VRAM_CLEARED, SDMA-based clear will not work
since SDMA needs GART to be initialized to work.
Suggested-by: Felix Kuehling <felix.kuehling@amd.com>
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 d9af8263b82b6eaa60c5718e0c6631c5037e4b24)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
@@ -262,12 +262,19 @@ void amdgpu_gart_table_ram_free(struct a
*/
int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev)
{
+ int r;
+
if (adev->gart.bo != NULL)
return 0;
- return amdgpu_bo_create_kernel(adev, adev->gart.table_size, PAGE_SIZE,
- AMDGPU_GEM_DOMAIN_VRAM, &adev->gart.bo,
- NULL, (void *)&adev->gart.ptr);
+ r = amdgpu_bo_create_kernel(adev, adev->gart.table_size, PAGE_SIZE,
+ AMDGPU_GEM_DOMAIN_VRAM, &adev->gart.bo,
+ NULL, (void *)&adev->gart.ptr);
+ if (r)
+ return r;
+
+ memset_io(adev->gart.ptr, adev->gart.gart_pte_flags, adev->gart.table_size);
+ return 0;
}
/**
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 157/201] drm/exynos: remove bridge when component_add fails
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (155 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 156/201] drm/amdgpu: zero-initialize GART table on allocation Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 158/201] drm/amdgpu/userq: fix access to stale wptr mapping Greg Kroah-Hartman
` (49 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Osama Abdelkader,
Raphaël Gallais-Pou, Luca Ceresoli
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Osama Abdelkader <osama.abdelkader@gmail.com>
commit 26f6654a9a60eb4d241f42a0ec85412e8821480b upstream.
Use devm_drm_bridge_add() so the bridge is released if probe fails after
registration, and drop the manual drm_bridge_remove() in remove().
Check the return value of devm_drm_bridge_add().
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Fixes: 576d72fbfb45 ("drm/exynos: mic: add a bridge at probe")
Cc: stable@vger.kernel.org
Reviewed-by: Raphaël Gallais-Pou <rgallaispou@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patch.msgid.link/20260423200622.325076-2-osama.abdelkader@gmail.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/exynos/exynos_drm_mic.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -423,7 +423,9 @@ static int exynos_mic_probe(struct platf
mic->bridge.of_node = dev->of_node;
- drm_bridge_add(&mic->bridge);
+ ret = devm_drm_bridge_add(dev, &mic->bridge);
+ if (ret)
+ goto err;
pm_runtime_enable(dev);
@@ -443,12 +445,8 @@ err:
static void exynos_mic_remove(struct platform_device *pdev)
{
- struct exynos_mic *mic = platform_get_drvdata(pdev);
-
component_del(&pdev->dev, &exynos_mic_component_ops);
pm_runtime_disable(&pdev->dev);
-
- drm_bridge_remove(&mic->bridge);
}
static const struct of_device_id exynos_mic_of_match[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 158/201] drm/amdgpu/userq: fix access to stale wptr mapping
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (156 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 157/201] drm/exynos: remove bridge when component_add fails Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 159/201] drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds Greg Kroah-Hartman
` (48 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sunil Khatri, Christian König,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sunil Khatri <sunil.khatri@amd.com>
commit 6da7b1242da4455b11c24ce667d1cab1a348c8ea upstream.
Use drm_exec to take both locks i.e vm root bo and
wptr_obj bo to access the mapping data properly.
This fixes the security issue of unmap the wptr_obj while
a queue creation is in progress and passing other
bo at same address.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1fc6c8ab45dbee096469c08c13f6099d57a52d6c)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 95 +++++++++++------------------
1 file changed, 37 insertions(+), 58 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
@@ -31,89 +31,68 @@
#define AMDGPU_USERQ_GANG_CTX_SZ PAGE_SIZE
static int
-mes_userq_map_gtt_bo_to_gart(struct amdgpu_bo *bo)
-{
- int ret;
-
- ret = amdgpu_bo_reserve(bo, true);
- if (ret) {
- DRM_ERROR("Failed to reserve bo. ret %d\n", ret);
- goto err_reserve_bo_failed;
- }
-
- ret = amdgpu_ttm_alloc_gart(&bo->tbo);
- if (ret) {
- DRM_ERROR("Failed to bind bo to GART. ret %d\n", ret);
- goto err_map_bo_gart_failed;
- }
-
- amdgpu_bo_unreserve(bo);
- bo = amdgpu_bo_ref(bo);
-
- return 0;
-
-err_map_bo_gart_failed:
- amdgpu_bo_unreserve(bo);
-err_reserve_bo_failed:
- return ret;
-}
-
-static int
mes_userq_create_wptr_mapping(struct amdgpu_device *adev,
struct amdgpu_userq_mgr *uq_mgr,
struct amdgpu_usermode_queue *queue,
uint64_t wptr)
{
struct amdgpu_bo_va_mapping *wptr_mapping;
- struct amdgpu_vm *wptr_vm;
struct amdgpu_userq_obj *wptr_obj = &queue->wptr_obj;
+ struct amdgpu_bo *obj;
+ struct amdgpu_vm *vm = queue->vm;
+ struct drm_exec exec;
int ret;
- wptr_vm = queue->vm;
- ret = amdgpu_bo_reserve(wptr_vm->root.bo, false);
- if (ret)
- return ret;
-
wptr &= AMDGPU_GMC_HOLE_MASK;
- wptr_mapping = amdgpu_vm_bo_lookup_mapping(wptr_vm, wptr >> PAGE_SHIFT);
- amdgpu_bo_unreserve(wptr_vm->root.bo);
- if (!wptr_mapping) {
- DRM_ERROR("Failed to lookup wptr bo\n");
- return -EINVAL;
- }
- wptr_obj->obj = wptr_mapping->bo_va->base.bo;
- if (wptr_obj->obj->tbo.base.size > PAGE_SIZE) {
- DRM_ERROR("Requested GART mapping for wptr bo larger than one page\n");
- return -EINVAL;
+ drm_exec_init(&exec, DRM_EXEC_IGNORE_DUPLICATES, 2);
+ drm_exec_until_all_locked(&exec) {
+ ret = amdgpu_vm_lock_pd(vm, &exec, 1);
+ drm_exec_retry_on_contention(&exec);
+ if (unlikely(ret))
+ goto fail_lock;
+
+ wptr_mapping = amdgpu_vm_bo_lookup_mapping(vm, wptr >> PAGE_SHIFT);
+ if (!wptr_mapping) {
+ ret = -EINVAL;
+ goto fail_lock;
+ }
+
+ obj = wptr_mapping->bo_va->base.bo;
+ ret = drm_exec_lock_obj(&exec, &obj->tbo.base);
+ drm_exec_retry_on_contention(&exec);
+ if (unlikely(ret))
+ goto fail_lock;
}
- ret = mes_userq_map_gtt_bo_to_gart(wptr_obj->obj);
- if (ret) {
- DRM_ERROR("Failed to map wptr bo to GART\n");
- return ret;
+ wptr_obj->obj = amdgpu_bo_ref(wptr_mapping->bo_va->base.bo);
+ if (wptr_obj->obj->tbo.base.size > PAGE_SIZE) {
+ ret = -EINVAL;
+ goto fail_map;
}
- ret = amdgpu_bo_reserve(wptr_obj->obj, true);
+ /* TODO use eviction fence instead of pinning. */
+ ret = amdgpu_bo_pin(wptr_obj->obj, AMDGPU_GEM_DOMAIN_GTT);
if (ret) {
- DRM_ERROR("Failed to reserve wptr bo\n");
- return ret;
+ DRM_ERROR("Failed to pin wptr bo. ret %d\n", ret);
+ goto fail_map;
}
- /* TODO use eviction fence instead of pinning. */
- ret = amdgpu_bo_pin(wptr_obj->obj, AMDGPU_GEM_DOMAIN_GTT);
+ ret = amdgpu_ttm_alloc_gart(&wptr_obj->obj->tbo);
if (ret) {
- drm_file_err(uq_mgr->file, "[Usermode queues] Failed to pin wptr bo\n");
- goto unresv_bo;
+ DRM_ERROR("Failed to bind bo to GART. ret %d\n", ret);
+ goto fail_map;
}
queue->wptr_obj.gpu_addr = amdgpu_bo_gpu_offset(wptr_obj->obj);
- amdgpu_bo_unreserve(wptr_obj->obj);
+ drm_exec_fini(&exec);
return 0;
-unresv_bo:
- amdgpu_bo_unreserve(wptr_obj->obj);
+fail_map:
+ amdgpu_bo_unref(&wptr_obj->obj);
+fail_lock:
+ drm_exec_fini(&exec);
return ret;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 159/201] drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (157 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 158/201] drm/amdgpu/userq: fix access to stale wptr mapping Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 160/201] drm/amdgpu/gfx9: drop unnecessary 64-bit fence flag check in KIQ Greg Kroah-Hartman
` (47 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Icenowy Zheng, Neil Armstrong,
Douglas Anderson
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Icenowy Zheng <zhengxingda@iscas.ac.cn>
commit 2d4e80271f784aa0c7b17676e9762c7e8156be1c upstream.
When preparing the panel, it seems that it always expects commands to be
transferred in LP mode. However, the disable function removes the
MIPI_DSI_MODE_LPM flag, and no other function re-adds it.
As the unprepare function contains no DSI commands, re-adding the flag
just after disabling the panel should be safe. Add the code re-adding
the flag after the two commands for disabling the panel are sent.
This fixes screen unblanking (after blanking once) on
mt8188-geralt-ciri-sku1 device.
Cc: stable@vger.kernel.org # 6.11+
Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260425165751.1716569-1-zhengxingda@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/panel/panel-himax-hx83102.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/gpu/drm/panel/panel-himax-hx83102.c
+++ b/drivers/gpu/drm/panel/panel-himax-hx83102.c
@@ -850,6 +850,8 @@ static int hx83102_disable(struct drm_pa
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
+ dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
mipi_dsi_msleep(&dsi_ctx, 150);
return dsi_ctx.accum_err;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 160/201] drm/amdgpu/gfx9: drop unnecessary 64-bit fence flag check in KIQ
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (158 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 159/201] drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 161/201] drm/bridge: tda998x: Use __be32 for audio port OF property pointer Greg Kroah-Hartman
` (46 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christian König, John B. Moore,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: John B. Moore <jbmoore61@gmail.com>
commit 7bbfb2559bcec39d1a4e1182d931a2046112c352 upstream.
Remove the BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT) assertion from
gfx_v9_0_ring_emit_fence_kiq(). The KIQ hardware supports 64-bit
fence writes; the 32-bit writeback address constraint is an
upper-layer convention, not a hardware limitation. The check serves
no purpose and should not be present.
Found by code inspection while investigating related BUG_ON
assertions in the GFX and compute ring emission paths.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: John B. Moore <jbmoore61@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1b1101a46a426bb4328116bb5273c326a2780389)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ---
1 file changed, 3 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -5660,9 +5660,6 @@ static void gfx_v9_0_ring_emit_fence_kiq
{
struct amdgpu_device *adev = ring->adev;
- /* we only allocate 32bit for each seq wb address */
- BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
-
/* write fence seq to the "addr" */
amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 161/201] drm/bridge: tda998x: Use __be32 for audio port OF property pointer
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (159 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 160/201] drm/amdgpu/gfx9: drop unnecessary 64-bit fence flag check in KIQ Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 162/201] drm/sti: remove bridge when sti_hda component_add fails Greg Kroah-Hartman
` (45 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kory Maincent (TI),
Russell King (Oracle), Luca Ceresoli
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kory Maincent (TI) <kory.maincent@bootlin.com>
commit 2a46a9356ba7b1bdd741c8b41e5374edcd960557 upstream.
of_get_property() returns a pointer to big-endian (__be32) data, but
port_data in tda998x_get_audio_ports() was declared as const u32 *,
causing a sparse endianness type mismatch warning. Fix the declaration
to use const __be32 *.
Fixes: 7e567624dc5a4 ("drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding")
Cc: stable@vger.kernel.org
Signed-off-by: Kory Maincent (TI) <kory.maincent@bootlin.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20260428090457.121894-1-kory.maincent@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/bridge/tda998x_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/bridge/tda998x_drv.c
+++ b/drivers/gpu/drm/bridge/tda998x_drv.c
@@ -1697,7 +1697,7 @@ static const struct drm_bridge_funcs tda
static int tda998x_get_audio_ports(struct tda998x_priv *priv,
struct device_node *np)
{
- const u32 *port_data;
+ const __be32 *port_data;
u32 size;
int i;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 162/201] drm/sti: remove bridge when sti_hda component_add fails
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (160 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 161/201] drm/bridge: tda998x: Use __be32 for audio port OF property pointer Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 163/201] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds Greg Kroah-Hartman
` (44 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Osama Abdelkader, Luca Ceresoli,
Raphaël Gallais-Pou, Raphael Gallais-Pou
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Osama Abdelkader <osama.abdelkader@gmail.com>
commit 84ae1840260fece9b6b70d3872b79384bbe5a90b upstream.
Use devm_drm_bridge_add() so the bridge is released if probe fails after
registration, and drop the manual drm_bridge_remove() in remove().
Check the return value of devm_drm_bridge_add().
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Fixes: d28726efc637 ("drm/sti: hda: add bridge before attaching")
Cc: stable@vger.kernel.org
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Raphaël Gallais-Pou <rgallaispou@gmail.com>
Link: https://patch.msgid.link/20260423200622.325076-1-osama.abdelkader@gmail.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/sti/sti_hda.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
index b7397827889c..360a88ca8f0c 100644
--- a/drivers/gpu/drm/sti/sti_hda.c
+++ b/drivers/gpu/drm/sti/sti_hda.c
@@ -741,6 +741,7 @@ static int sti_hda_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct sti_hda *hda;
struct resource *res;
+ int ret;
DRM_INFO("%s\n", __func__);
@@ -779,7 +780,9 @@ static int sti_hda_probe(struct platform_device *pdev)
return PTR_ERR(hda->clk_hddac);
}
- drm_bridge_add(&hda->bridge);
+ ret = devm_drm_bridge_add(dev, &hda->bridge);
+ if (ret)
+ return ret;
platform_set_drvdata(pdev, hda);
@@ -788,10 +791,7 @@ static int sti_hda_probe(struct platform_device *pdev)
static void sti_hda_remove(struct platform_device *pdev)
{
- struct sti_hda *hda = platform_get_drvdata(pdev);
-
component_del(&pdev->dev, &sti_hda_ops);
- drm_bridge_remove(&hda->bridge);
}
static const struct of_device_id hda_of_match[] = {
--
2.54.0
^ permalink raw reply related [flat|nested] 209+ messages in thread
* [PATCH 7.0 163/201] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (161 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 162/201] drm/sti: remove bridge when sti_hda component_add fails Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 164/201] drm/amdkfd: Make all TLB-flushes heavy-weight Greg Kroah-Hartman
` (43 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Icenowy Zheng, Neil Armstrong,
Douglas Anderson
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Icenowy Zheng <zhengxingda@iscas.ac.cn>
commit 570cf799e87ae805eacfab3b4ba66676b5fccdb6 upstream.
When preparing the panel, it seems that it always expects commands to be
transferred in LP mode. However, the disable function removes the
MIPI_DSI_MODE_LPM flag, and no other function re-adds it.
As the unprepare function contains no DSI commands, re-adding the flag
just after disabling the panel should be safe. Add the code re-adding
the flag after the two commands for disabling the panel are sent.
This fixes error messages shown in kernel log when unblanking on
mt8183-kukui-kodama-sku32 device.
Cc: stable@vger.kernel.org
Fixes: a869b9db7adf ("drm/panel: support for boe tv101wum-nl6 wuxga dsi video mode panel")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260503091708.1079962-1-zhengxingda@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -1324,6 +1324,8 @@ static int boe_panel_disable(struct drm_
mipi_dsi_dcs_set_display_off_multi(&ctx);
mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
+ boe->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
mipi_dsi_msleep(&ctx, 150);
return ctx.accum_err;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 164/201] drm/amdkfd: Make all TLB-flushes heavy-weight
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (162 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 163/201] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 165/201] drm/amdgpu/sdma4: replace BUG_ON with WARN_ON in fence emission Greg Kroah-Hartman
` (42 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Felix Kuehling, Philip Yang,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Kuehling <felix.kuehling@amd.com>
commit 9b4e3495d1bd2469bf94b74930c153c2d534ddb7 upstream.
With only one sequence number we cannot track the need for legacy vs
heavy-weight flushes reliably. Always use heavy-weight.
Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Philip Yang <philip.yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c1a3ff1d327820cd9a52bc1056b98681fc088949)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++--
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +++---
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 +++---
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -1360,7 +1360,7 @@ static int kfd_ioctl_map_memory_to_gpu(s
peer_pdd = kfd_process_device_data_by_id(p, devices_arr[i]);
if (WARN_ON_ONCE(!peer_pdd))
continue;
- kfd_flush_tlb(peer_pdd, TLB_FLUSH_LEGACY);
+ kfd_flush_tlb(peer_pdd);
}
kfree(devices_arr);
@@ -1455,7 +1455,7 @@ static int kfd_ioctl_unmap_memory_from_g
if (WARN_ON_ONCE(!peer_pdd))
continue;
if (flush_tlb)
- kfd_flush_tlb(peer_pdd, TLB_FLUSH_HEAVYWEIGHT);
+ kfd_flush_tlb(peer_pdd);
/* Remove dma mapping after tlb flush to avoid IO_PAGE_FAULT */
err = amdgpu_amdkfd_gpuvm_dmaunmap_mem(mem, peer_pdd->drm_priv);
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -572,7 +572,7 @@ static int allocate_vmid(struct device_q
qpd->vmid,
qpd->page_table_base);
/* invalidate the VM context after pasid and vmid mapping is set up */
- kfd_flush_tlb(qpd_to_pdd(qpd), TLB_FLUSH_LEGACY);
+ kfd_flush_tlb(qpd_to_pdd(qpd));
if (dqm->dev->kfd2kgd->set_scratch_backing_va)
dqm->dev->kfd2kgd->set_scratch_backing_va(dqm->dev->adev,
@@ -610,7 +610,7 @@ static void deallocate_vmid(struct devic
if (flush_texture_cache_nocpsch(q->device, qpd))
dev_err(dev, "Failed to flush TC\n");
- kfd_flush_tlb(qpd_to_pdd(qpd), TLB_FLUSH_LEGACY);
+ kfd_flush_tlb(qpd_to_pdd(qpd));
/* Release the vmid mapping */
set_pasid_vmid_mapping(dqm, 0, qpd->vmid);
@@ -1284,7 +1284,7 @@ static int restore_process_queues_nocpsc
dqm->dev->adev,
qpd->vmid,
qpd->page_table_base);
- kfd_flush_tlb(pdd, TLB_FLUSH_LEGACY);
+ kfd_flush_tlb(pdd);
}
/* Take a safe reference to the mm_struct, which may otherwise
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -1554,13 +1554,13 @@ void kfd_signal_reset_event(struct kfd_n
void kfd_signal_poison_consumed_event(struct kfd_node *dev, u32 pasid);
void kfd_signal_process_terminate_event(struct kfd_process *p);
-static inline void kfd_flush_tlb(struct kfd_process_device *pdd,
- enum TLB_FLUSH_TYPE type)
+static inline void kfd_flush_tlb(struct kfd_process_device *pdd)
{
struct amdgpu_device *adev = pdd->dev->adev;
struct amdgpu_vm *vm = drm_priv_to_vm(pdd->drm_priv);
- amdgpu_vm_flush_compute_tlb(adev, vm, type, pdd->dev->xcc_mask);
+ amdgpu_vm_flush_compute_tlb(adev, vm, TLB_FLUSH_HEAVYWEIGHT,
+ pdd->dev->xcc_mask);
}
static inline bool kfd_flush_tlb_after_unmap(struct kfd_dev *dev)
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -1415,7 +1415,7 @@ svm_range_unmap_from_gpus(struct svm_ran
if (r)
break;
}
- kfd_flush_tlb(pdd, TLB_FLUSH_HEAVYWEIGHT);
+ kfd_flush_tlb(pdd);
}
return r;
@@ -1557,7 +1557,7 @@ svm_range_map_to_gpus(struct svm_range *
}
}
- kfd_flush_tlb(pdd, TLB_FLUSH_LEGACY);
+ kfd_flush_tlb(pdd);
}
return r;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 165/201] drm/amdgpu/sdma4: replace BUG_ON with WARN_ON in fence emission
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (163 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 164/201] drm/amdkfd: Make all TLB-flushes heavy-weight Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 166/201] drm/amdgpu/pm: add missing revision check for CI Greg Kroah-Hartman
` (41 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christian König, John B. Moore,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: John B. Moore <jbmoore61@gmail.com>
commit 78d2e624fa073c14970aa097adcf3ea31c157a66 upstream.
sdma_v4_0_ring_emit_fence() contains two BUG_ON(addr & 0x3) assertions
that verify fence writeback addresses are dword-aligned. These
assertions can be reached from unprivileged userspace via crafted
DRM_IOCTL_AMDGPU_CS submissions, causing a fatal kernel panic in a
scheduler worker thread.
Replace both BUG_ON() calls with WARN_ON() to log the condition without
crashing the kernel. A misaligned fence address at this point indicates
a driver bug, but crashing the kernel is never the correct response when
the assertion is reachable from userspace.
The CS IOCTL path is the correct place to filter invalid submissions;
the ring emission callback is too late to do anything about it.
Fixes: 2130f89ced2c ("drm/amdgpu: add SDMA v4.0 implementation (v2)")
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: John B. Moore <jbmoore61@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit b90250bd933afd1ba94d86d6b13821997b22b18e)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -890,7 +890,7 @@ static void sdma_v4_0_ring_emit_fence(st
/* write the fence */
amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_FENCE));
/* zero in first two bits */
- BUG_ON(addr & 0x3);
+ WARN_ON(addr & 0x3);
amdgpu_ring_write(ring, lower_32_bits(addr));
amdgpu_ring_write(ring, upper_32_bits(addr));
amdgpu_ring_write(ring, lower_32_bits(seq));
@@ -900,7 +900,7 @@ static void sdma_v4_0_ring_emit_fence(st
addr += 4;
amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_FENCE));
/* zero in first two bits */
- BUG_ON(addr & 0x3);
+ WARN_ON(addr & 0x3);
amdgpu_ring_write(ring, lower_32_bits(addr));
amdgpu_ring_write(ring, upper_32_bits(addr));
amdgpu_ring_write(ring, upper_32_bits(seq));
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 166/201] drm/amdgpu/pm: add missing revision check for CI
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (164 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 165/201] drm/amdgpu/sdma4: replace BUG_ON with WARN_ON in fence emission Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 167/201] drm/amdgpu/pm: align Hawaii mclk workaround with radeon Greg Kroah-Hartman
` (40 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Timur Kristóf, Kent Russell,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 2a561b361b7681509710f3cfc3d95d54c87ac69f upstream.
The ci_populate_all_memory_levels() workaround only
applies to revision 0 SKUs.
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/1816
Fixes: 9f4b35411cfe ("drm/amd/powerplay: add CI asics support to smumgr (v3)")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1db15ba8f72f400bbad8ae0ce24fafc43429d4bd)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
@@ -1326,8 +1326,9 @@ static int ci_populate_all_memory_levels
dev_id = adev->pdev->device;
- if ((dpm_table->mclk_table.count >= 2)
- && ((dev_id == 0x67B0) || (dev_id == 0x67B1))) {
+ if ((dpm_table->mclk_table.count >= 2) &&
+ ((dev_id == 0x67B0) || (dev_id == 0x67B1)) &&
+ (adev->pdev->revision == 0)) {
smu_data->smc_state_table.MemoryLevel[1].MinVddci =
smu_data->smc_state_table.MemoryLevel[0].MinVddci;
smu_data->smc_state_table.MemoryLevel[1].MinMvdd =
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 167/201] drm/amdgpu/pm: align Hawaii mclk workaround with radeon
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (165 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 166/201] drm/amdgpu/pm: add missing revision check for CI Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 168/201] arm64: dts: qcom: kodiak: Fix PCIe1 PHY ref clock voting Greg Kroah-Hartman
` (39 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Timur Kristóf, Kent Russell,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 1987c79b4fe5789dfa14423e78b5c25f6acf3e9d upstream.
Align the hawaii mclk workaround with radeon and windows.
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/1816
Fixes: 9f4b35411cfe ("drm/amd/powerplay: add CI asics support to smumgr (v3)")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 9649528b637f668c5af9f2b83ca4ad8576ae2121)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
@@ -1329,10 +1329,10 @@ static int ci_populate_all_memory_levels
if ((dpm_table->mclk_table.count >= 2) &&
((dev_id == 0x67B0) || (dev_id == 0x67B1)) &&
(adev->pdev->revision == 0)) {
- smu_data->smc_state_table.MemoryLevel[1].MinVddci =
- smu_data->smc_state_table.MemoryLevel[0].MinVddci;
- smu_data->smc_state_table.MemoryLevel[1].MinMvdd =
- smu_data->smc_state_table.MemoryLevel[0].MinMvdd;
+ smu_data->smc_state_table.MemoryLevel[1].MinVddc =
+ smu_data->smc_state_table.MemoryLevel[0].MinVddc;
+ smu_data->smc_state_table.MemoryLevel[1].MinVddcPhases =
+ smu_data->smc_state_table.MemoryLevel[0].MinVddcPhases;
}
smu_data->smc_state_table.MemoryLevel[0].ActivityLevel = 0x1F;
CONVERT_FROM_HOST_TO_SMC_US(smu_data->smc_state_table.MemoryLevel[0].ActivityLevel);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 168/201] arm64: dts: qcom: kodiak: Fix PCIe1 PHY ref clock voting
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (166 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 167/201] drm/amdgpu/pm: align Hawaii mclk workaround with radeon Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 169/201] arm64: dts: qcom: lemans: Correct QUP interrupt numbers Greg Kroah-Hartman
` (38 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Krishna Chaitanya Chundru,
Dmitry Baryshkov, Konrad Dybcio, Bjorn Andersson
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
commit 30e8b6d42e8988eaaf0c2efd8c3797cb3884faea upstream.
GCC_PCIE_CLKREF_EN controls a repeater that provides the reference clock
only to the PCIe0 PHY. PCIe1 PHY receives its refclk directly from the CXO
source.
If the PCIe1 driver in HLOS votes for or against GCC_PCIE_CLKREF_EN, it
will inadvertently modify the refclk to PCIe0 as well. Since PCIe0 is
managed by WPSS while PCIe1 is managed in HLOS, there is no mechanism to
coordinate these votes. As a result, HLOS may disable this repeater
during suspend and cut off the PCIe0 PHY refclk while PCIe0 is still
active.
Replace the unused GCC_PCIE_CLKREF_EN clock entry with RPMH_CXO_CLK to
reflect the actual hardware wiring and prevent unintended changes to
PCIe0 clocking.
Fixes: 92e0ee9f83b3 ("arm64: dts: qcom: sc7280: Add PCIe and PHY related nodes")
Cc: stable@vger.kernel.org
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260123-fix_pcie1_phy_clk-v1-1-38f82ea01792@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/boot/dts/qcom/kodiak.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm64/boot/dts/qcom/kodiak.dtsi
+++ b/arch/arm64/boot/dts/qcom/kodiak.dtsi
@@ -2445,7 +2445,7 @@
reg = <0 0x01c0e000 0 0x1000>;
clocks = <&gcc GCC_PCIE_1_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
- <&gcc GCC_PCIE_CLKREF_EN>,
+ <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_PCIE1_PHY_RCHNG_CLK>,
<&gcc GCC_PCIE_1_PIPE_CLK>;
clock-names = "aux",
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 169/201] arm64: dts: qcom: lemans: Correct QUP interrupt numbers
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (167 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 168/201] arm64: dts: qcom: kodiak: Fix PCIe1 PHY ref clock voting Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 170/201] arm64: dts: ti: k3-am62a7-sk: Fix pin name in comment from M19 to N22 Greg Kroah-Hartman
` (37 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Viken Dadhaniya, Dmitry Baryshkov,
Bjorn Andersson
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
commit c5b22c88cc09b180e3a23010b29f4d02ec117a44 upstream.
Fix GIC_SPI interrupt numbers for QUPv3 SE6 nodes on Lemans SoC.
Using incorrect interrupt lines can prevent IRQs from triggering
and break I2C, SPI, and UART operation.
Fixes: 34a407316b7d3 ("arm64: dts: qcom: sa8775p: Populate additional UART DT nodes")
Fixes: 1b2d7ad5ac14d ("arm64: dts: qcom: sa8775p: add missing spi nodes")
Fixes: ee2f5f906d69d ("arm64: dts: qcom: sa8775p: add missing i2c nodes")
Cc: stable@vger.kernel.org
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260325-lemans-irq-num-v1-1-a470d544966a@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/boot/dts/qcom/lemans.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/arch/arm64/boot/dts/qcom/lemans.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
@@ -1512,7 +1512,7 @@
reg = <0x0 0x898000 0x0 0x4000>;
#address-cells = <1>;
#size-cells = <0>;
- interrupts = <GIC_SPI 834 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 833 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_QUPV3_WRAP2_S6_CLK>;
clock-names = "se";
pinctrl-0 = <&qup_i2c20_default>;
@@ -1539,7 +1539,7 @@
reg = <0x0 0x898000 0x0 0x4000>;
#address-cells = <1>;
#size-cells = <0>;
- interrupts = <GIC_SPI 834 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 833 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_QUPV3_WRAP2_S6_CLK>;
clock-names = "se";
pinctrl-0 = <&qup_spi20_default>;
@@ -1564,7 +1564,7 @@
uart20: serial@898000 {
compatible = "qcom,geni-uart";
reg = <0x0 0x00898000 0x0 0x4000>;
- interrupts = <GIC_SPI 834 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 833 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_QUPV3_WRAP2_S6_CLK>;
clock-names = "se";
pinctrl-0 = <&qup_uart20_default>;
@@ -2510,7 +2510,7 @@
reg = <0x0 0xa98000 0x0 0x4000>;
#address-cells = <1>;
#size-cells = <0>;
- interrupts = <GIC_SPI 836 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 835 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_QUPV3_WRAP1_S6_CLK>;
clock-names = "se";
pinctrl-0 = <&qup_i2c13_default>;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 170/201] arm64: dts: ti: k3-am62a7-sk: Fix pin name in comment from M19 to N22
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (168 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 169/201] arm64: dts: qcom: lemans: Correct QUP interrupt numbers Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 171/201] arm64: dts: ti: k3-am69-aquila-dev: Fix DP regulator enable GPIO Greg Kroah-Hartman
` (36 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Siddharth Vadapalli, Andrew Davis,
Bryan Brattlof, Vignesh Raghavendra
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Siddharth Vadapalli <s-vadapalli@ti.com>
commit 6ee0792d83d5c690205c350825a4c30746c0e0a2 upstream.
The pin for GPMC0_CLK.GPIO0_31 at address 0x000F407C is N22 and not M19.
Hence, fix the pin name in the comment to avoid confusion.
Fixes: 8f023012eb4a ("arm64: dts: ti: k3-am62a: Enable UHS mode support for SD cards")
Cc: stable@vger.kernel.org
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Link: https://patch.msgid.link/20260309045539.2070793-1-s-vadapalli@ti.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -398,7 +398,7 @@
vddshv_sdio_pins_default: vddshv-sdio-default-pins {
pinctrl-single,pins = <
- AM62AX_IOPAD(0x07c, PIN_OUTPUT, 7) /* (M19) GPMC0_CLK.GPIO0_31 */
+ AM62AX_IOPAD(0x07c, PIN_OUTPUT, 7) /* (N22) GPMC0_CLK.GPIO0_31 */
>;
};
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 171/201] arm64: dts: ti: k3-am69-aquila-dev: Fix DP regulator enable GPIO
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (169 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 170/201] arm64: dts: ti: k3-am62a7-sk: Fix pin name in comment from M19 to N22 Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 172/201] sctp: revalidate list cursor after sctp_sendmsg_to_asoc() in SCTP_SENDALL Greg Kroah-Hartman
` (35 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Franz Schnyder, Francesco Dolcini,
Vignesh Raghavendra
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Franz Schnyder <franz.schnyder@toradex.com>
commit 222191225e69711089ecade3b98d79757d51e907 upstream.
Correct the DP regulator enable GPIO to index 21.
The 3.3V DP regulator was not being enabled by the assigned GPIO, as it
is routed to GPIO index 21 and not 37, which was causing instability
with displays connected over DP or via an active DP-to-HDMI adapter.
Fixes: 39ac6623b1d8 ("arm64: dts: ti: Add Aquila AM69 Support")
Cc: stable@vger.kernel.org
Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20260202083604.325060-2-fra.schnyder@gmail.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts b/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts
index f48601ae38b7..d3677c2c2547 100644
--- a/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts
+++ b/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts
@@ -33,7 +33,7 @@ reg_3v3_dp: regulator-3v3-dp {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_21_dp>;
/* Aquila GPIO_21_DP (AQUILA B57) */
- gpio = <&main_gpio0 37 GPIO_ACTIVE_HIGH>;
+ gpio = <&main_gpio0 21 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-max-microvolt = <3300000>;
regulator-min-microvolt = <3300000>;
--
2.54.0
^ permalink raw reply related [flat|nested] 209+ messages in thread
* [PATCH 7.0 172/201] sctp: revalidate list cursor after sctp_sendmsg_to_asoc() in SCTP_SENDALL
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (170 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 171/201] arm64: dts: ti: k3-am69-aquila-dev: Fix DP regulator enable GPIO Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 173/201] batman-adv: fix integer overflow on buff_pos Greg Kroah-Hartman
` (34 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ben Morris, Xin Long, Jakub Kicinski
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Morris <bmorris@anthropic.com>
commit abb5f36771cc4c05899b34000829a787572a8817 upstream.
The SCTP_SENDALL path in sctp_sendmsg() iterates ep->asocs with
list_for_each_entry_safe(), which caches the next entry in @tmp before
the loop body runs. The body calls sctp_sendmsg_to_asoc(), which may
drop the socket lock inside sctp_wait_for_sndbuf().
While the lock is dropped, another thread can SCTP_SOCKOPT_PEELOFF the
association cached in @tmp, migrating it to a new endpoint via
sctp_sock_migrate() (list_del_init() + list_add_tail() to
newep->asocs), and optionally close the new socket which frees the
association via kfree_rcu(). The cached @tmp can also be freed by a
network ABORT for that association, processed in softirq while the
lock is dropped.
sctp_wait_for_sndbuf() revalidates @asoc (the current entry) on re-lock
via the "sk != asoc->base.sk" and "asoc->base.dead" checks, but nothing
revalidates @tmp. After a successful return, the iterator advances to
the stale @tmp, yielding either a use-after-free (if the peeled socket
was closed) or a list-walk onto the new endpoint's list head (type
confusion of &newep->asocs as a struct sctp_association *).
Both are reachable from CapEff=0; the type-confusion path gives
controlled indirect call via the outqueue.sched->init_sid pointer.
Fix by re-deriving @tmp from @asoc after sctp_sendmsg_to_asoc()
returns. @asoc is known to still be on ep->asocs at that point: the
only callers that list_del an association from ep->asocs are
sctp_association_free() (which sets asoc->base.dead) and
sctp_assoc_migrate() (which changes asoc->base.sk), and
sctp_wait_for_sndbuf() checks both under the lock before any
successful return; a tripped check propagates as err < 0 and the loop
bails before the re-derive.
The SCTP_ABORT path in sctp_sendmsg_check_sflags() returns 0 and the
loop hits 'continue' before sctp_sendmsg_to_asoc() is ever called, so
the @tmp cached by list_for_each_entry_safe() still covers the
lock-held free that ba59fb027307 ("sctp: walk the list of asoc
safely") was added for.
Fixes: 4910280503f3 ("sctp: add support for snd flag SCTP_SENDALL process in sendmsg")
Cc: stable@vger.kernel.org
Signed-off-by: Ben Morris <bmorris@anthropic.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20260508001455.3137-1-joycathacker@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/sctp/socket.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1986,6 +1986,15 @@ static int sctp_sendmsg(struct sock *sk,
goto out_unlock;
iov_iter_revert(&msg->msg_iter, err);
+
+ /* sctp_sendmsg_to_asoc() may have released the socket
+ * lock (sctp_wait_for_sndbuf), during which other
+ * associations on ep->asocs could have been peeled
+ * off or freed. @asoc itself is revalidated by the
+ * base.dead and base.sk checks in sctp_wait_for_sndbuf,
+ * so re-derive the cached cursor from it.
+ */
+ tmp = list_next_entry(asoc, asocs);
}
goto out_unlock;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 173/201] batman-adv: fix integer overflow on buff_pos
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (171 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 172/201] sctp: revalidate list cursor after sctp_sendmsg_to_asoc() in SCTP_SENDALL Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 174/201] batman-adv: reject new tp_meter sessions during teardown Greg Kroah-Hartman
` (33 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lyes Bourennani, Alexis Pinson,
Sven Eckelmann
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lyes Bourennani <lbourennani@fuzzinglabs.com>
commit 0799e5943611006b346b8813c7daf7dd5aa26bfd upstream.
Fixing an integer overflow present in batadv_iv_ogm_send_to_if. The size
check is done using the int type in batadv_iv_ogm_aggr_packet whereas the
buff_pos variable uses the s16 type. This could lead to an out-of-bound
read.
Cc: stable@vger.kernel.org
Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol")
Signed-off-by: Lyes Bourennani <lbourennani@fuzzinglabs.com>
Signed-off-by: Alexis Pinson <apinson@fuzzinglabs.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/bat_iv_ogm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -335,7 +335,7 @@ static void batadv_iv_ogm_send_to_if(str
struct batadv_priv *bat_priv = netdev_priv(hard_iface->mesh_iface);
const char *fwd_str;
u8 packet_num;
- s16 buff_pos;
+ int buff_pos;
struct batadv_ogm_packet *batadv_ogm_packet;
struct sk_buff *skb;
u8 *packet_pos;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 174/201] batman-adv: reject new tp_meter sessions during teardown
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (172 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 173/201] batman-adv: fix integer overflow on buff_pos Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 175/201] batman-adv: stop tp_meter sessions during mesh teardown Greg Kroah-Hartman
` (32 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, stable, Yuan Tan, Yifan Wu,
Juefei Pu, Xin Liu, Luxing Yin, Jiexun Wang, Ren Wei,
Sven Eckelmann
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiexun Wang <wangjiexun2025@gmail.com>
commit 3243543592425beec83d453793e9d27caa0d8e66 upstream.
Prevent tp_meter from starting new sender or receiver sessions after
mesh_state has left BATADV_MESH_ACTIVE.
Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Co-developed-by: Luxing Yin <tr0jan@lzu.edu.cn>
Signed-off-by: Luxing Yin <tr0jan@lzu.edu.cn>
Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/tp_meter.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -947,6 +947,13 @@ void batadv_tp_start(struct batadv_priv
/* look for an already existing test towards this node */
spin_lock_bh(&bat_priv->tp_list_lock);
+ if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE) {
+ spin_unlock_bh(&bat_priv->tp_list_lock);
+ batadv_tp_batctl_error_notify(BATADV_TP_REASON_DST_UNREACHABLE,
+ dst, bat_priv, session_cookie);
+ return;
+ }
+
tp_vars = batadv_tp_list_find(bat_priv, dst);
if (tp_vars) {
spin_unlock_bh(&bat_priv->tp_list_lock);
@@ -1329,9 +1336,12 @@ static struct batadv_tp_vars *
batadv_tp_init_recv(struct batadv_priv *bat_priv,
const struct batadv_icmp_tp_packet *icmp)
{
- struct batadv_tp_vars *tp_vars;
+ struct batadv_tp_vars *tp_vars = NULL;
spin_lock_bh(&bat_priv->tp_list_lock);
+ if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE)
+ goto out_unlock;
+
tp_vars = batadv_tp_list_find_session(bat_priv, icmp->orig,
icmp->session);
if (tp_vars)
@@ -1464,6 +1474,9 @@ void batadv_tp_meter_recv(struct batadv_
{
struct batadv_icmp_tp_packet *icmp;
+ if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE)
+ goto out;
+
icmp = (struct batadv_icmp_tp_packet *)skb->data;
switch (icmp->subtype) {
@@ -1478,6 +1491,8 @@ void batadv_tp_meter_recv(struct batadv_
"Received unknown TP Metric packet type %u\n",
icmp->subtype);
}
+
+out:
consume_skb(skb);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 175/201] batman-adv: stop tp_meter sessions during mesh teardown
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (173 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 174/201] batman-adv: reject new tp_meter sessions during teardown Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 176/201] batman-adv: stop caching unowned originator pointers in BAT IV Greg Kroah-Hartman
` (31 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, stable, Yuan Tan, Yifan Wu,
Juefei Pu, Xin Liu, Luxing Yin, Jiexun Wang, Ren Wei,
Sven Eckelmann
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiexun Wang <wangjiexun2025@gmail.com>
commit 3d3cf6a7314aca4df0a6dde28ce784a2a30d0166 upstream.
TP meter sessions remain linked on bat_priv->tp_list after the netlink
request has already finished. When the mesh interface is removed,
batadv_mesh_free() currently tears down the mesh without first draining
these sessions.
A running sender thread or a late incoming tp_meter packet can then keep
processing against a mesh instance which is already shutting down.
Synchronize tp_meter with the mesh lifetime by stopping all active
sessions from batadv_mesh_free() and waiting for sender threads to exit
before teardown continues.
Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Co-developed-by: Luxing Yin <tr0jan@lzu.edu.cn>
Signed-off-by: Luxing Yin <tr0jan@lzu.edu.cn>
Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/main.c | 1
net/batman-adv/tp_meter.c | 94 +++++++++++++++++++++++++++++++++++++---------
net/batman-adv/tp_meter.h | 1
net/batman-adv/types.h | 4 +
4 files changed, 82 insertions(+), 18 deletions(-)
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -249,6 +249,7 @@ void batadv_mesh_free(struct net_device
atomic_set(&bat_priv->mesh_state, BATADV_MESH_DEACTIVATING);
batadv_purge_outstanding_packets(bat_priv, NULL);
+ batadv_tp_stop_all(bat_priv);
batadv_gw_node_free(bat_priv);
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -12,6 +12,7 @@
#include <linux/byteorder/generic.h>
#include <linux/cache.h>
#include <linux/compiler.h>
+#include <linux/completion.h>
#include <linux/container_of.h>
#include <linux/err.h>
#include <linux/etherdevice.h>
@@ -365,23 +366,38 @@ static void batadv_tp_vars_put(struct ba
}
/**
- * batadv_tp_sender_cleanup() - cleanup sender data and drop and timer
- * @bat_priv: the bat priv with all the mesh interface information
- * @tp_vars: the private data of the current TP meter session to cleanup
+ * batadv_tp_list_detach() - remove tp session from mesh session list once
+ * @tp_vars: the private data of the current TP meter session
*/
-static void batadv_tp_sender_cleanup(struct batadv_priv *bat_priv,
- struct batadv_tp_vars *tp_vars)
+static void batadv_tp_list_detach(struct batadv_tp_vars *tp_vars)
{
- cancel_delayed_work(&tp_vars->finish_work);
+ bool detached = false;
spin_lock_bh(&tp_vars->bat_priv->tp_list_lock);
- hlist_del_rcu(&tp_vars->list);
+ if (!hlist_unhashed(&tp_vars->list)) {
+ hlist_del_init_rcu(&tp_vars->list);
+ detached = true;
+ }
spin_unlock_bh(&tp_vars->bat_priv->tp_list_lock);
+ if (!detached)
+ return;
+
+ atomic_dec(&tp_vars->bat_priv->tp_num);
+
/* drop list reference */
batadv_tp_vars_put(tp_vars);
+}
- atomic_dec(&tp_vars->bat_priv->tp_num);
+/**
+ * batadv_tp_sender_cleanup() - cleanup sender data and drop and timer
+ * @tp_vars: the private data of the current TP meter session to cleanup
+ */
+static void batadv_tp_sender_cleanup(struct batadv_tp_vars *tp_vars)
+{
+ cancel_delayed_work_sync(&tp_vars->finish_work);
+
+ batadv_tp_list_detach(tp_vars);
/* kill the timer and remove its reference */
timer_delete_sync(&tp_vars->timer);
@@ -886,7 +902,8 @@ out:
batadv_orig_node_put(orig_node);
batadv_tp_sender_end(bat_priv, tp_vars);
- batadv_tp_sender_cleanup(bat_priv, tp_vars);
+ batadv_tp_sender_cleanup(tp_vars);
+ complete(&tp_vars->finished);
batadv_tp_vars_put(tp_vars);
@@ -918,7 +935,8 @@ static void batadv_tp_start_kthread(stru
batadv_tp_vars_put(tp_vars);
/* cleanup of failed tp meter variables */
- batadv_tp_sender_cleanup(bat_priv, tp_vars);
+ batadv_tp_sender_cleanup(tp_vars);
+ complete(&tp_vars->finished);
return;
}
@@ -1024,6 +1042,7 @@ void batadv_tp_start(struct batadv_priv
tp_vars->start_time = jiffies;
init_waitqueue_head(&tp_vars->more_bytes);
+ init_completion(&tp_vars->finished);
spin_lock_init(&tp_vars->unacked_lock);
INIT_LIST_HEAD(&tp_vars->unacked_list);
@@ -1126,14 +1145,7 @@ static void batadv_tp_receiver_shutdown(
"Shutting down for inactivity (more than %dms) from %pM\n",
BATADV_TP_RECV_TIMEOUT, tp_vars->other_end);
- spin_lock_bh(&tp_vars->bat_priv->tp_list_lock);
- hlist_del_rcu(&tp_vars->list);
- spin_unlock_bh(&tp_vars->bat_priv->tp_list_lock);
-
- /* drop list reference */
- batadv_tp_vars_put(tp_vars);
-
- atomic_dec(&bat_priv->tp_num);
+ batadv_tp_list_detach(tp_vars);
spin_lock_bh(&tp_vars->unacked_lock);
list_for_each_entry_safe(un, safe, &tp_vars->unacked_list, list) {
@@ -1497,6 +1509,52 @@ out:
}
/**
+ * batadv_tp_stop_all() - stop all currently running tp meter sessions
+ * @bat_priv: the bat priv with all the mesh interface information
+ */
+void batadv_tp_stop_all(struct batadv_priv *bat_priv)
+{
+ struct batadv_tp_vars *tp_vars[BATADV_TP_MAX_NUM];
+ struct batadv_tp_vars *tp_var;
+ size_t count = 0;
+ size_t i;
+
+ spin_lock_bh(&bat_priv->tp_list_lock);
+ hlist_for_each_entry(tp_var, &bat_priv->tp_list, list) {
+ if (WARN_ON_ONCE(count >= BATADV_TP_MAX_NUM))
+ break;
+
+ if (!kref_get_unless_zero(&tp_var->refcount))
+ continue;
+
+ tp_vars[count++] = tp_var;
+ }
+ spin_unlock_bh(&bat_priv->tp_list_lock);
+
+ for (i = 0; i < count; i++) {
+ tp_var = tp_vars[i];
+
+ switch (tp_var->role) {
+ case BATADV_TP_SENDER:
+ batadv_tp_sender_shutdown(tp_var,
+ BATADV_TP_REASON_CANCEL);
+ wake_up(&tp_var->more_bytes);
+ wait_for_completion(&tp_var->finished);
+ break;
+ case BATADV_TP_RECEIVER:
+ batadv_tp_list_detach(tp_var);
+ if (timer_shutdown_sync(&tp_var->timer))
+ batadv_tp_vars_put(tp_var);
+ break;
+ }
+
+ batadv_tp_vars_put(tp_var);
+ }
+
+ synchronize_net();
+}
+
+/**
* batadv_tp_meter_init() - initialize global tp_meter structures
*/
void __init batadv_tp_meter_init(void)
--- a/net/batman-adv/tp_meter.h
+++ b/net/batman-adv/tp_meter.h
@@ -17,6 +17,7 @@ void batadv_tp_start(struct batadv_priv
u32 test_length, u32 *cookie);
void batadv_tp_stop(struct batadv_priv *bat_priv, const u8 *dst,
u8 return_value);
+void batadv_tp_stop_all(struct batadv_priv *bat_priv);
void batadv_tp_meter_recv(struct batadv_priv *bat_priv, struct sk_buff *skb);
#endif /* _NET_BATMAN_ADV_TP_METER_H_ */
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -14,6 +14,7 @@
#include <linux/average.h>
#include <linux/bitops.h>
#include <linux/compiler.h>
+#include <linux/completion.h>
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/kref.h>
@@ -1328,6 +1329,9 @@ struct batadv_tp_vars {
/** @finish_work: work item for the finishing procedure */
struct delayed_work finish_work;
+ /** @finished: completion signaled when a sender thread exits */
+ struct completion finished;
+
/** @test_length: test length in milliseconds */
u32 test_length;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 176/201] batman-adv: stop caching unowned originator pointers in BAT IV
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (174 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 175/201] batman-adv: stop tp_meter sessions during mesh teardown Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 177/201] batman-adv: tp_meter: fix tp_num leak on kmalloc failure Greg Kroah-Hartman
` (30 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, stable, Yuan Tan, Yifan Wu,
Juefei Pu, Xin Liu, Jiexun Wang, Ren Wei, Sven Eckelmann
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiexun Wang <wangjiexun2025@gmail.com>
commit f03e8583532941b07761c5429de7d50766fa3110 upstream.
BAT IV keeps the last-hop neighbor address in each neigh_node, but some
paths also cache an originator pointer derived from a temporary lookup.
That pointer is not owned by the neigh_node and may no longer refer to a
live originator entry after purge handling runs.
Stop storing the auxiliary originator pointer in the BAT IV neighbor
state. When BAT IV needs the neighbor originator data, resolve it from
the stored neighbor address and drop the reference again after use.
Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
[sven: avoid bonding logic for outgoing OGM]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/bat_iv_ogm.c | 83 +++++++++++++++++++++++++++++++-------------
1 file changed, 59 insertions(+), 24 deletions(-)
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -173,19 +173,12 @@ free_orig_node_hash:
static struct batadv_neigh_node *
batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface,
const u8 *neigh_addr,
- struct batadv_orig_node *orig_node,
- struct batadv_orig_node *orig_neigh)
+ struct batadv_orig_node *orig_node)
{
struct batadv_neigh_node *neigh_node;
neigh_node = batadv_neigh_node_get_or_create(orig_node,
hard_iface, neigh_addr);
- if (!neigh_node)
- goto out;
-
- neigh_node->orig_node = orig_neigh;
-
-out:
return neigh_node;
}
@@ -907,6 +900,31 @@ static u8 batadv_iv_orig_ifinfo_sum(stru
}
/**
+ * batadv_iv_ogm_neigh_ifinfo_sum() - Get bcast_own sum for a last-hop neighbor
+ * @bat_priv: the bat priv with all the mesh interface information
+ * @neigh_node: last-hop neighbor of an originator
+ *
+ * Return: Number of replied (rebroadcasted) OGMs for the originator currently
+ * announced by the neighbor. Returns 0 if the neighbor's originator entry is
+ * not available anymore.
+ */
+static u8 batadv_iv_ogm_neigh_ifinfo_sum(struct batadv_priv *bat_priv,
+ const struct batadv_neigh_node *neigh_node)
+{
+ struct batadv_orig_node *orig_neigh;
+ u8 sum;
+
+ orig_neigh = batadv_orig_hash_find(bat_priv, neigh_node->addr);
+ if (!orig_neigh)
+ return 0;
+
+ sum = batadv_iv_orig_ifinfo_sum(orig_neigh, neigh_node->if_incoming);
+ batadv_orig_node_put(orig_neigh);
+
+ return sum;
+}
+
+/**
* batadv_iv_ogm_orig_update() - use OGM to update corresponding data in an
* originator
* @bat_priv: the bat priv with all the mesh interface information
@@ -975,17 +993,9 @@ batadv_iv_ogm_orig_update(struct batadv_
}
if (!neigh_node) {
- struct batadv_orig_node *orig_tmp;
-
- orig_tmp = batadv_iv_ogm_orig_get(bat_priv, ethhdr->h_source);
- if (!orig_tmp)
- goto unlock;
-
neigh_node = batadv_iv_ogm_neigh_new(if_incoming,
ethhdr->h_source,
- orig_node, orig_tmp);
-
- batadv_orig_node_put(orig_tmp);
+ orig_node);
if (!neigh_node)
goto unlock;
} else {
@@ -1037,10 +1047,9 @@ batadv_iv_ogm_orig_update(struct batadv_
*/
if (router_ifinfo &&
neigh_ifinfo->bat_iv.tq_avg == router_ifinfo->bat_iv.tq_avg) {
- sum_orig = batadv_iv_orig_ifinfo_sum(router->orig_node,
- router->if_incoming);
- sum_neigh = batadv_iv_orig_ifinfo_sum(neigh_node->orig_node,
- neigh_node->if_incoming);
+ sum_orig = batadv_iv_ogm_neigh_ifinfo_sum(bat_priv, router);
+ sum_neigh = batadv_iv_ogm_neigh_ifinfo_sum(bat_priv,
+ neigh_node);
if (sum_orig >= sum_neigh)
goto out;
}
@@ -1106,7 +1115,6 @@ static bool batadv_iv_ogm_calc_tq(struct
if (!neigh_node)
neigh_node = batadv_iv_ogm_neigh_new(if_incoming,
orig_neigh_node->orig,
- orig_neigh_node,
orig_neigh_node);
if (!neigh_node)
@@ -1303,6 +1311,32 @@ out:
}
/**
+ * batadv_orig_to_direct_router() - get direct next hop neighbor to an orig address
+ * @bat_priv: the bat priv with all the mesh interface information
+ * @orig_addr: the originator MAC address to search the best next hop router for
+ * @if_outgoing: the interface where the OGM should be sent to
+ *
+ * Return: A neighbor node which is the best router towards the given originator
+ * address. Bonding candidates are ignored.
+ */
+static struct batadv_neigh_node *
+batadv_orig_to_direct_router(struct batadv_priv *bat_priv, u8 *orig_addr,
+ struct batadv_hard_iface *if_outgoing)
+{
+ struct batadv_neigh_node *neigh_node;
+ struct batadv_orig_node *orig_node;
+
+ orig_node = batadv_orig_hash_find(bat_priv, orig_addr);
+ if (!orig_node)
+ return NULL;
+
+ neigh_node = batadv_orig_router_get(orig_node, if_outgoing);
+ batadv_orig_node_put(orig_node);
+
+ return neigh_node;
+}
+
+/**
* batadv_iv_ogm_process_per_outif() - process a batman iv OGM for an outgoing
* interface
* @skb: the skb containing the OGM
@@ -1372,8 +1406,9 @@ batadv_iv_ogm_process_per_outif(const st
router = batadv_orig_router_get(orig_node, if_outgoing);
if (router) {
- router_router = batadv_orig_router_get(router->orig_node,
- if_outgoing);
+ router_router = batadv_orig_to_direct_router(bat_priv,
+ router->addr,
+ if_outgoing);
router_ifinfo = batadv_neigh_ifinfo_get(router, if_outgoing);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 177/201] batman-adv: tp_meter: fix tp_num leak on kmalloc failure
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (175 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 176/201] batman-adv: stop caching unowned originator pointers in BAT IV Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 178/201] batman-adv: bla: prevent use-after-free when deleting claims Greg Kroah-Hartman
` (29 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, stable, Sven Eckelmann
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sven Eckelmann <sven@narfation.org>
commit ce425dd05d0fe7594930a0fb103634f35ac47bb6 upstream.
When batadv_tp_start() or batadv_tp_init_recv() fail to allocate a new
tp_vars object, the previously incremented bat_priv->tp_num counter is
never decremented. This causes tp_num to drift upward on each allocation
failure. Since only BATADV_TP_MAX_NUM sessions can be started and the count
is never reduced for these failed allocations, it causes to an exhaustion
of throughput meter sessions. In worst case, no new throughput meter
session can be started until the mesh interface is removed.
The error handling must decrement tp_num releasing the lock and aborting
the creation of an throughput meter session
Cc: stable@kernel.org
Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/tp_meter.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -994,6 +994,7 @@ void batadv_tp_start(struct batadv_priv
tp_vars = kmalloc_obj(*tp_vars, GFP_ATOMIC);
if (!tp_vars) {
+ atomic_dec(&bat_priv->tp_num);
spin_unlock_bh(&bat_priv->tp_list_lock);
batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
"Meter: %s cannot allocate list elements\n",
@@ -1366,8 +1367,10 @@ batadv_tp_init_recv(struct batadv_priv *
}
tp_vars = kmalloc_obj(*tp_vars, GFP_ATOMIC);
- if (!tp_vars)
+ if (!tp_vars) {
+ atomic_dec(&bat_priv->tp_num);
goto out_unlock;
+ }
ether_addr_copy(tp_vars->other_end, icmp->orig);
tp_vars->role = BATADV_TP_RECEIVER;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 178/201] batman-adv: bla: prevent use-after-free when deleting claims
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (176 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 177/201] batman-adv: tp_meter: fix tp_num leak on kmalloc failure Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 179/201] batman-adv: bla: only purge non-released claims Greg Kroah-Hartman
` (28 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, stable, Sven Eckelmann
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sven Eckelmann <sven@narfation.org>
commit 4ae1709a314060a196981b344610d023ea841e57 upstream.
When batadv_bla_del_backbone_claims() removes all claims for a backbone, it
does this by dropping the link entry in the hash list. This list entry
itself was one of the references which need to be dropped at the same time
via batadv_claim_put().
But the batadv_claim_put() must not be done before the last access to the
claim object in this function. Otherwise the claim might be freed already
by the batadv_claim_release() function before the list entry was dropped.
Cc: stable@kernel.org
Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/bridge_loop_avoidance.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -318,8 +318,8 @@ batadv_bla_del_backbone_claims(struct ba
if (claim->backbone_gw != backbone_gw)
continue;
- batadv_claim_put(claim);
hlist_del_rcu(&claim->hash_entry);
+ batadv_claim_put(claim);
}
spin_unlock_bh(list_lock);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 179/201] batman-adv: bla: only purge non-released claims
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (177 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 178/201] batman-adv: bla: prevent use-after-free when deleting claims Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 180/201] batman-adv: bla: put backbone reference on failed claim hash insert Greg Kroah-Hartman
` (27 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, stable, Sven Eckelmann
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sven Eckelmann <sven@narfation.org>
commit cf6b604011591865ae39ac82de8978c1120d17af upstream.
When batadv_bla_purge_claims() goes through the list of claims, it is only
traversing the hash list with an rcu_read_lock(). Due to a potential
parallel batadv_claim_put(), it can happen that it encounters a claim which
was actually in the process of being released+freed by
batadv_claim_release(). In this case, backbone_gw is set to NULL before the
delayed RCU kfree is started. Calling batadv_bla_claim_get_backbone_gw() is
then no longer allowed because it would cause a NULL-ptr derefence.
To avoid this, only claims with a valid reference counter must be purged.
All others are already taken care of.
Cc: stable@kernel.org
Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/bridge_loop_avoidance.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -1288,6 +1288,13 @@ static void batadv_bla_purge_claims(stru
rcu_read_lock();
hlist_for_each_entry_rcu(claim, head, hash_entry) {
+ /* only purge claims not currently in the process of being released.
+ * Such claims could otherwise have a NULL-ptr backbone_gw set because
+ * they already went through batadv_claim_release()
+ */
+ if (!kref_get_unless_zero(&claim->refcount))
+ continue;
+
backbone_gw = batadv_bla_claim_get_backbone_gw(claim);
if (now)
goto purge_now;
@@ -1313,6 +1320,7 @@ purge_now:
claim->addr, claim->vid);
skip:
batadv_backbone_gw_put(backbone_gw);
+ batadv_claim_put(claim);
}
rcu_read_unlock();
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 180/201] batman-adv: bla: put backbone reference on failed claim hash insert
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (178 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 179/201] batman-adv: bla: only purge non-released claims Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 181/201] sched_ext: Use HK_TYPE_DOMAIN_BOOT to detect isolcpus= domain isolation Greg Kroah-Hartman
` (26 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, stable, Sven Eckelmann
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sven Eckelmann <sven@narfation.org>
commit ba9d20ee9076dac32c371116bacbe72480eb356c upstream.
When batadv_bla_add_claim() fails to insert a new claim into the hash, it
leaked a reference to the backbone_gw for which the claim was intended.
Call batadv_backbone_gw_put() on the error path to release the reference
and avoid leaking the backbone_gw object.
Cc: stable@kernel.org
Fixes: 3db0decf1185 ("batman-adv: Fix non-atomic bla_claim::backbone_gw access")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/bridge_loop_avoidance.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -723,6 +723,7 @@ static void batadv_bla_add_claim(struct
if (unlikely(hash_added != 0)) {
/* only local changes happened. */
+ batadv_backbone_gw_put(backbone_gw);
kfree(claim);
return;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 181/201] sched_ext: Use HK_TYPE_DOMAIN_BOOT to detect isolcpus= domain isolation
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (179 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 180/201] batman-adv: bla: put backbone reference on failed claim hash insert Greg Kroah-Hartman
@ 2026-05-15 15:49 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 182/201] usb: typec: tcpm: reset internal port states on soft reset AMS Greg Kroah-Hartman
` (25 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:49 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andrea Righi, Tejun Heo,
Frederic Weisbecker
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrea Righi <arighi@nvidia.com>
commit 6ae315d37924435516d697ea7dde0b799a5928e0 upstream.
scx_enable() refuses to attach a BPF scheduler when isolcpus=domain is
in effect by comparing housekeeping_cpumask(HK_TYPE_DOMAIN) against
cpu_possible_mask.
Since commit 27c3a5967f05 ("sched/isolation: Convert housekeeping
cpumasks to rcu pointers"), HK_TYPE_DOMAIN's cpumask is RCU protected
and dereferencing it requires either RCU read lock, the cpu_hotplug
write lock, or the cpuset lock; scx_enable() holds none of these, so
booting with isolcpus=domain and attaching any BPF scheduler triggers
the following lockdep splat:
=============================
WARNING: suspicious RCU usage
-----------------------------
kernel/sched/isolation.c:60 suspicious rcu_dereference_check() usage!
1 lock held by scx_flash/281:
#0: ffffffff8379fce0 (update_mutex){+.+.}-{4:4}, at:
bpf_struct_ops_link_create+0x134/0x1c0
Call Trace:
dump_stack_lvl+0x6f/0xb0
lockdep_rcu_suspicious.cold+0x37/0x70
housekeeping_cpumask+0xcd/0xe0
scx_enable.isra.0+0x17/0x120
bpf_scx_reg+0x5e/0x80
bpf_struct_ops_link_create+0x151/0x1c0
__sys_bpf+0x1e4b/0x33c0
__x64_sys_bpf+0x21/0x30
do_syscall_64+0x117/0xf80
entry_SYSCALL_64_after_hwframe+0x77/0x7f
In addition, commit 03ff73510169 ("cpuset: Update HK_TYPE_DOMAIN cpumask
from cpuset") made HK_TYPE_DOMAIN include cpuset isolated partitions as
well, which means the current check also rejects BPF schedulers when a
cpuset partition is active. That contradicts the original intent of
commit 9f391f94a173 ("sched_ext: Disallow loading BPF scheduler if
isolcpus= domain isolation is in effect"), which explicitly noted that
cpuset partitions are honored through per-task cpumasks and should not
be rejected.
Switch to housekeeping_enabled(HK_TYPE_DOMAIN_BOOT), which reads only
the housekeeping flag bit (no RCU dereference) and reflects exactly the
boot-time isolcpus= configuration that the error message refers to.
Fixes: 27c3a5967f05 ("sched/isolation: Convert housekeeping cpumasks to rcu pointers")
Cc: stable@vger.kernel.org # v7.0+
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/sched/ext.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -5331,8 +5331,7 @@ static int scx_enable(struct sched_ext_o
static DEFINE_MUTEX(helper_mutex);
struct scx_enable_cmd cmd;
- if (!cpumask_equal(housekeeping_cpumask(HK_TYPE_DOMAIN),
- cpu_possible_mask)) {
+ if (housekeeping_enabled(HK_TYPE_DOMAIN_BOOT)) {
pr_err("sched_ext: Not compatible with \"isolcpus=\" domain isolation\n");
return -EINVAL;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 182/201] usb: typec: tcpm: reset internal port states on soft reset AMS
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (180 preceding siblings ...)
2026-05-15 15:49 ` [PATCH 7.0 181/201] sched_ext: Use HK_TYPE_DOMAIN_BOOT to detect isolcpus= domain isolation Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 183/201] io_uring/zcrx: use guards for locking Greg Kroah-Hartman
` (24 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Amit Sunil Dhamne, stable,
Badhri Jagan Sridharan, Heikki Krogerus
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amit Sunil Dhamne <amitsd@google.com>
commit 2909f0d4994fb4306bf116df5ccee797791fce2c upstream.
Reset internal port states (such as vdm_sm_running and
explicit_contract) on soft reset AMS as the port needs to negotiate a
new contract. The consequence of leaving the states in as-is cond are as
follows:
* port is in SRC power role and an explicit contract is negotiated
with the port partner (in sink role)
* port partner sends a Soft Reset AMS while VDM State Machine is
running
* port accepts the Soft Reset request and the port advertises src caps
* port partner sends a Request message but since the explicit_contract
and vdm_sm_running are true from previous negotiation, the port ends
up sending Soft Reset instead of Accept msg.
Stub Log:
[ 203.653942] AMS DISCOVER_IDENTITY start
[ 203.653947] PD TX, header: 0x176f
[ 203.655901] PD TX complete, status: 0
[ 203.657470] PD RX, header: 0x124f [1]
[ 203.657477] Rx VDM cmd 0xff008081 type 2 cmd 1 len 1
[ 203.657482] AMS DISCOVER_IDENTITY finished
[ 203.657484] cc:=4
[ 204.155698] PD RX, header: 0x144f [1]
[ 204.155718] Rx VDM cmd 0xeeee8001 type 0 cmd 1 len 1
[ 204.155741] PD TX, header: 0x196f
[ 204.157622] PD TX complete, status: 0
[ 204.160060] PD RX, header: 0x4d [1]
[ 204.160066] state change SRC_READY -> SOFT_RESET [rev2 SOFT_RESET_AMS]
[ 204.160076] PD TX, header: 0x163
[ 204.162486] PD TX complete, status: 0
[ 204.162832] AMS SOFT_RESET_AMS finished
[ 204.162840] cc:=4
[ 204.162891] AMS POWER_NEGOTIATION start
[ 204.162896] state change SOFT_RESET -> AMS_START [rev2 POWER_NEGOTIATION]
[ 204.162908] state change AMS_START -> SRC_SEND_CAPABILITIES [rev2 POWER_NEGOTIATION]
[ 204.162913] PD TX, header: 0x1361
[ 204.165529] PD TX complete, status: 0
[ 204.165571] pending state change SRC_SEND_CAPABILITIES -> SRC_SEND_CAPABILITIES_TIMEOUT @ 60 ms [rev2 POWER_NEGOTIATION]
[ 204.166996] PD RX, header: 0x1242 [1]
[ 204.167009] state change SRC_SEND_CAPABILITIES -> SRC_SOFT_RESET_WAIT_SNK_TX [rev2 POWER_NEGOTIATION]
[ 204.167019] AMS POWER_NEGOTIATION finished
[ 204.167020] cc:=4
[ 204.167083] AMS SOFT_RESET_AMS start
[ 204.167086] state change SRC_SOFT_RESET_WAIT_SNK_TX -> SOFT_RESET_SEND [rev2 SOFT_RESET_AMS]
[ 204.167092] PD TX, header: 0x16d
[ 204.168824] PD TX complete, status: 0
[ 204.168854] pending state change SOFT_RESET_SEND -> HARD_RESET_SEND @ 60 ms [rev2 SOFT_RESET_AMS]
[ 204.171876] PD RX, header: 0x43 [1]
[ 204.171879] AMS SOFT_RESET_AMS finished
This causes COMMON.PROC.PD.11.2 check failure for
TEST.PD.VDM.SRC.2_Rev2Src test on the PD compliance tester.
Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
Fixes: 8d3a0578ad1a ("usb: typec: tcpm: Respond Wait if VDM state machine is running")
Fixes: f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)")
Cc: stable <stable@kernel.org>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260414-fix-soft-reset-v1-1-01d7cb9764e2@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/typec/tcpm/tcpm.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -5539,6 +5539,8 @@ static void run_state_machine(struct tcp
usb_power_delivery_unregister_capabilities(port->partner_source_caps);
port->partner_source_caps = NULL;
tcpm_pd_send_control(port, PD_CTRL_ACCEPT, TCPC_TX_SOP);
+ port->vdm_sm_running = false;
+ port->explicit_contract = false;
tcpm_ams_finish(port);
if (port->pwr_role == TYPEC_SOURCE) {
port->upcoming_state = SRC_SEND_CAPABILITIES;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 183/201] io_uring/zcrx: use guards for locking
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (181 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 182/201] usb: typec: tcpm: reset internal port states on soft reset AMS Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 184/201] io_uring/zcrx: warn on freelist violations Greg Kroah-Hartman
` (23 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pavel Begunkov, Jens Axboe,
Harshit Mogalapalli
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov <asml.silence@gmail.com>
commit 898ad80d1207cbdb22b21bafb6de4adfd7627bd0 upstream.
Convert last several places using manual locking to guards to simplify
the code.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/eb4667cfaf88c559700f6399da9e434889f5b04a.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
io_uring/zcrx.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -586,9 +586,8 @@ static void io_zcrx_return_niov_freelist
{
struct io_zcrx_area *area = io_zcrx_iov_to_area(niov);
- spin_lock_bh(&area->freelist_lock);
+ guard(spinlock_bh)(&area->freelist_lock);
area->freelist[area->free_count++] = net_iov_idx(niov);
- spin_unlock_bh(&area->freelist_lock);
}
static void io_zcrx_return_niov(struct net_iov *niov)
@@ -1029,7 +1028,8 @@ static void io_zcrx_refill_slow(struct p
{
struct io_zcrx_area *area = ifq->area;
- spin_lock_bh(&area->freelist_lock);
+ guard(spinlock_bh)(&area->freelist_lock);
+
while (area->free_count && pp->alloc.count < PP_ALLOC_CACHE_REFILL) {
struct net_iov *niov = __io_zcrx_get_free_niov(area);
netmem_ref netmem = net_iov_to_netmem(niov);
@@ -1038,7 +1038,6 @@ static void io_zcrx_refill_slow(struct p
io_zcrx_sync_for_device(pp, niov);
net_mp_netmem_place_in_cache(pp, netmem);
}
- spin_unlock_bh(&area->freelist_lock);
}
static netmem_ref io_pp_zc_alloc_netmems(struct page_pool *pp, gfp_t gfp)
@@ -1264,10 +1263,10 @@ static struct net_iov *io_alloc_fallback
if (area->mem.is_dmabuf)
return NULL;
- spin_lock_bh(&area->freelist_lock);
- if (area->free_count)
- niov = __io_zcrx_get_free_niov(area);
- spin_unlock_bh(&area->freelist_lock);
+ scoped_guard(spinlock_bh, &area->freelist_lock) {
+ if (area->free_count)
+ niov = __io_zcrx_get_free_niov(area);
+ }
if (niov)
page_pool_fragment_netmem(net_iov_to_netmem(niov), 1);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 184/201] io_uring/zcrx: warn on freelist violations
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (182 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 183/201] io_uring/zcrx: use guards for locking Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 185/201] kho: fix error handling in kho_add_subtree() Greg Kroah-Hartman
` (22 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kai Aizen, Pavel Begunkov,
Jens Axboe, Harshit Mogalapalli
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov <asml.silence@gmail.com>
commit 770594e78c3964cf23cf5287f849437cdde9b7d0 upstream.
The freelist is appropriately sized to always be able to take a free
niov, but let's be more defensive and check the invariant with a
warning. That should help to catch any double-free issues.
Suggested-by: Kai Aizen <kai@snailsploit.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/2f3cea363b04649755e3b6bb9ab66485a95936d5.1776760901.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
io_uring/zcrx.c | 2 ++
1 file changed, 2 insertions(+)
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -587,6 +587,8 @@ static void io_zcrx_return_niov_freelist
struct io_zcrx_area *area = io_zcrx_iov_to_area(niov);
guard(spinlock_bh)(&area->freelist_lock);
+ if (WARN_ON_ONCE(area->free_count >= area->nia.num_niovs))
+ return;
area->freelist[area->free_count++] = net_iov_idx(niov);
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 185/201] kho: fix error handling in kho_add_subtree()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (183 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 184/201] io_uring/zcrx: warn on freelist violations Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 186/201] EDAC/versalnet: Refactor memory controller initialization and cleanup Greg Kroah-Hartman
` (21 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Breno Leitao, Pratyush Yadav,
Mike Rapoport (Microsoft), Alexander Graf, Pasha Tatashin,
Andrew Morton, Sasha Levin
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <leitao@debian.org>
[ Upstream commit 9ec95329894864170a1a7685b9a11b739393131a ]
Fix two error handling issues in kho_add_subtree(), where it doesn't
handle the error path correctly.
1. If fdt_setprop() fails after the subnode has been created, the
subnode is not removed. This leaves an incomplete node in the FDT
(missing "preserved-data" or "blob-size" properties).
2. The fdt_setprop() return value (an FDT error code) is stored
directly in err and returned to the caller, which expects -errno.
Fix both by storing fdt_setprop() results in fdt_err, jumping to a new
out_del_node label that removes the subnode on failure, and only setting
err = 0 on the success path, otherwise returning -ENOMEM (instead of
FDT_ERR_ errors that would come from fdt_setprop).
No user-visible changes. This patch fixes error handling in the KHO
(Kexec HandOver) subsystem, which is used to preserve data across kexec
reboots. The fix only affects a rare failure path during kexec
preparation — specifically when the kernel runs out of space in the
Flattened Device Tree buffer while registering preserved memory regions.
In the unlikely event that this error path was triggered, the old code
would leave a malformed node in the device tree and return an incorrect
error code to the calling subsystem, which could lead to confusing log
messages or incorrect recovery decisions. With this fix, the incomplete
node is properly cleaned up and the appropriate errno value is propagated,
this error code is not returned to the user.
Link: https://lore.kernel.org/20260410-kho_fix_send-v2-1-1b4debf7ee08@debian.org
Fixes: 3dc92c311498 ("kexec: add Kexec HandOver (KHO) generation helpers")
Signed-off-by: Breno Leitao <leitao@debian.org>
Suggested-by: Pratyush Yadav <pratyush@kernel.org>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Cc: Alexander Graf <graf@amazon.com>
Cc: Breno Leitao <leitao@debian.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/liveupdate/kexec_handover.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/kernel/liveupdate/kexec_handover.c
+++ b/kernel/liveupdate/kexec_handover.c
@@ -757,13 +757,18 @@ int kho_add_subtree(const char *name, vo
goto out_pack;
}
- err = fdt_setprop(root_fdt, off, KHO_FDT_SUB_TREE_PROP_NAME,
- &phys, sizeof(phys));
- if (err < 0)
- goto out_pack;
+ fdt_err = fdt_setprop(root_fdt, off, KHO_FDT_SUB_TREE_PROP_NAME,
+ &phys, sizeof(phys));
+ if (fdt_err < 0)
+ goto out_del_node;
WARN_ON_ONCE(kho_debugfs_fdt_add(&kho_out.dbg, name, fdt, false));
+ err = 0;
+ goto out_pack;
+
+out_del_node:
+ fdt_del_node(root_fdt, off);
out_pack:
fdt_pack(root_fdt);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 186/201] EDAC/versalnet: Refactor memory controller initialization and cleanup
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (184 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 185/201] kho: fix error handling in kho_add_subtree() Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 187/201] EDAC/versalnet: Fix device name memory leak Greg Kroah-Hartman
` (20 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shubhrajyoti Datta,
Borislav Petkov (AMD), Sasha Levin
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
[ Upstream commit 62a9fc50e8d947601ea3484e732b1a65a0a54b96 ]
Simplify the initialization and cleanup flow for Versal Net DDRMC
controllers in the EDAC driver by carving out the single controller init
into a separate function which allows for a much better and more
readable error handling and unwinding.
[ bp:
- do the kzalloc allocations first
- "publish" the structures only after they've been initialized
properly so that you don't need to unwind unnecessarily when
it fails later
- remove_versalnet() is now trivial
]
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20251104093932.3838876-1-shubhrajyoti.datta@amd.com
Stable-dep-of: 8cf5dd235eff ("EDAC/versalnet: Fix device name memory leak")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/edac/versalnet_edac.c | 174 +++++++++++++++++++++++-------------------
1 file changed, 97 insertions(+), 77 deletions(-)
--- a/drivers/edac/versalnet_edac.c
+++ b/drivers/edac/versalnet_edac.c
@@ -70,6 +70,8 @@
#define XDDR5_BUS_WIDTH_32 1
#define XDDR5_BUS_WIDTH_16 2
+#define MC_NAME_LEN 32
+
/**
* struct ecc_error_info - ECC error log information.
* @burstpos: Burst position.
@@ -760,7 +762,17 @@ static void versal_edac_release(struct d
kfree(dev);
}
-static int init_versalnet(struct mc_priv *priv, struct platform_device *pdev)
+static void remove_one_mc(struct mc_priv *priv, int i)
+{
+ struct mem_ctl_info *mci;
+
+ mci = priv->mci[i];
+ device_unregister(mci->pdev);
+ edac_mc_del_mc(mci->pdev);
+ edac_mc_free(mci);
+}
+
+static int init_one_mc(struct mc_priv *priv, struct platform_device *pdev, int i)
{
u32 num_chans, rank, dwidth, config;
struct edac_mc_layer layers[2];
@@ -768,102 +780,110 @@ static int init_versalnet(struct mc_priv
struct device *dev;
enum dev_type dt;
char *name;
- int rc, i;
+ int rc;
- for (i = 0; i < NUM_CONTROLLERS; i++) {
- config = priv->adec[CONF + i * ADEC_NUM];
- num_chans = FIELD_GET(MC5_NUM_CHANS_MASK, config);
- rank = 1 << FIELD_GET(MC5_RANK_MASK, config);
- dwidth = FIELD_GET(MC5_BUS_WIDTH_MASK, config);
-
- switch (dwidth) {
- case XDDR5_BUS_WIDTH_16:
- dt = DEV_X16;
- break;
- case XDDR5_BUS_WIDTH_32:
- dt = DEV_X32;
- break;
- case XDDR5_BUS_WIDTH_64:
- dt = DEV_X64;
- break;
- default:
- dt = DEV_UNKNOWN;
- }
+ config = priv->adec[CONF + i * ADEC_NUM];
+ num_chans = FIELD_GET(MC5_NUM_CHANS_MASK, config);
+ rank = 1 << FIELD_GET(MC5_RANK_MASK, config);
+ dwidth = FIELD_GET(MC5_BUS_WIDTH_MASK, config);
+
+ switch (dwidth) {
+ case XDDR5_BUS_WIDTH_16:
+ dt = DEV_X16;
+ break;
+ case XDDR5_BUS_WIDTH_32:
+ dt = DEV_X32;
+ break;
+ case XDDR5_BUS_WIDTH_64:
+ dt = DEV_X64;
+ break;
+ default:
+ dt = DEV_UNKNOWN;
+ }
- if (dt == DEV_UNKNOWN)
- continue;
+ if (dt == DEV_UNKNOWN)
+ return 0;
- /* Find the first enabled device and register that one. */
- layers[0].type = EDAC_MC_LAYER_CHIP_SELECT;
- layers[0].size = rank;
- layers[0].is_virt_csrow = true;
- layers[1].type = EDAC_MC_LAYER_CHANNEL;
- layers[1].size = num_chans;
- layers[1].is_virt_csrow = false;
-
- rc = -ENOMEM;
- mci = edac_mc_alloc(i, ARRAY_SIZE(layers), layers,
- sizeof(struct mc_priv));
- if (!mci) {
- edac_printk(KERN_ERR, EDAC_MC, "Failed memory allocation for MC%d\n", i);
- goto err_alloc;
- }
+ /* Find the first enabled device and register that one. */
+ layers[0].type = EDAC_MC_LAYER_CHIP_SELECT;
+ layers[0].size = rank;
+ layers[0].is_virt_csrow = true;
+ layers[1].type = EDAC_MC_LAYER_CHANNEL;
+ layers[1].size = num_chans;
+ layers[1].is_virt_csrow = false;
- priv->mci[i] = mci;
- priv->dwidth = dt;
+ rc = -ENOMEM;
+ name = kzalloc(MC_NAME_LEN, GFP_KERNEL);
+ if (!name)
+ return rc;
- dev = kzalloc_obj(*dev);
- dev->release = versal_edac_release;
- name = kmalloc(32, GFP_KERNEL);
- sprintf(name, "versal-net-ddrmc5-edac-%d", i);
- dev->init_name = name;
- rc = device_register(dev);
- if (rc)
- goto err_alloc;
+ dev = kzalloc(sizeof(*dev), GFP_KERNEL);
+ if (!dev)
+ goto err_name_free;
- mci->pdev = dev;
+ mci = edac_mc_alloc(i, ARRAY_SIZE(layers), layers, sizeof(struct mc_priv));
+ if (!mci) {
+ edac_printk(KERN_ERR, EDAC_MC, "Failed memory allocation for MC%d\n", i);
+ goto err_dev_free;
+ }
- platform_set_drvdata(pdev, priv);
+ sprintf(name, "versal-net-ddrmc5-edac-%d", i);
- mc_init(mci, dev);
- rc = edac_mc_add_mc(mci);
- if (rc) {
- edac_printk(KERN_ERR, EDAC_MC, "Failed to register MC%d with EDAC core\n", i);
- goto err_alloc;
- }
- }
- return 0;
+ dev->init_name = name;
+ dev->release = versal_edac_release;
-err_alloc:
- while (i--) {
- mci = priv->mci[i];
- if (!mci)
- continue;
-
- if (mci->pdev) {
- device_unregister(mci->pdev);
- edac_mc_del_mc(mci->pdev);
- }
+ rc = device_register(dev);
+ if (rc)
+ goto err_mc_free;
- edac_mc_free(mci);
+ mci->pdev = dev;
+ mc_init(mci, dev);
+
+ rc = edac_mc_add_mc(mci);
+ if (rc) {
+ edac_printk(KERN_ERR, EDAC_MC, "Failed to register MC%d with EDAC core\n", i);
+ goto err_unreg;
}
+ priv->mci[i] = mci;
+ priv->dwidth = dt;
+
+ platform_set_drvdata(pdev, priv);
+
+ return 0;
+
+err_unreg:
+ device_unregister(mci->pdev);
+err_mc_free:
+ edac_mc_free(mci);
+err_dev_free:
+ kfree(dev);
+err_name_free:
+ kfree(name);
+
return rc;
}
-static void remove_versalnet(struct mc_priv *priv)
+static int init_versalnet(struct mc_priv *priv, struct platform_device *pdev)
{
- struct mem_ctl_info *mci;
- int i;
+ int rc, i;
for (i = 0; i < NUM_CONTROLLERS; i++) {
- device_unregister(priv->mci[i]->pdev);
- mci = edac_mc_del_mc(priv->mci[i]->pdev);
- if (!mci)
- return;
+ rc = init_one_mc(priv, pdev, i);
+ if (rc) {
+ while (i--)
+ remove_one_mc(priv, i);
- edac_mc_free(mci);
+ return rc;
+ }
}
+ return 0;
+}
+
+static void remove_versalnet(struct mc_priv *priv)
+{
+ for (int i = 0; i < NUM_CONTROLLERS; i++)
+ remove_one_mc(priv, i);
}
static int mc_probe(struct platform_device *pdev)
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 187/201] EDAC/versalnet: Fix device name memory leak
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (185 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 186/201] EDAC/versalnet: Refactor memory controller initialization and cleanup Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 188/201] spi: uniphier: Simplify clock handling with devm_clk_get_enabled() Greg Kroah-Hartman
` (19 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Prasanna Kumar T S M,
Borislav Petkov (AMD), Sasha Levin
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
[ Upstream commit 8cf5dd235eff6008cb04c3d8064d2acfa90616f1 ]
The device name allocated via kzalloc() in init_one_mc() is assigned to
dev->init_name but never freed on the normal removal path. device_register()
copies init_name and then sets dev->init_name to NULL, so the name pointer
becomes unreachable from the device. Thus leaking memory.
Use a stack-local char array instead of using kzalloc() for name.
Fixes: d5fe2fec6c40 ("EDAC: Add a driver for the AMD Versal NET DDR controller")
Signed-off-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260401111856.2342975-1-ptsm@linux.microsoft.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/edac/versalnet_edac.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
--- a/drivers/edac/versalnet_edac.c
+++ b/drivers/edac/versalnet_edac.c
@@ -777,9 +777,9 @@ static int init_one_mc(struct mc_priv *p
u32 num_chans, rank, dwidth, config;
struct edac_mc_layer layers[2];
struct mem_ctl_info *mci;
+ char name[MC_NAME_LEN];
struct device *dev;
enum dev_type dt;
- char *name;
int rc;
config = priv->adec[CONF + i * ADEC_NUM];
@@ -813,13 +813,9 @@ static int init_one_mc(struct mc_priv *p
layers[1].is_virt_csrow = false;
rc = -ENOMEM;
- name = kzalloc(MC_NAME_LEN, GFP_KERNEL);
- if (!name)
- return rc;
-
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
- goto err_name_free;
+ return rc;
mci = edac_mc_alloc(i, ARRAY_SIZE(layers), layers, sizeof(struct mc_priv));
if (!mci) {
@@ -858,8 +854,6 @@ err_mc_free:
edac_mc_free(mci);
err_dev_free:
kfree(dev);
-err_name_free:
- kfree(name);
return rc;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 188/201] spi: uniphier: Simplify clock handling with devm_clk_get_enabled()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (186 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 187/201] EDAC/versalnet: Fix device name memory leak Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 189/201] spi: uniphier: fix controller deregistration Greg Kroah-Hartman
` (18 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pei Xiao, Kunihiko Hayashi,
Mark Brown, Sasha Levin
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pei Xiao <xiaopei01@kylinos.cn>
[ Upstream commit fdca270f8f87cae2eb5b619234b9dd11a863ce6b ]
Replace devm_clk_get() followed by clk_prepare_enable() with
devm_clk_get_enabled() for the clock. This removes the need for
explicit clock enable and disable calls, as the managed API automatically
handles clock disabling on device removal or probe failure.
Remove the now-unnecessary clk_disable_unprepare() calls from the probe
error path and the remove callback. Adjust error labels accordingly.
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://patch.msgid.link/b2deeefd4ef1a4bce71116aabfcb7e81400f6d37.1775546948.git.xiaopei01@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 0245435f7772 ("spi: uniphier: fix controller deregistration")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-uniphier.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
--- a/drivers/spi/spi-uniphier.c
+++ b/drivers/spi/spi-uniphier.c
@@ -666,28 +666,24 @@ static int uniphier_spi_probe(struct pla
}
priv->base_dma_addr = res->start;
- priv->clk = devm_clk_get(&pdev->dev, NULL);
+ priv->clk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(priv->clk)) {
dev_err(&pdev->dev, "failed to get clock\n");
ret = PTR_ERR(priv->clk);
goto out_host_put;
}
- ret = clk_prepare_enable(priv->clk);
- if (ret)
- goto out_host_put;
-
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
ret = irq;
- goto out_disable_clk;
+ goto out_host_put;
}
ret = devm_request_irq(&pdev->dev, irq, uniphier_spi_handler,
0, "uniphier-spi", priv);
if (ret) {
dev_err(&pdev->dev, "failed to request IRQ\n");
- goto out_disable_clk;
+ goto out_host_put;
}
init_completion(&priv->xfer_done);
@@ -716,7 +712,7 @@ static int uniphier_spi_probe(struct pla
if (IS_ERR_OR_NULL(host->dma_tx)) {
if (PTR_ERR(host->dma_tx) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
- goto out_disable_clk;
+ goto out_host_put;
}
host->dma_tx = NULL;
dma_tx_burst = INT_MAX;
@@ -766,9 +762,6 @@ out_release_dma:
host->dma_tx = NULL;
}
-out_disable_clk:
- clk_disable_unprepare(priv->clk);
-
out_host_put:
spi_controller_put(host);
return ret;
@@ -777,14 +770,11 @@ out_host_put:
static void uniphier_spi_remove(struct platform_device *pdev)
{
struct spi_controller *host = platform_get_drvdata(pdev);
- struct uniphier_spi_priv *priv = spi_controller_get_devdata(host);
if (host->dma_tx)
dma_release_channel(host->dma_tx);
if (host->dma_rx)
dma_release_channel(host->dma_rx);
-
- clk_disable_unprepare(priv->clk);
}
static const struct of_device_id uniphier_spi_match[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 189/201] spi: uniphier: fix controller deregistration
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (187 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 188/201] spi: uniphier: Simplify clock handling with devm_clk_get_enabled() Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 190/201] cgroup: Increment nr_dying_subsys_* from rmdir context Greg Kroah-Hartman
` (17 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Keiji Hayashibara, Johan Hovold,
Mark Brown, Sasha Levin
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
[ Upstream commit 0245435f777264ac45945ed2f325dd095a41d1af ]
Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.
Note that clocks were also disabled before the recent commit
fdca270f8f87 ("spi: uniphier: Simplify clock handling with
devm_clk_get_enabled()").
Fixes: 5ba155a4d4cc ("spi: add SPI controller driver for UniPhier SoC")
Cc: stable@vger.kernel.org # 4.19
Cc: Keiji Hayashibara <hayashibara.keiji@socionext.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-25-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-uniphier.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/spi/spi-uniphier.c
+++ b/drivers/spi/spi-uniphier.c
@@ -746,7 +746,7 @@ static int uniphier_spi_probe(struct pla
host->max_dma_len = min(dma_tx_burst, dma_rx_burst);
- ret = devm_spi_register_controller(&pdev->dev, host);
+ ret = spi_register_controller(host);
if (ret)
goto out_release_dma;
@@ -771,10 +771,16 @@ static void uniphier_spi_remove(struct p
{
struct spi_controller *host = platform_get_drvdata(pdev);
+ spi_controller_get(host);
+
+ spi_unregister_controller(host);
+
if (host->dma_tx)
dma_release_channel(host->dma_tx);
if (host->dma_rx)
dma_release_channel(host->dma_rx);
+
+ spi_controller_put(host);
}
static const struct of_device_id uniphier_spi_match[] = {
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 190/201] cgroup: Increment nr_dying_subsys_* from rmdir context
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (188 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 189/201] spi: uniphier: fix controller deregistration Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 191/201] cgroup: Defer css percpu_ref kill on rmdir until cgroup is depopulated Greg Kroah-Hartman
` (16 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Petr Malat, Tejun Heo, Sasha Levin
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Petr Malat <oss@malat.biz>
[ Upstream commit 13e786b64bd3fd81c7eb22aa32bf8305c32f2ccf ]
Incrementing nr_dying_subsys_* in offline_css(), which is executed by
cgroup_offline_wq worker, leads to a race where user can see the value
to be 0 if he reads cgroup.stat after calling rmdir and before the worker
executes. This makes the user wrongly expect resources released by the
removed cgroup to be available for a new assignment.
Increment nr_dying_subsys_* from kill_css(), which is called from the
cgroup_rmdir() context.
Fixes: ab0312526867 ("cgroup: Show # of subsystem CSSes in cgroup.stat")
Signed-off-by: Petr Malat <oss@malat.biz>
Signed-off-by: Tejun Heo <tj@kernel.org>
Stable-dep-of: 93618edf7538 ("cgroup: Defer css percpu_ref kill on rmdir until cgroup is depopulated")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/cgroup/cgroup.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -5768,16 +5768,6 @@ static void offline_css(struct cgroup_su
RCU_INIT_POINTER(css->cgroup->subsys[ss->id], NULL);
wake_up_all(&css->cgroup->offline_waitq);
-
- css->cgroup->nr_dying_subsys[ss->id]++;
- /*
- * Parent css and cgroup cannot be freed until after the freeing
- * of child css, see css_free_rwork_fn().
- */
- while ((css = css->parent)) {
- css->nr_descendants--;
- css->cgroup->nr_dying_subsys[ss->id]++;
- }
}
/**
@@ -6089,6 +6079,8 @@ static void css_killed_ref_fn(struct per
*/
static void kill_css(struct cgroup_subsys_state *css)
{
+ struct cgroup_subsys *ss = css->ss;
+
lockdep_assert_held(&cgroup_mutex);
if (css->flags & CSS_DYING)
@@ -6125,6 +6117,16 @@ static void kill_css(struct cgroup_subsy
* css is confirmed to be seen as killed on all CPUs.
*/
percpu_ref_kill_and_confirm(&css->refcnt, css_killed_ref_fn);
+
+ css->cgroup->nr_dying_subsys[ss->id]++;
+ /*
+ * Parent css and cgroup cannot be freed until after the freeing
+ * of child css, see css_free_rwork_fn().
+ */
+ while ((css = css->parent)) {
+ css->nr_descendants--;
+ css->cgroup->nr_dying_subsys[ss->id]++;
+ }
}
/**
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 191/201] cgroup: Defer css percpu_ref kill on rmdir until cgroup is depopulated
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (189 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 190/201] cgroup: Increment nr_dying_subsys_* from rmdir context Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 192/201] sched_ext: Skip tasks with stale task_rq in bypass_lb_cpu() Greg Kroah-Hartman
` (15 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tejun Heo, Sebastian Andrzej Siewior,
Sasha Levin, Martin Pitt
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <tj@kernel.org>
[ Upstream commit 93618edf753838a727dbff63c7c291dee22d656b ]
A chain of commits going back to v7.0 reworked rmdir to satisfy the
controller invariant that a subsystem's ->css_offline() must not run while
tasks are still doing kernel-side work in the cgroup.
[1] d245698d727a ("cgroup: Defer task cgroup unlink until after the task is done switching out")
[2] a72f73c4dd9b ("cgroup: Don't expose dead tasks in cgroup")
[3] 1b164b876c36 ("cgroup: Wait for dying tasks to leave on rmdir")
[4] 4c56a8ac6869 ("cgroup: Fix cgroup_drain_dying() testing the wrong condition")
[5] 13e786b64bd3 ("cgroup: Increment nr_dying_subsys_* from rmdir context")
[1] moved task cset unlink from do_exit() to finish_task_switch() so a
task's cset link drops only after the task has fully stopped scheduling.
That made tasks past exit_signals() linger on cset->tasks until their final
context switch, which led to a series of problems as what userspace expected
to see after rmdir diverged from what the kernel needs to wait for. [2]-[5]
tried to bridge that divergence: [2] filtered the exiting tasks from
cgroup.procs; [3] had rmdir(2) sleep in TASK_UNINTERRUPTIBLE for them; [4]
fixed the wait's condition; [5] made nr_dying_subsys_* visible
synchronously.
The cgroup_drain_dying() wait in [3] turned out to be a dead end. When the
rmdir caller is also the reaper of a zombie that pins a pidns teardown (e.g.
host PID 1 systemd reaping orphan pids that were re-parented to it during
the same teardown), rmdir blocks in TASK_UNINTERRUPTIBLE waiting for those
pids to free, the pids can't free because PID 1 is the reaper and it's stuck
in rmdir, and the system A-A deadlocks. No internal lock ordering breaks
this; the wait itself is the bug.
The css killing side that drove the original reorder, however, can be made
cleanly asynchronous: ->css_offline() is already async, run from
css_killed_work_fn() driven by percpu_ref_kill_and_confirm(). The fix is to
make that chain start only after all tasks have left the cgroup. rmdir's
user-visible side then returns as soon as cgroup.procs and friends are
empty, while ->css_offline() still runs only after the cgroup is fully
drained.
Verified by the original reproducer (pidns teardown + zombie reaper, runs
under vng) which hangs vanilla and succeeds here, and by per-commit
deterministic repros for [2], [3], [4], [5] with a boot parameter that
widens the post-exit_signals() window so each state is reliably reachable.
Some stress tests on top of that.
cgroup_apply_control_disable() has the same shape of pre-existing race:
when a controller is disabled via subtree_control, kill_css() ran
synchronously while tasks past exit_signals() could still be linked to
the cgroup's csets, and ->css_offline() could fire before they drained.
This patch preserves the existing synchronous behavior at that call site
(kill_css_sync() + kill_css_finish() back-to-back) and a follow-up patch
will defer kill_css_finish() there using a per-css trigger.
This seems like the right approach and I don't see problems with it. The
changes are somewhat invasive but not excessively so, so backporting to
-stable should be okay. If something does turn out to be wrong, the fallback
is to revert the entire chain ([1]-[5]) and rework in the development branch
instead.
v2: Pin cgrp across the deferred destroy work with explicit
cgroup_get()/cgroup_put() around queue_work() and the work_fn. v1
wasn't actually broken (ordered cgroup_offline_wq + queue_work order
in cgroup_task_dead() saved it) but the explicit ref removes the
dependency on those non-obvious invariants. Also note the
pre-existing cgroup_apply_control_disable() race in the description;
a follow-up will defer kill_css_finish() there.
Fixes: 1b164b876c36 ("cgroup: Wait for dying tasks to leave on rmdir")
Cc: stable@vger.kernel.org # v7.0+
Reported-and-tested-by: Martin Pitt <martin@piware.de>
Link: https://lore.kernel.org/all/afHNg2VX2jy9bW7y@piware.de/
Link: https://lore.kernel.org/all/35e0670adb4abeab13da2c321582af9f@kernel.org/
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/cgroup-defs.h | 4
kernel/cgroup/cgroup.c | 250 ++++++++++++++++++++------------------------
2 files changed, 119 insertions(+), 135 deletions(-)
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
@@ -609,8 +609,8 @@ struct cgroup {
/* used to wait for offlining of csses */
wait_queue_head_t offline_waitq;
- /* used by cgroup_rmdir() to wait for dying tasks to leave */
- wait_queue_head_t dying_populated_waitq;
+ /* defers killing csses after removal until cgroup is depopulated */
+ struct work_struct finish_destroy_work;
/* used to schedule release agent */
struct work_struct release_agent_work;
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -278,10 +278,12 @@ static void cgroup_finalize_control(stru
static void css_task_iter_skip(struct css_task_iter *it,
struct task_struct *task);
static int cgroup_destroy_locked(struct cgroup *cgrp);
+static void cgroup_finish_destroy(struct cgroup *cgrp);
+static void kill_css_sync(struct cgroup_subsys_state *css);
+static void kill_css_finish(struct cgroup_subsys_state *css);
static struct cgroup_subsys_state *css_create(struct cgroup *cgrp,
struct cgroup_subsys *ss);
static void css_release(struct percpu_ref *ref);
-static void kill_css(struct cgroup_subsys_state *css);
static int cgroup_addrm_files(struct cgroup_subsys_state *css,
struct cgroup *cgrp, struct cftype cfts[],
bool is_add);
@@ -858,6 +860,16 @@ static void cgroup_update_populated(stru
if (was_populated == cgroup_is_populated(cgrp))
break;
+ /*
+ * Subtree just emptied below an offlined cgrp. Fire deferred
+ * destroy. The transition is one-shot.
+ */
+ if (was_populated && !css_is_online(&cgrp->self)) {
+ cgroup_get(cgrp);
+ WARN_ON_ONCE(!queue_work(cgroup_offline_wq,
+ &cgrp->finish_destroy_work));
+ }
+
cgroup1_check_for_release(cgrp);
TRACE_CGROUP_PATH(notify_populated, cgrp,
cgroup_is_populated(cgrp));
@@ -2100,6 +2112,16 @@ static int cgroup_reconfigure(struct fs_
return 0;
}
+static void cgroup_finish_destroy_work_fn(struct work_struct *work)
+{
+ struct cgroup *cgrp = container_of(work, struct cgroup, finish_destroy_work);
+
+ cgroup_lock();
+ cgroup_finish_destroy(cgrp);
+ cgroup_unlock();
+ cgroup_put(cgrp);
+}
+
static void init_cgroup_housekeeping(struct cgroup *cgrp)
{
struct cgroup_subsys *ss;
@@ -2126,7 +2148,7 @@ static void init_cgroup_housekeeping(str
#endif
init_waitqueue_head(&cgrp->offline_waitq);
- init_waitqueue_head(&cgrp->dying_populated_waitq);
+ INIT_WORK(&cgrp->finish_destroy_work, cgroup_finish_destroy_work_fn);
INIT_WORK(&cgrp->release_agent_work, cgroup1_release_agent);
}
@@ -3436,7 +3458,8 @@ static void cgroup_apply_control_disable
if (css->parent &&
!(cgroup_ss_mask(dsct) & (1 << ss->id))) {
- kill_css(css);
+ kill_css_sync(css);
+ kill_css_finish(css);
} else if (!css_visible(css)) {
css_clear_dir(css);
if (ss->css_reset)
@@ -5558,7 +5581,7 @@ static struct cftype cgroup_psi_files[]
* css destruction is four-stage process.
*
* 1. Destruction starts. Killing of the percpu_ref is initiated.
- * Implemented in kill_css().
+ * Implemented in kill_css_finish().
*
* 2. When the percpu_ref is confirmed to be visible as killed on all CPUs
* and thus css_tryget_online() is guaranteed to fail, the css can be
@@ -6037,7 +6060,7 @@ out_unlock:
/*
* This is called when the refcnt of a css is confirmed to be killed.
* css_tryget_online() is now guaranteed to fail. Tell the subsystem to
- * initiate destruction and put the css ref from kill_css().
+ * initiate destruction and put the css ref from kill_css_finish().
*/
static void css_killed_work_fn(struct work_struct *work)
{
@@ -6069,15 +6092,12 @@ static void css_killed_ref_fn(struct per
}
/**
- * kill_css - destroy a css
- * @css: css to destroy
+ * kill_css_sync - synchronous half of css teardown
+ * @css: css being killed
*
- * This function initiates destruction of @css by removing cgroup interface
- * files and putting its base reference. ->css_offline() will be invoked
- * asynchronously once css_tryget_online() is guaranteed to fail and when
- * the reference count reaches zero, @css will be released.
+ * See cgroup_destroy_locked().
*/
-static void kill_css(struct cgroup_subsys_state *css)
+static void kill_css_sync(struct cgroup_subsys_state *css)
{
struct cgroup_subsys *ss = css->ss;
@@ -6100,24 +6120,6 @@ static void kill_css(struct cgroup_subsy
*/
css_clear_dir(css);
- /*
- * Killing would put the base ref, but we need to keep it alive
- * until after ->css_offline().
- */
- css_get(css);
-
- /*
- * cgroup core guarantees that, by the time ->css_offline() is
- * invoked, no new css reference will be given out via
- * css_tryget_online(). We can't simply call percpu_ref_kill() and
- * proceed to offlining css's because percpu_ref_kill() doesn't
- * guarantee that the ref is seen as killed on all CPUs on return.
- *
- * Use percpu_ref_kill_and_confirm() to get notifications as each
- * css is confirmed to be seen as killed on all CPUs.
- */
- percpu_ref_kill_and_confirm(&css->refcnt, css_killed_ref_fn);
-
css->cgroup->nr_dying_subsys[ss->id]++;
/*
* Parent css and cgroup cannot be freed until after the freeing
@@ -6130,44 +6132,88 @@ static void kill_css(struct cgroup_subsy
}
/**
- * cgroup_destroy_locked - the first stage of cgroup destruction
+ * kill_css_finish - deferred half of css teardown
+ * @css: css being killed
+ *
+ * See cgroup_destroy_locked().
+ */
+static void kill_css_finish(struct cgroup_subsys_state *css)
+{
+ lockdep_assert_held(&cgroup_mutex);
+
+ /*
+ * Skip on re-entry: cgroup_apply_control_disable() may have killed @css
+ * earlier. cgroup_destroy_locked() can still walk it because
+ * offline_css() (which NULLs cgrp->subsys[ssid]) runs async.
+ */
+ if (percpu_ref_is_dying(&css->refcnt))
+ return;
+
+ /*
+ * Killing would put the base ref, but we need to keep it alive until
+ * after ->css_offline().
+ */
+ css_get(css);
+
+ /*
+ * cgroup core guarantees that, by the time ->css_offline() is invoked,
+ * no new css reference will be given out via css_tryget_online(). We
+ * can't simply call percpu_ref_kill() and proceed to offlining css's
+ * because percpu_ref_kill() doesn't guarantee that the ref is seen as
+ * killed on all CPUs on return.
+ *
+ * Use percpu_ref_kill_and_confirm() to get notifications as each css is
+ * confirmed to be seen as killed on all CPUs.
+ */
+ percpu_ref_kill_and_confirm(&css->refcnt, css_killed_ref_fn);
+}
+
+/**
+ * cgroup_destroy_locked - destroy @cgrp (called on rmdir)
* @cgrp: cgroup to be destroyed
*
- * css's make use of percpu refcnts whose killing latency shouldn't be
- * exposed to userland and are RCU protected. Also, cgroup core needs to
- * guarantee that css_tryget_online() won't succeed by the time
- * ->css_offline() is invoked. To satisfy all the requirements,
- * destruction is implemented in the following two steps.
- *
- * s1. Verify @cgrp can be destroyed and mark it dying. Remove all
- * userland visible parts and start killing the percpu refcnts of
- * css's. Set up so that the next stage will be kicked off once all
- * the percpu refcnts are confirmed to be killed.
- *
- * s2. Invoke ->css_offline(), mark the cgroup dead and proceed with the
- * rest of destruction. Once all cgroup references are gone, the
- * cgroup is RCU-freed.
- *
- * This function implements s1. After this step, @cgrp is gone as far as
- * the userland is concerned and a new cgroup with the same name may be
- * created. As cgroup doesn't care about the names internally, this
- * doesn't cause any problem.
+ * Tear down @cgrp on behalf of rmdir. Constraints:
+ *
+ * - Userspace: rmdir must succeed when cgroup.procs and friends are empty.
+ *
+ * - Kernel: subsystem ->css_offline() must not run while any task in @cgrp's
+ * subtree is still doing kernel work. A task hidden from cgroup.procs (past
+ * exit_signals() with signal->live cleared) can still schedule, allocate, and
+ * consume resources until its final context switch. Dying descendants in the
+ * subtree can host such tasks too.
+ *
+ * - Kernel: css_tryget_online() must fail by the time ->css_offline() runs.
+ *
+ * The destruction runs in three parts:
+ *
+ * - This function: synchronous user-visible state teardown plus kill_css_sync()
+ * on each subsystem css.
+ *
+ * - cgroup_finish_destroy(): kicks the percpu_ref kill via kill_css_finish() on
+ * each subsystem css. Fires once @cgrp's subtree is fully drained, either
+ * inline here or from cgroup_update_populated().
+ *
+ * - The percpu_ref kill chain: css_killed_ref_fn -> css_killed_work_fn ->
+ * ->css_offline() -> release/free.
+ *
+ * Return 0 on success, -EBUSY if a userspace-visible task or an online child
+ * remains.
*/
static int cgroup_destroy_locked(struct cgroup *cgrp)
- __releases(&cgroup_mutex) __acquires(&cgroup_mutex)
{
struct cgroup *tcgrp, *parent = cgroup_parent(cgrp);
struct cgroup_subsys_state *css;
struct cgrp_cset_link *link;
+ struct css_task_iter it;
+ struct task_struct *task;
int ssid, ret;
lockdep_assert_held(&cgroup_mutex);
- /*
- * Only migration can raise populated from zero and we're already
- * holding cgroup_mutex.
- */
- if (cgroup_is_populated(cgrp))
+ css_task_iter_start(&cgrp->self, 0, &it);
+ task = css_task_iter_next(&it);
+ css_task_iter_end(&it);
+ if (task)
return -EBUSY;
/*
@@ -6191,9 +6237,8 @@ static int cgroup_destroy_locked(struct
link->cset->dead = true;
spin_unlock_irq(&css_set_lock);
- /* initiate massacre of all css's */
for_each_css(css, ssid, cgrp)
- kill_css(css);
+ kill_css_sync(css);
/* clear and remove @cgrp dir, @cgrp has an extra ref on its kn */
css_clear_dir(&cgrp->self);
@@ -6224,79 +6269,27 @@ static int cgroup_destroy_locked(struct
/* put the base reference */
percpu_ref_kill(&cgrp->self.refcnt);
+ if (!cgroup_is_populated(cgrp))
+ cgroup_finish_destroy(cgrp);
+
return 0;
};
/**
- * cgroup_drain_dying - wait for dying tasks to leave before rmdir
- * @cgrp: the cgroup being removed
+ * cgroup_finish_destroy - deferred half of @cgrp destruction
+ * @cgrp: cgroup whose subtree just became empty
*
- * cgroup.procs and cgroup.threads use css_task_iter which filters out
- * PF_EXITING tasks so that userspace doesn't see tasks that have already been
- * reaped via waitpid(). However, cgroup_has_tasks() - which tests whether the
- * cgroup has non-empty css_sets - is only updated when dying tasks pass through
- * cgroup_task_dead() in finish_task_switch(). This creates a window where
- * cgroup.procs reads empty but cgroup_has_tasks() is still true, making rmdir
- * fail with -EBUSY from cgroup_destroy_locked() even though userspace sees no
- * tasks.
- *
- * This function aligns cgroup_has_tasks() with what userspace can observe. If
- * cgroup_has_tasks() but the task iterator sees nothing (all remaining tasks are
- * PF_EXITING), we wait for cgroup_task_dead() to finish processing them. As the
- * window between PF_EXITING and cgroup_task_dead() is short, the wait is brief.
- *
- * This function only concerns itself with this cgroup's own dying tasks.
- * Whether the cgroup has children is cgroup_destroy_locked()'s problem.
- *
- * Each cgroup_task_dead() kicks the waitqueue via cset->cgrp_links, and we
- * retry the full check from scratch.
- *
- * Must be called with cgroup_mutex held.
+ * See cgroup_destroy_locked() for the rationale.
*/
-static int cgroup_drain_dying(struct cgroup *cgrp)
- __releases(&cgroup_mutex) __acquires(&cgroup_mutex)
+static void cgroup_finish_destroy(struct cgroup *cgrp)
{
- struct css_task_iter it;
- struct task_struct *task;
- DEFINE_WAIT(wait);
+ struct cgroup_subsys_state *css;
+ int ssid;
lockdep_assert_held(&cgroup_mutex);
-retry:
- if (!cgroup_has_tasks(cgrp))
- return 0;
- /* Same iterator as cgroup.threads - if any task is visible, it's busy */
- css_task_iter_start(&cgrp->self, 0, &it);
- task = css_task_iter_next(&it);
- css_task_iter_end(&it);
-
- if (task)
- return -EBUSY;
-
- /*
- * All remaining tasks are PF_EXITING and will pass through
- * cgroup_task_dead() shortly. Wait for a kick and retry.
- *
- * cgroup_has_tasks() can't transition from false to true while we're
- * holding cgroup_mutex, but the true to false transition happens
- * under css_set_lock (via cgroup_task_dead()). We must retest and
- * prepare_to_wait() under css_set_lock. Otherwise, the transition
- * can happen between our first test and prepare_to_wait(), and we
- * sleep with no one to wake us.
- */
- spin_lock_irq(&css_set_lock);
- if (!cgroup_has_tasks(cgrp)) {
- spin_unlock_irq(&css_set_lock);
- return 0;
- }
- prepare_to_wait(&cgrp->dying_populated_waitq, &wait,
- TASK_UNINTERRUPTIBLE);
- spin_unlock_irq(&css_set_lock);
- mutex_unlock(&cgroup_mutex);
- schedule();
- finish_wait(&cgrp->dying_populated_waitq, &wait);
- mutex_lock(&cgroup_mutex);
- goto retry;
+ for_each_css(css, ssid, cgrp)
+ kill_css_finish(css);
}
int cgroup_rmdir(struct kernfs_node *kn)
@@ -6308,12 +6301,9 @@ int cgroup_rmdir(struct kernfs_node *kn)
if (!cgrp)
return 0;
- ret = cgroup_drain_dying(cgrp);
- if (!ret) {
- ret = cgroup_destroy_locked(cgrp);
- if (!ret)
- TRACE_CGROUP_PATH(rmdir, cgrp);
- }
+ ret = cgroup_destroy_locked(cgrp);
+ if (!ret)
+ TRACE_CGROUP_PATH(rmdir, cgrp);
cgroup_kn_unlock(kn);
return ret;
@@ -7073,7 +7063,6 @@ void cgroup_task_exit(struct task_struct
static void do_cgroup_task_dead(struct task_struct *tsk)
{
- struct cgrp_cset_link *link;
struct css_set *cset;
unsigned long flags;
@@ -7087,11 +7076,6 @@ static void do_cgroup_task_dead(struct t
if (thread_group_leader(tsk) && atomic_read(&tsk->signal->live))
list_add_tail(&tsk->cg_list, &cset->dying_tasks);
- /* kick cgroup_drain_dying() waiters, see cgroup_rmdir() */
- list_for_each_entry(link, &cset->cgrp_links, cgrp_link)
- if (waitqueue_active(&link->cgrp->dying_populated_waitq))
- wake_up(&link->cgrp->dying_populated_waitq);
-
if (dl_task(tsk))
dec_dl_tasks_cs(tsk);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 192/201] sched_ext: Skip tasks with stale task_rq in bypass_lb_cpu()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (190 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 191/201] cgroup: Defer css percpu_ref kill on rmdir until cgroup is depopulated Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 193/201] perf build: fix "argument list too long" in second location Greg Kroah-Hartman
` (14 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Chris Mason, Tejun Heo, Andrea Righi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <tj@kernel.org>
commit da2d81b4118a74e65d2335e221a38d665902a98c upstream.
bypass_lb_cpu() transfers tasks between per-CPU bypass DSQs without
migrating them - task_cpu() only updates when the donee later consumes the
task via move_remote_task_to_local_dsq(). If the LB timer fires again before
consumption and the new DSQ becomes a donor, @p is still on the previous CPU
and task_rq(@p) != donor_rq. @p can't be moved without its own rq locked.
Skip such tasks.
Fixes: 95d1df610cdc ("sched_ext: Implement load balancer for bypass mode")
Cc: stable@vger.kernel.org # v6.19+
Reported-by: Chris Mason <clm@meta.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
[ arighi: replace donor_rq with rq, not present in v7.0.y ]
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/sched/ext.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -4010,6 +4010,15 @@ resume:
if (cpumask_empty(donee_mask))
break;
+ /*
+ * If an earlier pass placed @p on @donor_dsq from a different
+ * CPU and the donee hasn't consumed it yet, @p is still on the
+ * previous CPU and task_rq(@p) != @rq. @p can't be moved
+ * without its rq locked. Skip.
+ */
+ if (task_rq(p) != rq)
+ continue;
+
donee = cpumask_any_and_distribute(donee_mask, p->cpus_ptr);
if (donee >= nr_cpu_ids)
continue;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 193/201] perf build: fix "argument list too long" in second location
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (191 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 192/201] sched_ext: Skip tasks with stale task_rq in bypass_lb_cpu() Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 194/201] mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap() Greg Kroah-Hartman
` (13 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Markus Mayer, James Clark,
Namhyung Kim, Florian Fainelli
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markus Mayer <mmayer@broadcom.com>
commit 97ab89686a9e5d087042dbe73604a32b3de72653 upstream
Turns out that displaying "RM $^" via quiet_cmd_rm can also upset the
shell and cause it to display "argument list too long".
Trying to quote $^ doesn't help.
In the end, *not* displaying the (potentially long) list of files is
probably the right thing to do for a "quiet" message, anyway. Instead,
let's display a count of how many files were removed. There is always
V=1 if more detail is required.
TEST linux/tools/perf/pmu-events/metric_test.log
RM ...634 orphan file(s)...
LD linux/tools/perf/util/perf-util-in.o
Also move the comment regarding xargs before the rule, so it doesn't
show up in the build output.
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/perf/pmu-events/Build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/tools/perf/pmu-events/Build
+++ b/tools/perf/pmu-events/Build
@@ -211,10 +211,10 @@ ifneq ($(strip $(ORPHAN_FILES)),)
# Message for $(call echo-cmd,rm). Generally cleaning files isn't part
# of a build step.
-quiet_cmd_rm = RM $^
+quiet_cmd_rm = RM ...$(words $^) orphan file(s)...
+# The list of files can be long. Use xargs to prevent issues.
prune_orphans: $(ORPHAN_FILES)
- # The list of files can be long. Use xargs to prevent issues.
$(Q)$(call echo-cmd,rm)echo "$^" | xargs rm -f
JEVENTS_DEPS += prune_orphans
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 194/201] mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap()
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (192 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 193/201] perf build: fix "argument list too long" in second location Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 195/201] vsock: fix buffer size clamping order Greg Kroah-Hartman
` (12 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lorenzo Stoakes,
syzbot+db390288d141a1dccf96, David Hildenbrand, Jann Horn,
Liam Howlett, Michal Hocko, Mike Rapoport, Pedro Falcato,
Suren Baghdasaryan, Andrew Morton
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Stoakes <ljs@kernel.org>
[ Upstream commit 619eab23e1ce7c97e54bfc5a417306d94b3f6f13 ]
The mmap_prepare hook functionality includes the ability to invoke
mmap_prepare() from the mmap() hook of existing 'stacked' drivers, that is
ones which are capable of calling the mmap hooks of other drivers/file
systems (e.g. overlayfs, shm).
As part of the mmap_prepare action functionality, we deal with errors by
unmapping the VMA should one arise. This works in the usual mmap_prepare
case, as we invoke this action at the last moment, when the VMA is
established in the maple tree.
However, the mmap() hook passes a not-fully-established VMA pointer to the
caller (which is the motivation behind the mmap_prepare() work), which is
detached.
So attempting to unmap a VMA in this state will be problematic, with the
most obvious symptom being a warning in vma_mark_detached(), because the
VMA is already detached.
It's also unncessary - the mmap() handler will clean up the VMA on error.
So to fix this issue, this patch propagates whether or not an mmap action
is being completed via the compatibility layer or directly.
If the former, then we do not attempt VMA cleanup, if the latter, then we
do.
This patch also updates the userland VMA tests to reflect the change.
Link: https://lore.kernel.org/20260421102150.189982-1-ljs@kernel.org
Fixes: ac0a3fc9c07d ("mm: add ability to take further action in vm_area_desc")
Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
Reported-by: syzbot+db390288d141a1dccf96@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/69e69734.050a0220.24bfd3.0027.GAE@google.com/
Cc: David Hildenbrand <david@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/mm.h | 2 -
mm/util.c | 51 +++++++++++++++++++++-----------------
mm/vma.c | 3 --
tools/testing/vma/include/dup.h | 41 ++++++++++++++----------------
tools/testing/vma/include/stubs.h | 3 +-
5 files changed, 53 insertions(+), 47 deletions(-)
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -4080,7 +4080,7 @@ static inline void mmap_action_ioremap_f
int mmap_action_prepare(struct vm_area_desc *desc);
int mmap_action_complete(struct vm_area_struct *vma,
- struct mmap_action *action);
+ struct mmap_action *action, bool is_compat);
/* Look up the first VMA which exactly match the interval vm_start ... vm_end */
static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
--- a/mm/util.c
+++ b/mm/util.c
@@ -1186,7 +1186,8 @@ int compat_vma_mmap(struct file *file, s
return err;
set_vma_from_desc(vma, &desc);
- err = mmap_action_complete(vma, &desc.action);
+ err = mmap_action_complete(vma, &desc.action,
+ /*is_compat=*/true);
if (err) {
const size_t len = vma_pages(vma) << PAGE_SHIFT;
@@ -1277,28 +1278,31 @@ again:
}
static int mmap_action_finish(struct vm_area_struct *vma,
- struct mmap_action *action, int err)
+ struct mmap_action *action, int err,
+ bool is_compat)
{
+ if (!err && action->success_hook)
+ err = action->success_hook(vma);
+
+ /*
+ * If this is invoked from the compatibility layer, post-mmap() hook
+ * logic will handle cleanup for us.
+ */
+ if (!err || is_compat)
+ return err;
+
/*
* If an error occurs, unmap the VMA altogether and return an error. We
* only clear the newly allocated VMA, since this function is only
* invoked if we do NOT merge, so we only clean up the VMA we created.
*/
- if (err) {
- if (action->error_hook) {
- /* We may want to filter the error. */
- err = action->error_hook(err);
-
- /* The caller should not clear the error. */
- VM_WARN_ON_ONCE(!err);
- }
- return err;
+ if (action->error_hook) {
+ /* We may want to filter the error. */
+ err = action->error_hook(err);
+ /* The caller should not clear the error. */
+ VM_WARN_ON_ONCE(!err);
}
-
- if (action->success_hook)
- return action->success_hook(vma);
-
- return 0;
+ return err;
}
#ifdef CONFIG_MMU
@@ -1329,14 +1333,16 @@ EXPORT_SYMBOL(mmap_action_prepare);
* mmap_action_complete - Execute VMA descriptor action.
* @vma: The VMA to perform the action upon.
* @action: The action to perform.
+ * @is_compat: Is this being invoked from the compatibility layer?
*
* Similar to mmap_action_prepare().
*
- * Return: 0 on success, or error, at which point the VMA will be unmapped.
+ * Return: 0 on success, or error, at which point the VMA will be unmapped if
+ * !@is_compat.
*/
int mmap_action_complete(struct vm_area_struct *vma,
- struct mmap_action *action)
-
+ struct mmap_action *action,
+ bool is_compat)
{
int err = 0;
@@ -1353,7 +1359,7 @@ int mmap_action_complete(struct vm_area_
break;
}
- return mmap_action_finish(vma, action, err);
+ return mmap_action_finish(vma, action, err, is_compat);
}
EXPORT_SYMBOL(mmap_action_complete);
#else
@@ -1373,7 +1379,8 @@ int mmap_action_prepare(struct vm_area_d
EXPORT_SYMBOL(mmap_action_prepare);
int mmap_action_complete(struct vm_area_struct *vma,
- struct mmap_action *action)
+ struct mmap_action *action,
+ bool is_compat)
{
int err = 0;
@@ -1388,7 +1395,7 @@ int mmap_action_complete(struct vm_area_
break;
}
- return mmap_action_finish(vma, action, err);
+ return mmap_action_finish(vma, action, err, is_compat);
}
EXPORT_SYMBOL(mmap_action_complete);
#endif
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -2708,7 +2708,7 @@ static int call_action_complete(struct m
{
int err;
- err = mmap_action_complete(vma, action);
+ err = mmap_action_complete(vma, action, /*is_compat=*/false);
/* If we held the file rmap we need to release it. */
if (map->hold_file_rmap_lock) {
@@ -2778,7 +2778,6 @@ static unsigned long __mmap_region(struc
if (have_mmap_prepare && allocated_new) {
error = call_action_complete(&map, &desc.action, vma);
-
if (error)
return error;
}
--- a/tools/testing/vma/include/dup.h
+++ b/tools/testing/vma/include/dup.h
@@ -1071,8 +1071,17 @@ static inline void vma_set_anonymous(str
static inline void set_vma_from_desc(struct vm_area_struct *vma,
struct vm_area_desc *desc);
-static inline int __compat_vma_mmap(const struct file_operations *f_op,
- struct file *file, struct vm_area_struct *vma)
+static inline unsigned long vma_pages(struct vm_area_struct *vma)
+{
+ return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+}
+
+static inline int vfs_mmap_prepare(struct file *file, struct vm_area_desc *desc)
+{
+ return file->f_op->mmap_prepare(desc);
+}
+
+static inline int compat_vma_mmap(struct file *file, struct vm_area_struct *vma)
{
struct vm_area_desc desc = {
.mm = vma->vm_mm,
@@ -1082,14 +1091,14 @@ static inline int __compat_vma_mmap(cons
.pgoff = vma->vm_pgoff,
.vm_file = vma->vm_file,
- .vm_flags = vma->vm_flags,
+ .vma_flags = vma->flags,
.page_prot = vma->vm_page_prot,
.action.type = MMAP_NOTHING, /* Default */
};
int err;
- err = f_op->mmap_prepare(&desc);
+ err = vfs_mmap_prepare(file, &desc);
if (err)
return err;
@@ -1098,27 +1107,22 @@ static inline int __compat_vma_mmap(cons
return err;
set_vma_from_desc(vma, &desc);
- return mmap_action_complete(vma, &desc.action);
-}
+ err = mmap_action_complete(vma, &desc.action,
+ /*is_compat=*/true);
+ if (err) {
+ const size_t len = vma_pages(vma) << PAGE_SHIFT;
-static inline int compat_vma_mmap(struct file *file,
- struct vm_area_struct *vma)
-{
- return __compat_vma_mmap(file->f_op, file, vma);
+ do_munmap(current->mm, vma->vm_start, len, NULL);
+ }
+ return err;
}
-
static inline void vma_iter_init(struct vma_iterator *vmi,
struct mm_struct *mm, unsigned long addr)
{
mas_init(&vmi->mas, &mm->mm_mt, addr);
}
-static inline unsigned long vma_pages(struct vm_area_struct *vma)
-{
- return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
-}
-
static inline void mmap_assert_locked(struct mm_struct *);
static inline struct vm_area_struct *find_vma_intersection(struct mm_struct *mm,
unsigned long start_addr,
@@ -1309,11 +1313,6 @@ static inline int vfs_mmap(struct file *
return file->f_op->mmap(file, vma);
}
-static inline int vfs_mmap_prepare(struct file *file, struct vm_area_desc *desc)
-{
- return file->f_op->mmap_prepare(desc);
-}
-
static inline void vma_set_file(struct vm_area_struct *vma, struct file *file)
{
/* Changing an anonymous vma with this is illegal */
--- a/tools/testing/vma/include/stubs.h
+++ b/tools/testing/vma/include/stubs.h
@@ -87,7 +87,8 @@ static inline int mmap_action_prepare(st
}
static inline int mmap_action_complete(struct vm_area_struct *vma,
- struct mmap_action *action)
+ struct mmap_action *action,
+ bool is_compat)
{
return 0;
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 195/201] vsock: fix buffer size clamping order
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (193 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 194/201] mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap() Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 196/201] vsock/virtio: fix length and offset in tap skb for split packets Greg Kroah-Hartman
` (11 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stefano Garzarella, Norbert Szetei,
Jakub Kicinski, Luigi Leonardi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Norbert Szetei <norbert@doyensec.com>
commit d114bfdc9b76bf93b881e195b7ec957c14227bab upstream.
In vsock_update_buffer_size(), the buffer size was being clamped to the
maximum first, and then to the minimum. If a user sets a minimum buffer
size larger than the maximum, the minimum check overrides the maximum
check, inverting the constraint.
This breaks the intended socket memory boundaries by allowing the
vsk->buffer_size to grow beyond the configured vsk->buffer_max_size.
Fix this by checking the minimum first, and then the maximum. This
ensures the buffer size never exceeds the buffer_max_size.
Fixes: b9f2b0ffde0c ("vsock: handle buffer_size sockopts in the core")
Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Norbert Szetei <norbert@doyensec.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://patch.msgid.link/180118C5-8BCF-4A63-A305-4EE53A34AB9C@doyensec.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Cc: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/vmw_vsock/af_vsock.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -1951,12 +1951,12 @@ static void vsock_update_buffer_size(str
const struct vsock_transport *transport,
u64 val)
{
- if (val > vsk->buffer_max_size)
- val = vsk->buffer_max_size;
-
if (val < vsk->buffer_min_size)
val = vsk->buffer_min_size;
+ if (val > vsk->buffer_max_size)
+ val = vsk->buffer_max_size;
+
if (val != vsk->buffer_size &&
transport && transport->notify_buffer_size)
transport->notify_buffer_size(vsk, &val);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 196/201] vsock/virtio: fix length and offset in tap skb for split packets
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (194 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 195/201] vsock: fix buffer size clamping order Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 197/201] vsock/virtio: fix empty payload in tap skb for non-linear buffers Greg Kroah-Hartman
` (10 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stefano Garzarella, Bobby Eshleman,
Arseniy Krasnov, Michael S. Tsirkin, Paolo Abeni, Luigi Leonardi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Garzarella <sgarzare@redhat.com>
commit 5f344d809e015fba3709e5219428c00b8ac5d7df upstream.
virtio_transport_build_skb() builds a new skb to be delivered to the
vsockmon tap device. To build the new skb, it uses the original skb
data length as payload length, but as the comment notes, the original
packet stored in the skb may have been split in multiple packets, so we
need to use the length in the header, which is correctly updated before
the packet is delivered to the tap, and the offset for the data.
This was also similar to what we did before commit 71dc9ec9ac7d
("virtio/vsock: replace virtio_vsock_pkt with sk_buff") where we probably
missed something during the skb conversion.
Also update the comment above, which was left stale by the skb
conversion and still mentioned a buffer pointer that no longer exists.
Fixes: 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff")
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
Reviewed-by: Arseniy Krasnov <avkrasnov@rulkc.org>
Link: https://patch.msgid.link/20260508164411.261440-2-sgarzare@redhat.com
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Cc: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/vmw_vsock/virtio_transport_common.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -169,12 +169,12 @@ static struct sk_buff *virtio_transport_
struct sk_buff *skb;
size_t payload_len;
- /* A packet could be split to fit the RX buffer, so we can retrieve
- * the payload length from the header and the buffer pointer taking
- * care of the offset in the original packet.
+ /* A packet could be split to fit the RX buffer, so we use
+ * the payload length from the header, which has been updated
+ * by the sender to reflect the fragment size.
*/
pkt_hdr = virtio_vsock_hdr(pkt);
- payload_len = pkt->len;
+ payload_len = le32_to_cpu(pkt_hdr->len);
skb = alloc_skb(sizeof(*hdr) + sizeof(*pkt_hdr) + payload_len,
GFP_ATOMIC);
@@ -222,7 +222,8 @@ static struct sk_buff *virtio_transport_
virtio_transport_copy_nonlinear_skb(pkt, data, payload_len);
} else {
- skb_put_data(skb, pkt->data, payload_len);
+ skb_put_data(skb, pkt->data + VIRTIO_VSOCK_SKB_CB(pkt)->offset,
+ payload_len);
}
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 197/201] vsock/virtio: fix empty payload in tap skb for non-linear buffers
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (195 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 196/201] vsock/virtio: fix length and offset in tap skb for split packets Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 198/201] vsock/virtio: fix potential unbounded skb queue Greg Kroah-Hartman
` (9 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yiqi Sun, Stefano Garzarella,
Bobby Eshleman, Arseniy Krasnov, Michael S. Tsirkin, Paolo Abeni,
Luigi Leonardi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Garzarella <sgarzare@redhat.com>
commit 3a3e3d90cbc79600544536723911657730759af3 upstream.
For non-linear skbs, virtio_transport_build_skb() goes through
virtio_transport_copy_nonlinear_skb() to copy the original payload
in the new skb to be delivered to the vsockmon tap device.
This manually initializes an iov_iter but does not set iov_iter.count.
Since the iov_iter is zero-initialized, the copy length is zero and no
payload is actually copied to the monitor interface, leaving data
un-initialized.
Fix this by removing the linear vs non-linear split and using
skb_copy_datagram_iter() with iov_iter_kvec() for all cases, as
vhost-vsock already does. This handles both linear and non-linear skbs,
properly initializes the iov_iter, and removes the now unused
virtio_transport_copy_nonlinear_skb().
While touching this code, let's also check the return value of
skb_copy_datagram_iter(), even though it's unlikely to fail.
Fixes: 4b0bf10eb077 ("vsock/virtio: non-linear skb handling for tap")
Reported-by: Yiqi Sun <sunyiqixm@gmail.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
Reviewed-by: Arseniy Krasnov <avkrasnov@rulkc.org>
Link: https://patch.msgid.link/20260508164411.261440-3-sgarzare@redhat.com
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Cc: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/vmw_vsock/virtio_transport_common.c | 40 +++++++++-----------------------
1 file changed, 12 insertions(+), 28 deletions(-)
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -139,27 +139,6 @@ static void virtio_transport_init_hdr(st
hdr->fwd_cnt = cpu_to_le32(0);
}
-static void virtio_transport_copy_nonlinear_skb(const struct sk_buff *skb,
- void *dst,
- size_t len)
-{
- struct iov_iter iov_iter = { 0 };
- struct kvec kvec;
- size_t to_copy;
-
- kvec.iov_base = dst;
- kvec.iov_len = len;
-
- iov_iter.iter_type = ITER_KVEC;
- iov_iter.kvec = &kvec;
- iov_iter.nr_segs = 1;
-
- to_copy = min_t(size_t, len, skb->len);
-
- skb_copy_datagram_iter(skb, VIRTIO_VSOCK_SKB_CB(skb)->offset,
- &iov_iter, to_copy);
-}
-
/* Packet capture */
static struct sk_buff *virtio_transport_build_skb(void *opaque)
{
@@ -217,13 +196,18 @@ static struct sk_buff *virtio_transport_
skb_put_data(skb, pkt_hdr, sizeof(*pkt_hdr));
if (payload_len) {
- if (skb_is_nonlinear(pkt)) {
- void *data = skb_put(skb, payload_len);
-
- virtio_transport_copy_nonlinear_skb(pkt, data, payload_len);
- } else {
- skb_put_data(skb, pkt->data + VIRTIO_VSOCK_SKB_CB(pkt)->offset,
- payload_len);
+ struct iov_iter iov_iter;
+ struct kvec kvec;
+ void *data = skb_put(skb, payload_len);
+
+ kvec.iov_base = data;
+ kvec.iov_len = payload_len;
+ iov_iter_kvec(&iov_iter, ITER_DEST, &kvec, 1, payload_len);
+
+ if (skb_copy_datagram_iter(pkt, VIRTIO_VSOCK_SKB_CB(pkt)->offset,
+ &iov_iter, payload_len)) {
+ kfree_skb(skb);
+ return NULL;
}
}
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 198/201] vsock/virtio: fix potential unbounded skb queue
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (196 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 197/201] vsock/virtio: fix empty payload in tap skb for non-linear buffers Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 199/201] vsock/virtio: fix accept queue count leak on transport mismatch Greg Kroah-Hartman
` (8 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eric Dumazet, Arseniy Krasnov,
Stefan Hajnoczi, Stefano Garzarella, Michael S. Tsirkin,
Jason Wang, Xuan Zhuo, Eugenio Pérez, virtualization,
Jakub Kicinski, Luigi Leonardi
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
commit 059b7dbd20a6f0c539a45ddff1573cb8946685b5 upstream.
virtio_transport_inc_rx_pkt() checks vvs->rx_bytes + len > vvs->buf_alloc.
virtio_transport_recv_enqueue() skips coalescing for packets
with VIRTIO_VSOCK_SEQ_EOM.
If fed with packets with len == 0 and VIRTIO_VSOCK_SEQ_EOM,
a very large number of packets can be queued
because vvs->rx_bytes stays at 0.
Fix this by estimating the skb metadata size:
(Number of skbs in the queue) * SKB_TRUESIZE(0)
Fixes: 077706165717 ("virtio/vsock: don't use skbuff state to account credit")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Stefano Garzarella <sgarzare@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: "Eugenio Pérez" <eperezma@redhat.com>
Cc: virtualization@lists.linux.dev
Link: https://patch.msgid.link/20260430122653.554058-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Cc: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/vmw_vsock/virtio_transport_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -429,7 +429,9 @@ static int virtio_transport_send_pkt_inf
static bool virtio_transport_inc_rx_pkt(struct virtio_vsock_sock *vvs,
u32 len)
{
- if (vvs->buf_used + len > vvs->buf_alloc)
+ u64 skb_overhead = (skb_queue_len(&vvs->rx_queue) + 1) * SKB_TRUESIZE(0);
+
+ if (skb_overhead + vvs->buf_used + len > vvs->buf_alloc)
return false;
vvs->rx_bytes += len;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 199/201] vsock/virtio: fix accept queue count leak on transport mismatch
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (197 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 198/201] vsock/virtio: fix potential unbounded skb queue Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 200/201] drm/amdgpu/vcn3: Avoid overflow on msg bound check Greg Kroah-Hartman
` (7 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dudu Lu, Bobby Eshleman,
Luigi Leonardi, Stefano Garzarella, Michael S. Tsirkin,
Paolo Abeni
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dudu Lu <phx0fer@gmail.com>
commit 52bcb57a4e8a0865a76c587c2451906342ae1b2d upstream.
virtio_transport_recv_listen() calls sk_acceptq_added() before
vsock_assign_transport(). If vsock_assign_transport() fails or
selects a different transport, the error path returns without
calling sk_acceptq_removed(), permanently incrementing
sk_ack_backlog.
After approximately backlog+1 such failures, sk_acceptq_is_full()
returns true, causing the listener to reject all new connections.
Fix by moving sk_acceptq_added() to after the transport validation,
matching the pattern used by vmci_transport and hyperv_transport.
Fixes: c0cfa2d8a788 ("vsock: add multi-transports support")
Signed-off-by: Dudu Lu <phx0fer@gmail.com>
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://patch.msgid.link/20260413131409.19022-1-phx0fer@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Cc: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/vmw_vsock/virtio_transport_common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -1546,8 +1546,6 @@ virtio_transport_recv_listen(struct sock
return -ENOMEM;
}
- sk_acceptq_added(sk);
-
lock_sock_nested(child, SINGLE_DEPTH_NESTING);
child->sk_state = TCP_ESTABLISHED;
@@ -1569,6 +1567,7 @@ virtio_transport_recv_listen(struct sock
return ret;
}
+ sk_acceptq_added(sk);
if (virtio_transport_space_update(child, skb))
child->sk_write_space(child);
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 200/201] drm/amdgpu/vcn3: Avoid overflow on msg bound check
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (198 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 199/201] vsock/virtio: fix accept queue count leak on transport mismatch Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 201/201] drm/amdgpu/vcn4: " Greg Kroah-Hartman
` (6 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, SDL, Benjamin Cheng, Ruijing Dong,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Cheng <benjamin.cheng@amd.com>
commit e6e9faba8100628990cccd13f0f044a648c303cf upstream.
As pointed out by SDL, the previous condition may be vulnerable to
overflow.
Fixes: b193019860d6 ("drm/amdgpu/vcn3: Prevent OOB reads when parsing dec msg")
Cc: SDL <sdl@nppct.ru>
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit db00257ac9e4a51eb2515aaea161a019f7125e10)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
@@ -1972,6 +1972,7 @@ static int vcn_v3_0_dec_msg(struct amdgp
for (i = 0, msg = &msg[6]; i < num_buffers; ++i, msg += 4) {
uint32_t offset, size, *create;
+ uint64_t buf_end;
if (msg[0] != RDECODE_MESSAGE_CREATE)
continue;
@@ -1979,7 +1980,8 @@ static int vcn_v3_0_dec_msg(struct amdgp
offset = msg[1];
size = msg[2];
- if (size < 4 || offset + size > end - addr) {
+ if (size < 4 || check_add_overflow(offset, size, &buf_end) ||
+ buf_end > end - addr) {
DRM_ERROR("VCN message buffer exceeds BO bounds!\n");
r = -EINVAL;
goto out;
^ permalink raw reply [flat|nested] 209+ messages in thread
* [PATCH 7.0 201/201] drm/amdgpu/vcn4: Avoid overflow on msg bound check
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (199 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 200/201] drm/amdgpu/vcn3: Avoid overflow on msg bound check Greg Kroah-Hartman
@ 2026-05-15 15:50 ` Greg Kroah-Hartman
2026-05-15 17:26 ` [PATCH 7.0 000/201] 7.0.9-rc1 review Ronald Warsow
` (5 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-15 15:50 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, SDL, Benjamin Cheng, Ruijing Dong,
Alex Deucher
7.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Cheng <benjamin.cheng@amd.com>
commit 65bce27ea6192320448c30267ffc17ffa094e713 upstream.
As pointed out by SDL, the previous condition may be vulnerable to
overflow.
Fixes: 0a78f2bac142 ("drm/amdgpu/vcn4: Prevent OOB reads when parsing dec msg")
Cc: SDL <sdl@nppct.ru>
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 3c5367d950140d4ec7af830b2268a5a6fdaa3885)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1889,6 +1889,7 @@ static int vcn_v4_0_dec_msg(struct amdgp
for (i = 0, msg = &msg[6]; i < num_buffers; ++i, msg += 4) {
uint32_t offset, size, *create;
+ uint64_t buf_end;
if (msg[0] != RDECODE_MESSAGE_CREATE)
continue;
@@ -1896,7 +1897,8 @@ static int vcn_v4_0_dec_msg(struct amdgp
offset = msg[1];
size = msg[2];
- if (size < 4 || offset + size > end - addr) {
+ if (size < 4 || check_add_overflow(offset, size, &buf_end) ||
+ buf_end > end - addr) {
DRM_ERROR("VCN message buffer exceeds BO bounds!\n");
r = -EINVAL;
goto out;
^ permalink raw reply [flat|nested] 209+ messages in thread
* Re: [PATCH 7.0 016/201] media: mali-c55: Fix wrong comment of ISP block types
2026-05-15 15:47 ` [PATCH 7.0 016/201] media: mali-c55: Fix wrong comment of ISP block types Greg Kroah-Hartman
@ 2026-05-15 16:52 ` Jacopo Mondi
0 siblings, 0 replies; 209+ messages in thread
From: Jacopo Mondi @ 2026-05-15 16:52 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, Daniel Scally, Barnabás Pőcze,
Jacopo Mondi, Hans Verkuil
Hi Greg,
On Fri, May 15, 2026 at 05:47:14PM +0200, Greg Kroah-Hartman wrote:
> 7.0-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
>
> commit df16624248296ce4e8890c7ddcc95f0ccb642bcd upstream.
>
> Some bad copy&paste happened in the description of the ISP block types
> and AWB_CONFIG got mixed up with SHADING_CONFIG.
>
> Fix it by assigning to each block the correct type.
>
> As only the comment is changed, there is no uABI breakage or regression.
I know this is borderline for stable, however it's in a uAPI header
so I considered it worth adding stable to the cc list.
If you don't think it's necessary, feel free to drop the patch.
Thanks
j
>
> Cc: stable@vger.kernel.org
> Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/media/platform/arm/mali-c55/mali-c55-params.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-params.c b/drivers/media/platform/arm/mali-c55/mali-c55-params.c
> index be0e909bcf29..c03a6120ddbf 100644
> --- a/drivers/media/platform/arm/mali-c55/mali-c55-params.c
> +++ b/drivers/media/platform/arm/mali-c55/mali-c55-params.c
> @@ -43,9 +43,9 @@
> * @digital_gain: For header->type == MALI_C55_PARAM_BLOCK_DIGITAL_GAIN
> * @awb_gains: For header->type == MALI_C55_PARAM_BLOCK_AWB_GAINS and
> * header->type = MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP
> - * @awb_config: For header->type == MALI_C55_PARAM_MESH_SHADING_CONFIG
> - * @shading_config: For header->type == MALI_C55_PARAM_MESH_SHADING_SELECTION
> - * @shading_selection: For header->type == MALI_C55_PARAM_BLOCK_SENSOR_OFFS
> + * @awb_config: For header->type == MALI_C55_PARAM_BLOCK_AWB_CONFIG
> + * @shading_config: For header->type == MALI_C55_PARAM_MESH_SHADING_CONFIG
> + * @shading_selection: For header->type == MALI_C55_PARAM_MESH_SHADING_SELECTION
> * @data: Allows easy initialisation of a union variable with a
> * pointer into a __u8 array.
> */
> --
> 2.54.0
>
>
>
^ permalink raw reply [flat|nested] 209+ messages in thread
* Re: [PATCH 7.0 000/201] 7.0.9-rc1 review
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (200 preceding siblings ...)
2026-05-15 15:50 ` [PATCH 7.0 201/201] drm/amdgpu/vcn4: " Greg Kroah-Hartman
@ 2026-05-15 17:26 ` Ronald Warsow
2026-05-15 20:36 ` Florian Fainelli
` (4 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Ronald Warsow @ 2026-05-15 17:26 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,
conor, hargar, broonie, achill, sr
Hi
no regressions here on x86_64 (Intel 11th Gen. CPU)
Thanks
Tested-by: Ronald Warsow <rwarsow@gmx.de>
^ permalink raw reply [flat|nested] 209+ messages in thread
* Re: [PATCH 7.0 000/201] 7.0.9-rc1 review
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (201 preceding siblings ...)
2026-05-15 17:26 ` [PATCH 7.0 000/201] 7.0.9-rc1 review Ronald Warsow
@ 2026-05-15 20:36 ` Florian Fainelli
2026-05-15 22:11 ` Pavel Machek
` (3 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Florian Fainelli @ 2026-05-15 20:36 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, sudipm.mukherjee, rwarsow, conor,
hargar, broonie, achill, sr
On 5/15/26 08:46, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 7.0.9 release.
> There are 201 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 Sun, 17 May 2026 15:46: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/v7.x/stable-review/patch-7.0.9-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-7.0.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] 209+ messages in thread
* Re: [PATCH 7.0 000/201] 7.0.9-rc1 review
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (202 preceding siblings ...)
2026-05-15 20:36 ` Florian Fainelli
@ 2026-05-15 22:11 ` Pavel Machek
2026-05-15 22:43 ` Shuah Khan
` (2 subsequent siblings)
206 siblings, 0 replies; 209+ messages in thread
From: Pavel Machek @ 2026-05-15 22:11 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, rwarsow, conor, hargar, broonie, achill, sr
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
Hi!
> This is the start of the stable review cycle for the 7.0.9 release.
> There are 201 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.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-7.0.y
Tested-by: Pavel Machek (CIP) <pavel@nabladev.com>
Best regards,
Pavel
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 209+ messages in thread
* Re: [PATCH 7.0 000/201] 7.0.9-rc1 review
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (203 preceding siblings ...)
2026-05-15 22:11 ` Pavel Machek
@ 2026-05-15 22:43 ` Shuah Khan
2026-05-16 0:26 ` Takeshi Ogasawara
2026-05-16 1:49 ` Peter Schneider
206 siblings, 0 replies; 209+ messages in thread
From: Shuah Khan @ 2026-05-15 22:43 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,
rwarsow, conor, hargar, broonie, achill, sr, Shuah Khan
On 5/15/26 09:46, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 7.0.9 release.
> There are 201 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 Sun, 17 May 2026 15:46: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/v7.x/stable-review/patch-7.0.9-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-7.0.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] 209+ messages in thread
* Re: [PATCH 7.0 000/201] 7.0.9-rc1 review
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (204 preceding siblings ...)
2026-05-15 22:43 ` Shuah Khan
@ 2026-05-16 0:26 ` Takeshi Ogasawara
2026-05-16 1:49 ` Peter Schneider
206 siblings, 0 replies; 209+ messages in thread
From: Takeshi Ogasawara @ 2026-05-16 0:26 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, rwarsow, conor, hargar, broonie, achill, sr
Hi Greg
On Sat, May 16, 2026 at 2:05 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 7.0.9 release.
> There are 201 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 Sun, 17 May 2026 15:46: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/v7.x/stable-review/patch-7.0.9-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-7.0.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Linux version 7.0.9-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 7.0.9-rc1rv-g64bd48307320
(takeshi@ThinkPadX1Gen10J0764) (gcc (GCC) 16.1.1 20260430, GNU ld (GNU
Binutils) 2.46.0) #1 SMP PREEMPT_DYNAMIC Sat May 16 08:46:38 JST 2026
Thanks
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
^ permalink raw reply [flat|nested] 209+ messages in thread
* Re: [PATCH 7.0 000/201] 7.0.9-rc1 review
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
` (205 preceding siblings ...)
2026-05-16 0:26 ` Takeshi Ogasawara
@ 2026-05-16 1:49 ` Peter Schneider
206 siblings, 0 replies; 209+ messages in thread
From: Peter Schneider @ 2026-05-16 1:49 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,
rwarsow, conor, hargar, broonie, achill, sr
Am 15.05.2026 um 17:46 schrieb Greg Kroah-Hartman:
> This is the start of the stable review cycle for the 7.0.9 release.
> There are 201 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] 209+ messages in thread
end of thread, other threads:[~2026-05-16 1:49 UTC | newest]
Thread overview: 209+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 15:46 [PATCH 7.0 000/201] 7.0.9-rc1 review Greg Kroah-Hartman
2026-05-15 15:46 ` [PATCH 7.0 001/201] HID: playstation: Clamp num_touch_reports Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 002/201] HID: appletb-kbd: fix UAF in inactivity-timer cleanup path Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 003/201] HID: appletb-kbd: run inactivity autodim from workqueues Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 004/201] HID: pass the buffer size to hid_report_raw_event Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 005/201] HID: core: introduce hid_safe_input_report() Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 006/201] HID: pidff: Fix integer overflow in pidff_rescale Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 007/201] media: uvcvideo: Enable VB2_DMABUF for metadata stream Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 008/201] drm/msm/hdmi: Fix wrong CTRL1 register used in writing info frames Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 009/201] media: rzv2h-ivc: Avoid double job scheduling Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 010/201] media: nxp: imx8-isi: Reduce minimum queued buffers from 2 to 0 Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 011/201] media: rzv2h-ivc: Write AXIRX_PIXFMT once Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 012/201] media: rzv2h-ivc: Fix FM_STOP register write Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 013/201] media: rzv2h-ivc: Fix concurrent buffer list access Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 014/201] media: mali-c55: Initialize the ISP in enable_streams() Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 015/201] media: mali-c55: Fix Iridix bypass macros Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 016/201] media: mali-c55: Fix wrong comment of ISP block types Greg Kroah-Hartman
2026-05-15 16:52 ` Jacopo Mondi
2026-05-15 15:47 ` [PATCH 7.0 017/201] media: renesas: vsp1: Fix NULL pointer deref on module unload Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 018/201] media: renesas: vin: Fix RAW8 (again) Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 019/201] media: i2c: ov8856: free control handler on error in ov8856_init_controls() Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 020/201] media: dt-bindings: rockchip,vdec: Add alternative reg-names order for RK35{76,88} Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 021/201] media: dt-bindings: rockchip,vdec: Mark reg-names required " Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 022/201] media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init() Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 023/201] media: chips-media: wave5: add missing spinlock protection for send_eos_event() Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 024/201] media: chips-media: wave5: add missing spinlock protection for handle_dynamic_resolution_change() Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 025/201] arm64: dts: freescale: imx95-toradex-smarc: fix PMIC_SD2_VSEL label position Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 026/201] drm/gpusvm: Allow device pages to be mapped in mixed mappings after system pages Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 027/201] drm/gpusvm: Force unmapping on error in drm_gpusvm_get_pages Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 028/201] spi: bcm63xx: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 029/201] spi: atmel: " Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 030/201] arm64: dts: lx2160a-cex7/lx2162a-sr-som: fix usd-cd & gpio pinmux Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 031/201] staging: media: atomisp: Disallow all private IOCTLs Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 032/201] regulator: mt6357: fix OF node reference imbalance Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 033/201] spi: st-ssc4: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 034/201] regulator: max77650: fix OF node reference imbalance Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 035/201] media: ti: vpe: Add missing v4l2_device_unregister in vip_remove() Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 036/201] media: rc: xbox_remote: heed DMA restrictions Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 037/201] media: rc: streamzap: Error handling in probe Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 038/201] media: i2c: ov5647: Fix runtime PM refcount leak in s_ctrl Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 039/201] media: i2c: imx283: Enter full standby when stopping streaming Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 040/201] regulator: bq257xx: fix OF node reference imbalance Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 041/201] regulator: rk808: " Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 042/201] media: videobuf2: Set vma_flags in vb2_dma_sg_mmap Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 043/201] media: rockchip: rkcif: Add missing MUST_CONNECT flag to pads Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 044/201] media: mali-c55: Fully reset the ISP configuration Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 045/201] media: intel/ipu6: fix error pointer dereference Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 046/201] media: i2c: imx283: Fix hang when going from large to small resolution Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 047/201] regulator: act8945a: fix OF node reference imbalance Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 048/201] regulator: s2dos05: " Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 049/201] regulator: bd9571mwv: " Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 050/201] spi: lantiq-ssc: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 051/201] spi: meson-spicc: " Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 052/201] spi: qup: " Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 053/201] arm64: dts: ti: k3-am69-aquila-clover: Fix DP regulator enable GPIO Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 054/201] spi: at91-usart: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 055/201] media: ipu-bridge: Add upside-down sensor DMI quirk for Dell XPS 13 9340 and XPS 14 9440 Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 056/201] media: saa7164: add ioremap return checks and cleanups Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 057/201] spi: amlogic-spisg: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 058/201] spi: aspeed-smc: " Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 059/201] drm/colorop: Preserve bypass value in duplicate_state() Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 060/201] drm/atomic: Add affected colorops with affected planes Greg Kroah-Hartman
2026-05-15 15:47 ` [PATCH 7.0 061/201] platform/x86: hp-wmi: Ignore backlight and FnLock events Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 062/201] vsock/virtio: fix MSG_PEEK ignoring skb offset when calculating bytes to copy Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 063/201] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add fixes for pinctrl/pinctrl_aon Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 064/201] arm64: dts: broadcom: bcm2712-d-rpi-5-b: update uart10 interrupt Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 065/201] media: pci: zoran: fix potential memory leak in zoran_probe() Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 066/201] media: dib8000: avoid division by 0 in dib8000_set_dds() Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 067/201] media: i2c: imx412: Assert reset GPIO during probe Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 068/201] media: staging: imx: request mbus_config in csi_start Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 069/201] media: i2c: ov08d10: fix image vertical start setting Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 070/201] media: i2c: ov08d10: fix runtime PM handling in probe Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 071/201] media: omap3isp: drop the use count of v4l2 pipeline Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 072/201] media: iris: fix QCOM_MDT_LOADER dependency Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 073/201] media: iris: Fix use-after-free in iris_release_internal_buffers() Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 074/201] media: qcom: camss: Fix csid clock configuration for sa8775p Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 075/201] media: qcom: camss: Fix csid IRQ offset " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 076/201] media: qcom: iris: increase H265D_MAX_SLICE to fix H.265 decoding on SC7280 Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 077/201] media: venus: fix QCOM_MDT_LOADER dependency Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 078/201] media: iris: Fix dma_free_attrs() size in iris_hfi_queues_init() Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 079/201] media: iris: fix use-after-free of fmt_src during MBPF check Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 080/201] media: iris: switch to hardware mode after firmware boot Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 081/201] media: qcom: camss: Add missing clocks for VFE lite on sa8775p Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 082/201] drm/xe/hdcp: Add NULL check for media_gt in intel_hdcp_gsc_check_status() Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 083/201] spi: mxs: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 084/201] spi: mt65xx: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 085/201] spi: dln2: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 086/201] spi: s3c64xx: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 087/201] spi: fsl-espi: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 088/201] spi: omap2-mcspi: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 089/201] spi: pic32: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 090/201] spi: ep93xx: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 091/201] spi: mtk-nor: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 092/201] spi: pl022: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 093/201] spi: ch341: fix devres lifetime Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 094/201] spi: sh-hspi: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 095/201] spi: fsl: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 096/201] spi: bcmbca-hsspi: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 097/201] spi: coldfire-qspi: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 098/201] spi: npcm-pspi: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 099/201] spi: cavium-thunderx: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 100/201] spi: pic32-sqi: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 101/201] spi: sprd: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 102/201] spi: rspi: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 103/201] spi: sh-msiof: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 104/201] spi: slave-mt27xx: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 105/201] spi: img-spfi: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 106/201] spi: mpfs: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 107/201] spi: octeon: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 108/201] spi: imx: fix runtime pm leak on probe deferral Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 109/201] spi: mxic: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 110/201] spi: orion: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 111/201] spi: orion: fix runtime pm leak on unbind Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 112/201] spi: orion: fix clock imbalance on registration failure Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 113/201] spi: mpc52xx: fix use-after-free " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 114/201] spi: mpc52xx: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 115/201] spi: mpc52xx: fix use-after-free on unbind Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 116/201] spi: cadence: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 117/201] spi: cadence-quadspi: " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 118/201] spi: cadence: fix unclocked access on unbind Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 119/201] spi: cadence: fix clock imbalance on probe failure Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 120/201] spi: cadence-quadspi: fix runtime pm disable " Greg Kroah-Hartman
2026-05-15 15:48 ` [PATCH 7.0 121/201] spi: cadence-quadspi: fix clock " Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 122/201] spi: cadence-quadspi: fix runtime pm and clock imbalance on unbind Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 123/201] spi: cadence-quadspi: fix unclocked access " Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 124/201] drm/msm/gem: fix error handling in msm_ioctl_gem_info_get_metadata() Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 125/201] drm/colorop: Fix blob property reference tracking in state lifecycle Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 126/201] drm/imx: parallel-display: Prefer bus format set via legacy "interface-pix-fmt" DT property Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 127/201] drm/msm: always recover the gpu Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 128/201] drm/v3d: Reject empty multisync extension to prevent infinite loop Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 129/201] drm/i915/psr: Init variable to avoid early exit from et alignment loop Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 130/201] drm/amdkfd: Clear VRAM on allocation to prevent stale data exposure Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 131/201] drm/amd/display: fix math_mod() using arg1 instead of arg2 Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 132/201] drm/amd: Add missing firmware declaration for PSP v15.0.0 Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 133/201] drm/amdgpu: Use NBIF offset for register RCC_STRAP0_RCC_DEV0_EPF0_STRAP0 Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 134/201] drm/amdgpu: Use SMUIO 15.0.0 offsets for TSC upper and lower count Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 135/201] drm/amdgpu: gate VM CPU HDP flush on reset lock Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 136/201] drm/amd/pm: fix incorrect FeatureCtrlMask setting on smu v14.0.x Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 137/201] drm/amdkfd: Add upper bound check for num_of_nodes Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 138/201] drm/amdgpu: Add bounds checking to ib_{get,set}_value Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 139/201] drm/amdgpu/vcn4: Prevent OOB reads when parsing IB Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 140/201] drm/amdgpu/vce: Prevent partial address patches Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 141/201] drm/amdgpu/vcn4: Prevent OOB reads when parsing dec msg Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 142/201] drm/amdgpu/vcn3: " Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 143/201] drm/amd/display: Change dither policy for 10 bpc output back to dithering Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 144/201] drm/gem: Fix inconsistent plane dimension calculation in drm_gem_fb_init_with_funcs() Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 145/201] drm/appletbdrm: Use kvzalloc for big allocations Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 146/201] drm/amdkfd: validate SVM ioctl nattr against buffer size Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 147/201] drm/amdgpu: Avoid reset in AMDGPU unload path for APUs with GFX V11 and higher Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 148/201] drm/udl: Increase GET_URB_TIMEOUT Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 149/201] drm/xe: Fix bo leak in xe_dma_buf_init_obj() on allocation failure Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 150/201] drm/xe/bo: Fix bo leak on GGTT flag validation in xe_bo_init_locked() Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 151/201] drm/xe: Fix dma-buf attachment leak in xe_gem_prime_import() Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 152/201] drm/xe/bo: Fix bo leak on unaligned size validation in xe_bo_init_locked() Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 153/201] drm/xe/uapi: Reject coh_none PAT index for CPU cached memory in madvise Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 154/201] drm: Set old handle to NULL before prime swap in change_handle Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 155/201] drm/radeon: add missing revision check for CI Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 156/201] drm/amdgpu: zero-initialize GART table on allocation Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 157/201] drm/exynos: remove bridge when component_add fails Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 158/201] drm/amdgpu/userq: fix access to stale wptr mapping Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 159/201] drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 160/201] drm/amdgpu/gfx9: drop unnecessary 64-bit fence flag check in KIQ Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 161/201] drm/bridge: tda998x: Use __be32 for audio port OF property pointer Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 162/201] drm/sti: remove bridge when sti_hda component_add fails Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 163/201] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 164/201] drm/amdkfd: Make all TLB-flushes heavy-weight Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 165/201] drm/amdgpu/sdma4: replace BUG_ON with WARN_ON in fence emission Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 166/201] drm/amdgpu/pm: add missing revision check for CI Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 167/201] drm/amdgpu/pm: align Hawaii mclk workaround with radeon Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 168/201] arm64: dts: qcom: kodiak: Fix PCIe1 PHY ref clock voting Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 169/201] arm64: dts: qcom: lemans: Correct QUP interrupt numbers Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 170/201] arm64: dts: ti: k3-am62a7-sk: Fix pin name in comment from M19 to N22 Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 171/201] arm64: dts: ti: k3-am69-aquila-dev: Fix DP regulator enable GPIO Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 172/201] sctp: revalidate list cursor after sctp_sendmsg_to_asoc() in SCTP_SENDALL Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 173/201] batman-adv: fix integer overflow on buff_pos Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 174/201] batman-adv: reject new tp_meter sessions during teardown Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 175/201] batman-adv: stop tp_meter sessions during mesh teardown Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 176/201] batman-adv: stop caching unowned originator pointers in BAT IV Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 177/201] batman-adv: tp_meter: fix tp_num leak on kmalloc failure Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 178/201] batman-adv: bla: prevent use-after-free when deleting claims Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 179/201] batman-adv: bla: only purge non-released claims Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 180/201] batman-adv: bla: put backbone reference on failed claim hash insert Greg Kroah-Hartman
2026-05-15 15:49 ` [PATCH 7.0 181/201] sched_ext: Use HK_TYPE_DOMAIN_BOOT to detect isolcpus= domain isolation Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 182/201] usb: typec: tcpm: reset internal port states on soft reset AMS Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 183/201] io_uring/zcrx: use guards for locking Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 184/201] io_uring/zcrx: warn on freelist violations Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 185/201] kho: fix error handling in kho_add_subtree() Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 186/201] EDAC/versalnet: Refactor memory controller initialization and cleanup Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 187/201] EDAC/versalnet: Fix device name memory leak Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 188/201] spi: uniphier: Simplify clock handling with devm_clk_get_enabled() Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 189/201] spi: uniphier: fix controller deregistration Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 190/201] cgroup: Increment nr_dying_subsys_* from rmdir context Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 191/201] cgroup: Defer css percpu_ref kill on rmdir until cgroup is depopulated Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 192/201] sched_ext: Skip tasks with stale task_rq in bypass_lb_cpu() Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 193/201] perf build: fix "argument list too long" in second location Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 194/201] mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap() Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 195/201] vsock: fix buffer size clamping order Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 196/201] vsock/virtio: fix length and offset in tap skb for split packets Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 197/201] vsock/virtio: fix empty payload in tap skb for non-linear buffers Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 198/201] vsock/virtio: fix potential unbounded skb queue Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 199/201] vsock/virtio: fix accept queue count leak on transport mismatch Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 200/201] drm/amdgpu/vcn3: Avoid overflow on msg bound check Greg Kroah-Hartman
2026-05-15 15:50 ` [PATCH 7.0 201/201] drm/amdgpu/vcn4: " Greg Kroah-Hartman
2026-05-15 17:26 ` [PATCH 7.0 000/201] 7.0.9-rc1 review Ronald Warsow
2026-05-15 20:36 ` Florian Fainelli
2026-05-15 22:11 ` Pavel Machek
2026-05-15 22:43 ` Shuah Khan
2026-05-16 0:26 ` Takeshi Ogasawara
2026-05-16 1:49 ` Peter Schneider
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox