• Catalin Marinas's avatar
    kmemcheck: Test the full object in kmemcheck_is_obj_initialized() · 81fc0390
    Catalin Marinas authored
    This is a fix for bug #14845 (bugzilla.kernel.org). The update_checksum()
    function in mm/kmemleak.c calls kmemcheck_is_obj_initialised() before scanning
    an object. When KMEMCHECK_PARTIAL_OK is enabled, this function returns true.
    However, the crc32_le() reads smaller intervals (32-bit) for which
    kmemleak_is_obj_initialised() may be false leading to a kmemcheck warning.
    
    Note that kmemcheck_is_obj_initialized() is currently only used by
    kmemleak before scanning a memory location.
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Christian Casteyde <casteyde.christian@free.fr>
    Cc: Vegard Nossum <vegardno@ifi.uio.no>
    Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
    81fc0390
shadow.c 3.67 KB