No description
Find a file
Geert Uytterhoeven 58f3fc8333 reset: Fix crash when freeing non-existent optional resets
[ Upstream commit 4a6756f56b ]

When obtaining one or more optional resets, non-existent resets are
stored as NULL pointers, and all related error and cleanup paths need to
take this into account.

Currently only reset_control_put() and reset_control_bulk_put()
get this right.  All of __reset_control_bulk_get(),
of_reset_control_array_get(), and reset_control_array_put() lack the
proper checking, causing NULL pointer dereferences on failure or
release.

Fix this by moving the existing check from reset_control_bulk_put() to
__reset_control_put_internal(), so it applies to all callers.
The double check in reset_control_put() doesn't hurt.

Fixes: 17c82e206d ("reset: Add APIs to manage array of resets")
Fixes: 48d7139589 ("reset: Add reset_control_bulk API")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/2440edae7ca8534628cdbaf559ded288f2998178.1701276806.git.geert+renesas@glider.be
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-05 15:13:27 +01:00
arch ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init 2024-01-05 15:13:27 +01:00
block blk-cgroup: bypass blkcg_deactivate_policy after destroying 2023-12-20 15:17:39 +01:00
certs
crypto crypto: pcrypt - Fix hungtask for PADATA_RESET 2023-11-28 16:56:18 +00:00
Documentation docs/process/howto: Replace C89 with C11 2023-12-13 18:36:46 +01:00
drivers reset: Fix crash when freeing non-existent optional resets 2024-01-05 15:13:27 +01:00
fs ksmbd: don't update ->op_state as OPLOCK_STATE_NONE on error 2023-12-23 10:42:00 +01:00
include kasan: disable kasan_non_canonical_hook() for HW tags 2023-12-23 10:42:00 +01:00
init proc: sysctl: prevent aliased sysctls from getting passed to init 2023-12-03 07:31:24 +01:00
io_uring io_uring/af_unix: disable sending io_uring over sockets 2023-12-13 18:36:46 +01:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:28:45 +01:00
kernel tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols 2023-12-23 10:42:00 +01:00
lib parisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes 2023-12-08 08:48:02 +01:00
LICENSES
mm kasan: disable kasan_non_canonical_hook() for HW tags 2023-12-23 10:42:00 +01:00
net appletalk: Fix Use-After-Free in atalk_ioctl 2023-12-20 15:17:37 +01:00
samples samples/hw_breakpoint: fix building without module unloading 2023-09-23 11:10:01 +02:00
scripts sign-file: Fix incorrect return values check 2023-12-20 15:17:37 +01:00
security KEYS: trusted: Rollback init_trusted() consistently 2023-11-28 16:56:30 +00:00
sound ALSA: hda/realtek: Apply mute LED quirk for HP15-db 2023-12-20 15:17:38 +01:00
tools tools headers UAPI: Sync linux/perf_event.h with the kernel sources 2023-12-13 18:36:46 +01:00
usr
virt KVM: Grab a reference to KVM for VM and vCPU stats file descriptors 2023-08-03 10:22:40 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS iio: stx104: Move to addac subdirectory 2023-08-26 14:23:27 +02:00
Makefile Linux 5.15.145 2023-12-23 10:42:00 +01: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 Restructured Text 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.