linux/drivers/tee/qcomtee
Robertus Diawan Chris 471c18323d tee: qcomtee: add missing va_end in early return qcomtee_object_user_init()
qcomtee_object_user_init() is a variadic function and when the function
return because there's no dispatch callback in QCOMTEE_OBJECT_TYPE_CB
case, there's no va_end to cleanup "ap" object initialized by va_start
and that can cause undefined behavior. So make sure to use va_end before
returning the error code when there's no dispatch callback.

This is reported by Coverity Scan as "Missing varargs init or cleanup".

Fixes: d6e290837e ("tee: add Qualcomm TEE driver")
Signed-off-by: Robertus Diawan Chris <robertusdchris@gmail.com>
Reviewed-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2026-05-20 09:22:52 +02:00
..
async.c
call.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
core.c tee: qcomtee: add missing va_end in early return qcomtee_object_user_init() 2026-05-20 09:22:52 +02:00
Kconfig tee: QCOMTEE should depend on ARCH_QCOM 2025-10-02 08:31:10 +02:00
Makefile tee: qcom: enable TEE_IOC_SHM_ALLOC ioctl 2025-09-15 17:34:06 +02:00
mem_obj.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
primordial_obj.c tee: qcom: enable TEE_IOC_SHM_ALLOC ioctl 2025-09-15 17:34:06 +02:00
qcomtee_msg.h
qcomtee_object.h Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qcomtee.h tee: qcom: enable TEE_IOC_SHM_ALLOC ioctl 2025-09-15 17:34:06 +02:00
shm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
user_obj.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00