linux-stable/kernel/futex
Mathieu Desnoyers c496fdc3c6 futex: Fix futex_waitv() hrtimer debug object leak on kcalloc error
commit 94cd8fa09f upstream.

In a scenario where kcalloc() fails to allocate memory, the futex_waitv
system call immediately returns -ENOMEM without invoking
destroy_hrtimer_on_stack(). When CONFIG_DEBUG_OBJECTS_TIMERS=y, this
results in leaking a timer debug object.

Fixes: bf69bad38c ("futex: Implement sys_futex_waitv()")
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Cc: stable@vger.kernel.org
Cc: stable@vger.kernel.org # v5.16+
Link: https://lore.kernel.org/r/20221214222008.200393-1-mathieu.desnoyers@efficios.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-04 11:26:28 +01:00
..
Makefile futex: Split out wait/wake 2021-10-07 13:51:11 +02:00
core.c futex: Resend potentially swallowed owner death notification 2022-12-31 13:25:45 +01:00
futex.h futex: add missing rtmutex.h include 2022-04-07 15:09:12 +02:00
pi.c futex: Remove a PREEMPT_RT_FULL reference. 2022-05-13 12:36:51 +02:00
requeue.c futex: Split out requeue 2021-10-07 13:51:10 +02:00
syscalls.c futex: Fix futex_waitv() hrtimer debug object leak on kcalloc error 2023-01-04 11:26:28 +01:00
waitwake.c futex: Implement sys_futex_waitv() 2021-10-07 13:51:11 +02:00