[patch] acpi: silence kmemcheck false positive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
Tested-by: Christian Casteyde <casteyde.christian@xxxxxxx>

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;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux