diff options
| author | Ezequiel Garcia <[email protected]> | 2012-10-10 22:54:04 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2012-10-10 23:50:15 +0000 |
| commit | 3e1aa66bd423950aa69c3d50d91818af1d16e0a7 (patch) | |
| tree | 3f9f0f6e2f396e7bf32978816c49e99a28855d56 /lib/kasprintf.c | |
| parent | rapidio: update for destination ID allocation (diff) | |
| download | kernel-3e1aa66bd423950aa69c3d50d91818af1d16e0a7.tar.gz kernel-3e1aa66bd423950aa69c3d50d91818af1d16e0a7.zip | |
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
kmalloc_track_caller.
Signed-off-by: Ezequiel Garcia <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/kasprintf.c')
| -rw-r--r-- | lib/kasprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kasprintf.c b/lib/kasprintf.c index ae0de80c1c88..32f12150fc4f 100644 --- a/lib/kasprintf.c +++ b/lib/kasprintf.c @@ -21,7 +21,7 @@ char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap) len = vsnprintf(NULL, 0, fmt, aq); va_end(aq); - p = kmalloc(len+1, gfp); + p = kmalloc_track_caller(len+1, gfp); if (!p) return NULL; |
