Commit 3e1aa66b authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Linus Torvalds
Browse files

lib/kasprintf.c: use kmalloc_track_caller() to get accurate traces for kvasprintf

Previously kvasprintf() allocation was being done through kmalloc(),
thus producing an inaccurate trace report.

This is a common problem: in order to get accurate callsite tracing, a
lib/utils function shouldn't allocate kmalloc but instead use
Signed-off-by: default avatarEzequiel Garcia <>
Cc: Sam Ravnborg <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 4ed134be
......@@ -21,7 +21,7 @@ char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap)
len = vsnprintf(NULL, 0, fmt, aq);
p = kmalloc(len+1, gfp);
p = kmalloc_track_caller(len+1, gfp);
if (!p)
return NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment