public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] [2.6.25-rc5] Warn if packages with invalid references are evaluated
@ 2008-03-12  0:06 Thomas Renninger
  0 siblings, 0 replies; only message in thread
From: Thomas Renninger @ 2008-03-12  0:06 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi, Zhang, Rui

Warn if packages with invalid references are evaluated

And return an error to avoid NULL pointer access by the caller
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>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>

---
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] only message in thread

only message in thread, other threads:[~2008-03-12  0:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12  0:06 [PATCH 2/3] [2.6.25-rc5] Warn if packages with invalid references are evaluated Thomas Renninger

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