• Ezequiel Garcia's avatar
    mm: Use __do_krealloc to do the krealloc job · e21827aa
    Ezequiel Garcia authored
    Without this patch we can get (many) kmem trace events
    with call site at krealloc().
    
    This happens because krealloc is calling __krealloc,
    which performs the allocation through kmalloc_track_caller.
    
    Since neither krealloc nor __krealloc are marked inline explicitly,
    the caller can be traced as being krealloc, which clearly is not
    the intended behavior.
    
    This patch allows to get the real caller of krealloc, by creating
    an always inlined function __do_krealloc, thus tracing the
    call site accurately.
    Acked-by: default avatarChristoph Lameter <cl@linux.com>
    Cc: Glauber Costa <glommer@parallels.com>
    Signed-off-by: default avatarEzequiel Garcia <elezegarcia@gmail.com>
    Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
    e21827aa
util.c 9.07 KB