mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
futex: Tell kmemleak we're not leaking __futex_queues
Kmemleak doesn't know about runtime_const stuff and figures we're leaking
__futex_queues. So add this little annotation to tell it all is well.
Fixes: b78b0b6582 ("futex: Use runtime constants for __futex_hash() hot path")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-lkp/[email protected]
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://patch.msgid.link/[email protected]
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include <linux/rseq.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/kmemleak.h>
|
||||
|
||||
#include <vdso/futex.h>
|
||||
|
||||
@@ -2028,6 +2029,7 @@ static int __init futex_init(void)
|
||||
order = get_order(size);
|
||||
|
||||
__futex_queues = kcalloc(nr_node_ids, sizeof(*__futex_queues), GFP_KERNEL);
|
||||
kmemleak_not_leak(__futex_queues);
|
||||
|
||||
runtime_const_init(shift, __futex_shift);
|
||||
runtime_const_init(mask, __futex_mask);
|
||||
|
||||
Reference in New Issue
Block a user