anolis-cloud-kernel/drivers/hwtracing/stm
Dan Carpenter e0827388ba stm class: Fix a double free in stm_register_device()
ANBZ: #12940

commit 3df463865b upstream.

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>

Fixes: CVE-2024-38627
Signed-off-by: Xiao Long <xiaolong@openanolis.org>
Signed-off-by: 362994 <362994>
Reviewed-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/4322
2025-03-31 02:09:55 +00:00
..
Kconfig stm class: ftrace: Change dependency to TRACING 2020-10-05 12:43:53 +02:00
Makefile
console.c
core.c stm class: Fix a double free in stm_register_device() 2025-03-31 02:09:55 +00:00
dummy_stm.c
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-27 11:55:15 +01:00
p_basic.c
p_sys-t.c stm class: sys-t: Fix the use of time_after() 2020-03-18 11:32:55 +01:00
policy.c stm class: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
stm.h stm class: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00