public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Warn if packages with invalid references are evaluated
@ 2008-03-06 22:33 Thomas Renninger
  2008-03-07  1:33 ` Lin Ming
  2008-03-12  3:58 ` Len Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Renninger @ 2008-03-06 22:33 UTC (permalink / raw)
  To: ming.m.lin; +Cc: rui.zhang, linux-acpi

Warn if packages with invalid references are evaluated

And return an error to avoid NULL pointer access.
Lin Ming's patch avoids corrupted mem access when
BIOS has invalid references included, the handle is now zero
instead of corrupted.


Signed-off-by: Thomas Renninger <trenn@suse.de>

---
Index: linux-2.6.24/drivers/acpi/utils.c
===================================================================
--- linux-2.6.24.orig/drivers/acpi/utils.c
+++ linux-2.6.24/drivers/acpi/utils.c
@@ -407,6 +407,12 @@ acpi_evaluate_reference(acpi_handle hand
 			break;
 		}
 
+		if (!element->reference.handle) {
+			printk(KERN_WARNING PREFIX "Invalid reference in"
+			       " package %s\n", pathname);
+			status = AE_NULL_ENTRY;
+			break;
+		}
 		/* Get the  acpi_handle. */
 
 		list->handles[i] = element->reference.handle;



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

end of thread, other threads:[~2008-03-12  3:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-06 22:33 [PATCH] Warn if packages with invalid references are evaluated Thomas Renninger
2008-03-07  1:33 ` Lin Ming
2008-03-12  3:58 ` Len Brown

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