anolis-cloud-kernel/drivers/hwtracing
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
..
coresight coresight: tmc: Explicit type conversions to prevent integer overflow 2023-08-17 15:40:54 +08:00
intel_th anolis: intel_th: replaces spin_lock with mutex_lock 2025-03-10 06:46:59 +00:00
stm stm class: Fix a double free in stm_register_device() 2025-03-31 02:09:55 +00:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00