WSL2-Linux-Kernel/drivers/hwtracing/stm
Dan Carpenter 7419df1acf stm class: Fix a double free in stm_register_device()
[ Upstream commit 3df463865ba42b8f88a590326f4c9ea17a1ce459 ]

The put_device(&stm->dev) call will trigger stm_device_release() which
frees "stm" so the vfree(stm) on the next line is a double free.

Fixes: 389b6699a2 ("stm class: Fix stm device initialization order")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Link: https://lore.kernel.org/r/20240429130119.1518073-2-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-16 13:39:39 +02:00
..
Kconfig stm class: ftrace: Change dependency to TRACING 2020-10-05 12:43:53 +02:00
Makefile stm class: Add MIPI SyS-T protocol support 2018-10-11 12:12:54 +02:00
console.c stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate 2018-03-28 18:47:17 +03:00
core.c stm class: Fix a double free in stm_register_device() 2024-06-16 13:39:39 +02:00
dummy_stm.c stm class: Make dummy's master/channel ranges configurable 2018-03-28 18:47:18 +03:00
ftrace.c stm class: ftrace: Use different channel accroding to CPU 2020-10-05 12:43:54 +02:00
heartbeat.c stm class: Fix module init return on allocation failure 2021-01-21 18:54:37 +01:00
p_basic.c stm class: Factor out default framing protocol 2018-10-11 12:12:54 +02:00
p_sys-t.c stm class: Use correct UUID APIs 2021-04-16 07:26:50 +02:00
policy.c stm class: Remove an unused function 2021-04-16 07:26:50 +02:00
stm.h stm class: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00