Commit 94cd8fa
futex: Fix futex_waitv() hrtimer debug object leak on kcalloc error
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: bf69bad ("futex: Implement sys_futex_waitv()")
Signed-off-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Davidlohr Bueso <[email protected]>
Cc: [email protected]
Cc: [email protected] # v5.16+
Link: https://lore.kernel.org/r/[email protected]1 parent 1c0908d commit 94cd8fa
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
291 | 293 | | |
292 | 294 | | |
293 | 295 | | |
294 | 296 | | |
295 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
296 | 301 | | |
297 | 302 | | |
298 | 303 | | |
299 | 304 | | |
300 | | - | |
301 | | - | |
302 | 305 | | |
303 | 306 | | |
304 | 307 | | |
| |||
0 commit comments