linux/drivers/accel/rocket
Quentin Schulz 7fc4b49474 accel/rocket: fix unwinding in error path in rocket_probe
[ Upstream commit 34f4495a7f ]

When rocket_core_init() fails (as could be the case with EPROBE_DEFER),
we need to properly unwind by decrementing the counter we just
incremented and if this is the first core we failed to probe, remove the
rocket DRM device with rocket_device_fini() as well. This matches the
logic in rocket_remove(). Failing to properly unwind results in
out-of-bounds accesses.

Fixes: 0810d5ad88 ("accel/rocket: Add job submission IOCTL")
Cc: stable@vger.kernel.org
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Link: https://patch.msgid.link/20251215-rocket-error-path-v1-2-eec3bf29dc3b@cherry.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-12 07:09:26 -04:00
..
Kconfig accel/rocket: Depend on DRM_ACCEL not just DRM 2025-09-01 12:11:28 +02:00
Makefile accel/rocket: Add job submission IOCTL 2025-07-25 10:02:27 -06:00
rocket_core.c accel/rocket: fix unwinding in error path in rocket_core_init 2026-03-12 07:09:26 -04:00
rocket_core.h accel/rocket: Add job submission IOCTL 2025-07-25 10:02:27 -06:00
rocket_device.c accel/rocket: Add job submission IOCTL 2025-07-25 10:02:27 -06:00
rocket_device.h accel/rocket: Add job submission IOCTL 2025-07-25 10:02:27 -06:00
rocket_drv.c accel/rocket: fix unwinding in error path in rocket_probe 2026-03-12 07:09:26 -04:00
rocket_drv.h accel/rocket: Fix undeclared const rocket_pm_ops 2025-08-03 17:40:23 +02:00
rocket_gem.c accel/rocket: Add IOCTLs for synchronizing memory accesses 2025-07-25 10:04:46 -06:00
rocket_gem.h accel/rocket: Add IOCTLs for synchronizing memory accesses 2025-07-25 10:04:46 -06:00
rocket_job.c accel/rocket: Check the correct DMA irq status to warn about 2025-09-01 12:11:28 +02:00
rocket_job.h accel/rocket: Add job submission IOCTL 2025-07-25 10:02:27 -06:00
rocket_registers.h accel/rocket: Add registers header 2025-07-25 09:48:41 -06:00