linux/include
Tomi Valkeinen 5b0057459c media: v4l2-subdev: Fix alloc failure check in v4l2_subdev_call_state_try()
commit f37df9a0eb upstream.

v4l2_subdev_call_state_try() macro allocates a subdev state with
__v4l2_subdev_state_alloc(), but does not check the returned value. If
__v4l2_subdev_state_alloc fails, it returns an ERR_PTR, and that would
cause v4l2_subdev_call_state_try() to crash.

Add proper error handling to v4l2_subdev_call_state_try().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Fixes: 982c048718 ("media: subdev: Add v4l2_subdev_call_state_try() macro")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/aJTNtpDUbTz7eyJc%40stanley.mountain/
Cc: stable@vger.kernel.org
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
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>
History 2025-10-19 16:23:05 +02:00
..
acpi ACPICA: Avoid sequence overread in call to strncmp() 2025-06-27 11:07:32 +01:00
asm-generic Drivers: hv: Change hv_free_hyperv_page() to take void * argument 2025-07-06 10:57:58 +02:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2025-01-09 13:29:56 +01:00
crypto crypto: sha256 - fix crash at kexec 2025-10-15 11:56:20 +02:00
drm drm/gem: Fix race in drm_gem_handle_create_tail() 2025-07-17 18:32:08 +02:00
dt-bindings ASoC: qcom: q6dsp: add support to more display ports 2025-05-02 07:46:53 +02:00
keys certs: Move load_certificate_list() to be with the asymmetric keys code 2022-06-21 16:05:06 +01:00
kunit kunit: add macro to allow conditionally exposing static symbols to tests 2023-11-20 11:52:08 +01:00
kvm KVM: arm64: Fix host-programmed guest events in nVHE 2024-04-10 16:28:23 +02:00
linux iio: frequency: adf4350: Fix ADF4350_REG3_12BIT_CLKDIV_MODE 2025-10-19 16:23:05 +02:00
math-emu powerpc/math-emu: Remove -w build flag and fix warnings 2022-09-05 17:28:25 +10:00
media media: v4l2-subdev: Fix alloc failure check in v4l2_subdev_call_state_try() 2025-10-19 16:23:05 +02:00
memory memory: renesas-rpc-if: Remove Runtime PM wrappers 2024-12-14 19:53:37 +01:00
misc ocxl: Update the Process Element Entry 2020-12-04 01:01:30 +11:00
net Bluetooth: hci_event: Fix UAF in hci_acl_create_conn_sync 2025-10-02 13:40:39 +02:00
pcmcia ARM: pxa/sa1100: move I/O space to PCI_IOBASE 2022-05-07 22:56:17 +02:00
ras mm, hwpoison: enable memory error handling on 1GB hugepage 2022-08-08 18:06:44 -07:00
rdma RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject() 2025-06-04 14:40:06 +02:00
rv rv: Reset per-task monitors also for idle tasks 2025-02-21 13:49:47 +01:00
scsi scsi: core: Fix the return value of scsi_logical_block_count() 2024-08-29 17:30:49 +02:00
soc net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged 2025-05-09 09:41:39 +02:00
sound ASoC: soc-dai.h: merge DAI call back functions into ops 2025-08-28 16:26:03 +02:00
target scsi: target: Fix multiple LUN_RESET handling 2023-05-11 23:03:19 +09:00
trace filelock: add FL_RECLAIM to show_fl_flags() macro 2025-10-15 11:56:25 +02:00
uapi mptcp: pm: nl: announce deny-join-id0 flag 2025-09-25 10:58:54 +02:00
ufs scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions 2025-02-21 13:49:42 +01:00
vdso time64.h: Consolidated PSEC_PER_SEC definition 2021-04-06 16:32:17 -07:00
video video: Provide constants for VGA I/O range 2022-07-19 13:19:11 +02:00
xen xen/mcelog: Add __nonstring annotations for unterminated strings 2025-04-25 10:43:27 +02:00