Messages in this thread Patch in this message | | | From | Xiongwei Song <> | Subject | [PATCH] mm: append __GFP_COMP flag for trace_malloc | Date | Tue, 27 Apr 2021 10:43:20 +0800 |
| |
From: Xiongwei Song <sxwjean@gmail.com>
When calling kmalloc_order, the flags should include __GFP_COMP here, so that trace_malloc can trace the precise flags.
Signed-off-by: Xiongwei Song <sxwjean@gmail.com> --- mm/slab_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c index 585a6f9..c23e1e8 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -928,7 +928,7 @@ EXPORT_SYMBOL(kmalloc_order); void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order) { void *ret = kmalloc_order(size, flags, order); - trace_kmalloc(_RET_IP_, ret, size, PAGE_SIZE << order, flags); + trace_kmalloc(_RET_IP_, ret, size, PAGE_SIZE << order, flags | __GFP_COMP); return ret; } EXPORT_SYMBOL(kmalloc_order_trace); -- 2.7.4
| |