Go to file
Tomi Valkeinen a553530b33 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>
2025-10-19 16:37:01 +02:00
arch KVM: SVM: Emulate PERF_CNTR_GLOBAL_STATUS_SET for PerfMonV2 2025-10-19 16:37:01 +02:00
block blk-throttle: fix throtl_data leak during disk release 2025-10-15 12:03:34 +02:00
certs
crypto KEYS: X.509: Fix Basic Constraints CA flag parsing 2025-10-15 12:04:11 +02:00
Documentation Documentation: trace: historgram-design: Separate sched_waking histogram section heading and the following diagram 2025-10-15 12:04:01 +02:00
drivers cpufreq: Make drivers using CPUFREQ_ETERNAL specify transition latency 2025-10-19 16:37:00 +02:00
fs listmount: don't call path_put() under namespace semaphore 2025-10-19 16:36:59 +02:00
include media: v4l2-subdev: Fix alloc failure check in v4l2_subdev_call_state_try() 2025-10-19 16:37:01 +02:00
init Fix CC_HAS_ASM_GOTO_OUTPUT on non-x86 architectures 2025-10-15 12:03:13 +02:00
io_uring io_uring/zcrx: fix overshooting recv limit 2025-10-15 12:04:15 +02:00
ipc vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
kernel rseq: Protect event mask against membarrier IPI 2025-10-19 16:36:59 +02:00
lib vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY 2025-10-15 12:03:24 +02:00
LICENSES LICENSES: Replace the obsolete address of the FSF in the GFDL-1.2 2025-07-24 11:15:39 +02:00
mm memcg: skip cgroup_file_notify if spinning is not allowed 2025-10-19 16:37:00 +02:00
net nfsd: unregister with rpcbind when deleting a transport 2025-10-19 16:37:00 +02:00
rust cpufreq: Make drivers using CPUFREQ_ETERNAL specify transition latency 2025-10-19 16:37:00 +02:00
samples 15 hotfixes. 11 are cc:stable and the remainder address post-6.16 issues 2025-09-17 21:34:26 -07:00
scripts scripts/misc-check: update export checks for EXPORT_SYMBOL_FOR_MODULES() 2025-10-15 12:03:22 +02:00
security lsm: CONFIG_LSM can depend on CONFIG_SECURITY 2025-10-15 12:03:17 +02:00
sound ASoC: SOF: ipc4-pcm: fix start offset calculation for chain DMA 2025-10-15 12:04:16 +02:00
tools nvdimm: ndtest: Return -ENOMEM if devm_kcalloc() fails in ndtest_probe() 2025-10-15 12:04:21 +02:00
usr usr/include: openrisc: don't HDRTEST bpf_perf_event.h 2025-05-12 15:03:17 +09:00
virt Merge tag 'kvm-x86-no_assignment-6.17' of https://github.com/kvm-x86/linux into HEAD 2025-07-29 08:36:42 -04:00
.clang-format
.clippy.toml rust: clean Rust 1.88.0's warning about clippy::disallowed_macros configuration 2025-05-07 00:11:47 +02:00
.cocciconfig
.editorconfig
.get_maintainer.ignore MAINTAINERS: remove Alyssa Rosenzweig 2025-09-18 21:17:31 +02:00
.gitattributes
.gitignore gitignore: allow .pylintrc to be tracked 2025-07-02 17:10:04 -06:00
.mailmap 7 hotfixes. 4 are cc:stable and the remainder address post-6.16 issues or 2025-09-28 09:32:00 -07:00
.pylintrc
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: retire Boris from TLS maintainers 2025-08-26 17:36:01 -07:00
Kbuild
Kconfig
MAINTAINERS i2c-for-6.17-rc8 2025-09-28 13:19:23 -07:00
Makefile Linux 6.17.3 2025-10-15 12:04:23 +02:00
README

Linux kernel

There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.

In order to build the documentation, use make htmldocs or make pdfdocs. The formatted documentation can also be read online at:

https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory, several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.