linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] acpi: silence kmemcheck false positive
@ 2010-04-22 19:43 Dan Carpenter
  2010-04-22 20:02 ` Dan Carpenter
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2010-04-22 19:43 UTC (permalink / raw)
  To: Len Brown
  Cc: Bjorn Helgaas, Shaohua Li, Zhang Rui, Zhao Yakui, linux-acpi,
	vegardno

This addresses: https://bugzilla.kernel.org/show_bug.cgi?id=14998

We copy some strings into "event" and kmemcheck complains that the bytes 
after the NULL terminators are uninitialized.  That's true but it's
harmless.  The "event" struct is used in acpi_system_read_event() and we
don't read past the terminator.

This patch just silences the warning.

Reported-by: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Tested-by: Christian Casteyde <casteyde.christian@free.fr>

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 37132dc..4ef7c97 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -527,7 +527,7 @@ int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id,
 	if (!event_is_open)
 		return 0;
 
-	event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
+	event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC | __GFP_NOTRACK_FALSE_POSITIVE);
 	if (!event)
 		return -ENOMEM;
 

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

end of thread, other threads:[~2010-04-27  7:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 19:43 [patch] acpi: silence kmemcheck false positive Dan Carpenter
2010-04-22 20:02 ` Dan Carpenter
2010-04-22 22:32   ` Bjorn Helgaas
2010-04-23 19:17     ` Dan Carpenter
2010-04-26 22:19     ` Dan Carpenter
2010-04-26 22:23     ` [patch v2] " Dan Carpenter
2010-04-27  7:15       ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).