--- /dev/null
+From 70008aee892bbb5c2969bbe9e5778fc081b14bd2 Mon Sep 17 00:00:00 2001
+From: Josua Mayer <josua@solid-run.com>
+Date: Tue, 24 Mar 2026 13:40:55 +0100
+Subject: arm64: dts: lx2160a-cex7/lx2162a-sr-som: fix usd-cd & gpio pinmux
+
+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
+@@ -1717,6 +1717,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)>;
+ };
+@@ -1749,6 +1753,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>;
++};
--- /dev/null
+From 556dba95473900073a6c03121361c11f646dc551 Mon Sep 17 00:00:00 2001
+From: Matthew Brost <matthew.brost@intel.com>
+Date: Fri, 30 Jan 2026 11:49:27 -0800
+Subject: drm/gpusvm: Force unmapping on error in drm_gpusvm_get_pages
+
+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
+@@ -1443,6 +1443,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:
--- /dev/null
+From 8c6c93b7db42d15c6e8c2540a648d32986a04b1a Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
+Date: Wed, 11 Mar 2026 20:16:21 +0100
+Subject: drm/msm/hdmi: Fix wrong CTRL1 register used in writing info frames
+
+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
+@@ -80,7 +80,7 @@ static int msm_hdmi_config_avi_infoframe
+ 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);
+@@ -116,7 +116,7 @@ static int msm_hdmi_config_audio_infofra
+ 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 |
--- /dev/null
+From 4db2af929279c799b5653a39eb0795c72baffca4 Mon Sep 17 00:00:00 2001
+From: Sangyun Kim <sangyun.kim@snu.ac.kr>
+Date: Mon, 20 Apr 2026 14:13:17 +0900
+Subject: HID: appletb-kbd: fix UAF in inactivity-timer cleanup path
+
+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);
+ }
+
+ #ifdef CONFIG_PM
--- /dev/null
+From 1654e53349d4e657b331de354313461f401f5063 Mon Sep 17 00:00:00 2001
+From: Sangyun Kim <sangyun.kim@snu.ac.kr>
+Date: Mon, 20 Apr 2026 14:13:18 +0900
+Subject: HID: appletb-kbd: run inactivity autodim from workqueues
+
+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);
+ }
+ }
--- /dev/null
+From 206342541fc887ae919774a43942dc883161fece Mon Sep 17 00:00:00 2001
+From: Benjamin Tissoires <bentiss@kernel.org>
+Date: Mon, 4 May 2026 10:47:23 +0200
+Subject: HID: core: introduce hid_safe_input_report()
+
+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
+@@ -990,6 +990,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);
--- /dev/null
+From 2c85c61d1332e1e16f020d76951baf167dcb6f7a Mon Sep 17 00:00:00 2001
+From: Benjamin Tissoires <bentiss@kernel.org>
+Date: Mon, 4 May 2026 10:47:22 +0200
+Subject: HID: pass the buffer size to hid_report_raw_event
+
+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);
+@@ -508,7 +510,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
+@@ -3664,7 +3664,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
+@@ -531,7 +531,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
+@@ -1258,8 +1258,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,
--- /dev/null
+From 48d1677779ad6816978ad4a4f7588aec5ec960fe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tomasz=20Paku=C5=82a?= <tomasz.pakula.oficjalny@gmail.com>
+Date: Sun, 10 May 2026 14:23:52 +0200
+Subject: HID: pidff: Fix integer overflow in pidff_rescale
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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;
+ }
+
+ /*
--- /dev/null
+From cac61b58a3b6340c52afa06bb15eac033158db2f Mon Sep 17 00:00:00 2001
+From: "T.J. Mercier" <tjmercier@google.com>
+Date: Fri, 17 Apr 2026 08:47:02 -0700
+Subject: HID: playstation: Clamp num_touch_reports
+
+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 &&
--- /dev/null
+From cb8bdd3ffca280d014311ab395651d33f58a8708 Mon Sep 17 00:00:00 2001
+From: Ziyi Guo <n7l8m4@u.northwestern.edu>
+Date: Sat, 31 Jan 2026 22:19:07 +0000
+Subject: media: chips-media: wave5: add missing spinlock protection for handle_dynamic_resolution_change()
+
+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
+@@ -1544,6 +1544,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));
+
+@@ -1565,7 +1566,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;
+ }
--- /dev/null
+From f48050436746be75227fbc90066a8658cbe94d17 Mon Sep 17 00:00:00 2001
+From: Ziyi Guo <n7l8m4@u.northwestern.edu>
+Date: Sat, 31 Jan 2026 22:03:23 +0000
+Subject: media: chips-media: wave5: add missing spinlock protection for send_eos_event()
+
+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
+@@ -1265,13 +1265,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);
+@@ -1415,8 +1419,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;
--- /dev/null
+From 95bd174a453f77b09ea66e1e22834680754ba501 Mon Sep 17 00:00:00 2001
+From: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
+Date: Sun, 25 Jan 2026 22:19:15 +0800
+Subject: media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init()
+
+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;
+ }
+
--- /dev/null
+From 35c8178ed2bd9821a75a406d762b2f2e161f9c70 Mon Sep 17 00:00:00 2001
+From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
+Date: Wed, 4 Mar 2026 23:00:41 +0200
+Subject: media: dt-bindings: rockchip,vdec: Add alternative reg-names order for RK35{76,88}
+
+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
+@@ -27,16 +27,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
--- /dev/null
+From a11db8d8b403eba1f82728f440727128e9997edd Mon Sep 17 00:00:00 2001
+From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
+Date: Wed, 4 Mar 2026 23:00:40 +0200
+Subject: media: dt-bindings: rockchip,vdec: Mark reg-names required for RK35{76,88}
+
+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
+@@ -126,6 +126,8 @@ allOf:
+ minItems: 5
+ reset-names:
+ minItems: 5
++ required:
++ - reg-names
+ else:
+ properties:
+ reg:
--- /dev/null
+From bce1349dbf6348ddee47308e2ed08878356de317 Mon Sep 17 00:00:00 2001
+From: Jai Luthra <jai.luthra@ideasonboard.com>
+Date: Sat, 14 Feb 2026 18:35:21 +0530
+Subject: media: i2c: imx283: Enter full standby when stopping streaming
+
+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");
+
--- /dev/null
+From 9206359b2c396ff594adf39bc7daaadab0fcb367 Mon Sep 17 00:00:00 2001
+From: Jai Luthra <jai.luthra@ideasonboard.com>
+Date: Sat, 14 Feb 2026 18:35:22 +0530
+Subject: media: i2c: imx283: Fix hang when going from large to small resolution
+
+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");
+
--- /dev/null
+From f75e160745663ce9b13362ae6e90bd439c58df69 Mon Sep 17 00:00:00 2001
+From: Alexander Koskovich <akoskovich@pm.me>
+Date: Thu, 12 Mar 2026 17:16:20 +0000
+Subject: media: i2c: ov8856: free control handler on error in ov8856_init_controls()
+
+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,
--- /dev/null
+From 8dd088b8b106f7b119664f965b691785998edcfb Mon Sep 17 00:00:00 2001
+From: Ethan Tidmore <ethantidmore06@gmail.com>
+Date: Fri, 6 Mar 2026 21:03:55 -0600
+Subject: media: intel/ipu6: fix error pointer dereference
+
+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);
+ }
--- /dev/null
+From 2f38622d0f85f317be9e6b131da6cd511db94fd2 Mon Sep 17 00:00:00 2001
+From: Guoniu Zhou <guoniu.zhou@nxp.com>
+Date: Thu, 12 Mar 2026 11:12:34 +0800
+Subject: media: nxp: imx8-isi: Reduce minimum queued buffers from 2 to 0
+
+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;
+
--- /dev/null
+From 42844992664f03ef9f930e64f7370fa481e9c267 Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Wed, 11 Feb 2026 19:06:21 +0100
+Subject: media: rc: streamzap: Error handling in probe
+
+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:
--- /dev/null
+From e280d1e5e3f2595bbb43fe6e1bce00c59a43c0ff Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Wed, 11 Feb 2026 19:09:44 +0100
+Subject: media: rc: xbox_remote: heed DMA restrictions
+
+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);
+ }
+
--- /dev/null
+From 40c6da8a9c0f897f99a439330584d93ca7d41226 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
+Date: Tue, 27 Jan 2026 10:56:12 +0200
+Subject: media: renesas: vin: Fix RAW8 (again)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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;
--- /dev/null
+From 58b1e9664d8f74d55d8411cc7a7b275a76a6f24f Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
+Date: Thu, 15 Jan 2026 11:22:35 +0200
+Subject: media: renesas: vsp1: Fix NULL pointer deref on module unload
+
+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(-)
+
+diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drv.c b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
+index 2de515c497eb..627b5046fa80 100644
+--- 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 vsp1_device *vsp1)
+ 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)
+--
+2.54.0
+
--- /dev/null
+From d51c60a498e83c9a79884c8e420f97e3885c9583 Mon Sep 17 00:00:00 2001
+From: Wang Jun <1742789905@qq.com>
+Date: Mon, 16 Mar 2026 20:24:01 +0800
+Subject: media: saa7164: add ioremap return checks and cleanups
+
+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;
--- /dev/null
+From fbac03467e53d8d72e5099c03df26d9adae11416 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda <ribalda@chromium.org>
+Date: Mon, 9 Mar 2026 15:01:54 +0000
+Subject: media: uvcvideo: Enable VB2_DMABUF for metadata stream
+
+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;
+ }
--- /dev/null
+From 7254b31a13aaa0c2c0f9ffbc335b718656117ff4 Mon Sep 17 00:00:00 2001
+From: Janne Grunau <j@jannau.net>
+Date: Sun, 15 Feb 2026 18:42:59 +0100
+Subject: media: videobuf2: Set vma_flags in vb2_dma_sg_mmap
+
+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.
+ */
--- /dev/null
+From 0d15ce31375ccef4162f960b34547a821b7619d2 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 8 Apr 2026 09:30:54 +0200
+Subject: regulator: act8945a: fix OF node reference imbalance
+
+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],
--- /dev/null
+From 8498100ee1d00422b8c5b161b3e332278b92a59a Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 8 Apr 2026 09:30:55 +0200
+Subject: regulator: bd9571mwv: fix OF node reference imbalance
+
+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;
+
--- /dev/null
+From 7ea07bc030d8d6395524dec22ff3267441a28c0d Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 8 Apr 2026 09:30:49 +0200
+Subject: regulator: bq257xx: fix OF node reference imbalance
+
+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)
--- /dev/null
+From 2edaf5f7ada0ab5c9ec1f0836bd19779a8d85262 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 8 Apr 2026 09:30:51 +0200
+Subject: regulator: max77650: fix OF node reference imbalance
+
+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);
--- /dev/null
+From 2f38e96c273e15f5e9f5d1fc2c0cbba703751602 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 8 Apr 2026 09:30:52 +0200
+Subject: regulator: mt6357: fix OF node reference imbalance
+
+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;
--- /dev/null
+From 65290b24d8a5f0b8cd065201e653db824c4a4da6 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 8 Apr 2026 09:30:50 +0200
+Subject: regulator: rk808: fix OF node reference imbalance
+
+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
+@@ -1875,8 +1875,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)
--- /dev/null
+From ebe694d67f159899b063eee61bacda4cb825ed7b Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 8 Apr 2026 09:30:53 +0200
+Subject: regulator: s2dos05: fix OF node reference imbalance
+
+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;
ptrace-slightly-saner-get_dumpable-logic.patch
+hid-playstation-clamp-num_touch_reports.patch
+hid-appletb-kbd-fix-uaf-in-inactivity-timer-cleanup-path.patch
+hid-appletb-kbd-run-inactivity-autodim-from-workqueues.patch
+hid-pass-the-buffer-size-to-hid_report_raw_event.patch
+hid-core-introduce-hid_safe_input_report.patch
+hid-pidff-fix-integer-overflow-in-pidff_rescale.patch
+media-uvcvideo-enable-vb2_dmabuf-for-metadata-stream.patch
+drm-msm-hdmi-fix-wrong-ctrl1-register-used-in-writing-info-frames.patch
+media-nxp-imx8-isi-reduce-minimum-queued-buffers-from-2-to-0.patch
+media-renesas-vsp1-fix-null-pointer-deref-on-module-unload.patch
+media-renesas-vin-fix-raw8-again.patch
+media-i2c-ov8856-free-control-handler-on-error-in-ov8856_init_controls.patch
+media-dt-bindings-rockchip-vdec-add-alternative-reg-names-order-for-rk35-76-88.patch
+media-dt-bindings-rockchip-vdec-mark-reg-names-required-for-rk35-76-88.patch
+media-chips-media-wave5-fix-a-potential-memory-leak-in-wave5_vdi_init.patch
+media-chips-media-wave5-add-missing-spinlock-protection-for-send_eos_event.patch
+media-chips-media-wave5-add-missing-spinlock-protection-for-handle_dynamic_resolution_change.patch
+drm-gpusvm-force-unmapping-on-error-in-drm_gpusvm_get_pages.patch
+spi-bcm63xx-fix-controller-deregistration.patch
+spi-atmel-fix-controller-deregistration.patch
+arm64-dts-lx2160a-cex7-lx2162a-sr-som-fix-usd-cd-gpio-pinmux.patch
+staging-media-atomisp-disallow-all-private-ioctls.patch
+regulator-mt6357-fix-of-node-reference-imbalance.patch
+spi-st-ssc4-fix-controller-deregistration.patch
+regulator-max77650-fix-of-node-reference-imbalance.patch
+media-rc-xbox_remote-heed-dma-restrictions.patch
+media-rc-streamzap-error-handling-in-probe.patch
+media-i2c-imx283-enter-full-standby-when-stopping-streaming.patch
+regulator-bq257xx-fix-of-node-reference-imbalance.patch
+regulator-rk808-fix-of-node-reference-imbalance.patch
+media-videobuf2-set-vma_flags-in-vb2_dma_sg_mmap.patch
+media-intel-ipu6-fix-error-pointer-dereference.patch
+media-i2c-imx283-fix-hang-when-going-from-large-to-small-resolution.patch
+regulator-act8945a-fix-of-node-reference-imbalance.patch
+regulator-s2dos05-fix-of-node-reference-imbalance.patch
+regulator-bd9571mwv-fix-of-node-reference-imbalance.patch
+spi-lantiq-ssc-fix-controller-deregistration.patch
+spi-meson-spicc-fix-controller-deregistration.patch
+spi-qup-fix-controller-deregistration.patch
+spi-at91-usart-fix-controller-deregistration.patch
+media-saa7164-add-ioremap-return-checks-and-cleanups.patch
+spi-amlogic-spisg-fix-controller-deregistration.patch
+spi-aspeed-smc-fix-controller-deregistration.patch
--- /dev/null
+From 84d31bb1f6256eea0db6cf64a3c7a53145f92bb9 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 9 Apr 2026 14:04:00 +0200
+Subject: spi: amlogic-spisg: fix controller deregistration
+
+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
+@@ -801,7 +801,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;
+@@ -824,6 +824,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);
--- /dev/null
+From 1044e5a4ccd57bf5a64f90100a321b498e0267a2 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 9 Apr 2026 14:04:01 +0200
+Subject: spi: aspeed-smc: fix controller deregistration
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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
+@@ -726,7 +726,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;
+
+@@ -765,7 +765,7 @@ static int aspeed_spi_probe(struct platf
+ ctlr->num_chipselect = data->max_cs;
+ ctlr->dev.of_node = dev->of_node;
+
+- ret = devm_spi_register_controller(dev, ctlr);
++ ret = spi_register_controller(ctlr);
+ if (ret)
+ dev_err(&pdev->dev, "spi_register_controller failed\n");
+
+@@ -774,7 +774,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);
+ }
--- /dev/null
+From 9acecc9bcff058eaef40fd7a4c3650e88b06b220 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 9 Apr 2026 14:04:02 +0200
+Subject: spi: at91-usart: fix controller deregistration
+
+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 = {
--- /dev/null
+From 8d4de97e83520be89d0ff40610ca633b3963a7de Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 9 Apr 2026 14:04:03 +0200
+Subject: spi: atmel: fix controller deregistration
+
+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
+@@ -1655,7 +1655,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;
+
+@@ -1689,8 +1689,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);
+@@ -1717,6 +1721,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)
--- /dev/null
+From c39e65a4e3b8e764efed0b2f5152a1a8547b80fd Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 9 Apr 2026 14:04:04 +0200
+Subject: spi: bcm63xx: fix controller deregistration
+
+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
+@@ -603,7 +603,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;
+@@ -626,11 +626,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)
--- /dev/null
+From b99206710d032c16b7f8b75e4bc18414d8e4b9f4 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 9 Apr 2026 14:04:15 +0200
+Subject: spi: lantiq-ssc: fix controller deregistration
+
+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
+@@ -995,7 +995,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;
+@@ -1017,6 +1017,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);
+@@ -1025,6 +1029,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 = {
--- /dev/null
+From 77953c76bec9af4191f8692a10225dd816208718 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 9 Apr 2026 14:04:16 +0200
+Subject: spi: meson-spicc: fix controller deregistration
+
+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
+@@ -1082,7 +1082,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;
+@@ -1100,8 +1100,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 = {
--- /dev/null
+From 443e3a0005a4342b218b6dbd4c6387d3c7fed85a Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Fri, 10 Apr 2026 10:17:39 +0200
+Subject: spi: qup: fix controller deregistration
+
+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
+@@ -1194,7 +1194,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;
+
+@@ -1321,6 +1321,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) {
+@@ -1340,6 +1344,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[] = {
--- /dev/null
+From 19857374010d06ca6a2f7c2c53464122eb804df0 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Fri, 10 Apr 2026 10:17:47 +0200
+Subject: spi: st-ssc4: fix controller deregistration
+
+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);
+ }
+
--- /dev/null
+From 2b7eb2c5dc72f0fc954ac4aa155f9e285e937f7c Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@linux.intel.com>
+Date: Thu, 26 Feb 2026 15:10:54 +0200
+Subject: staging: media: atomisp: Disallow all private IOCTLs
+
+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
+@@ -1357,6 +1357,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;