mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 19:01:37 +00:00
81fc03909a
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: Catalin 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: Pekka Enberg <penberg@cs.helsinki.fi>
19 lines
524 B
C
19 lines
524 B
C
#ifndef ARCH__X86__MM__KMEMCHECK__SHADOW_H
|
|
#define ARCH__X86__MM__KMEMCHECK__SHADOW_H
|
|
|
|
enum kmemcheck_shadow {
|
|
KMEMCHECK_SHADOW_UNALLOCATED,
|
|
KMEMCHECK_SHADOW_UNINITIALIZED,
|
|
KMEMCHECK_SHADOW_INITIALIZED,
|
|
KMEMCHECK_SHADOW_FREED,
|
|
};
|
|
|
|
void *kmemcheck_shadow_lookup(unsigned long address);
|
|
|
|
enum kmemcheck_shadow kmemcheck_shadow_test(void *shadow, unsigned int size);
|
|
enum kmemcheck_shadow kmemcheck_shadow_test_all(void *shadow,
|
|
unsigned int size);
|
|
void kmemcheck_shadow_set(void *shadow, unsigned int size);
|
|
|
|
#endif
|