public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kmemleak: Do not enable KMEMCHECK_PARTIAL_OK if DEBUG_KMEMLEAK
@ 2010-01-26 17:57 Catalin Marinas
  2010-01-27  6:30 ` Pekka Enberg
  0 siblings, 1 reply; 6+ messages in thread
From: Catalin Marinas @ 2010-01-26 17:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Pekka Enberg, Christian Casteyde

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() is may be false leading to a kmemcheck
warning.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christian Casteyde <casteyde.christian@free.fr>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
---
 lib/Kconfig.kmemcheck |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/Kconfig.kmemcheck b/lib/Kconfig.kmemcheck
index 846e039..80660e9 100644
--- a/lib/Kconfig.kmemcheck
+++ b/lib/Kconfig.kmemcheck
@@ -75,7 +75,7 @@ config KMEMCHECK_SHADOW_COPY_SHIFT
 config KMEMCHECK_PARTIAL_OK
 	bool "kmemcheck: allow partially uninitialized memory"
 	depends on KMEMCHECK
-	default y
+	default y if !DEBUG_KMEMLEAK
 	help
 	  This option works around certain GCC optimizations that produce
 	  32-bit reads from 16-bit variables where the upper 16 bits are


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-30  8:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-26 17:57 [PATCH] kmemleak: Do not enable KMEMCHECK_PARTIAL_OK if DEBUG_KMEMLEAK Catalin Marinas
2010-01-27  6:30 ` Pekka Enberg
2010-01-27 11:02   ` Catalin Marinas
2010-01-27 15:09     ` Pekka Enberg
2010-01-29 17:40       ` Catalin Marinas
2010-01-30  8:22         ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox