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

* Re: [PATCH] Warn if packages with invalid references are evaluated
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Lin Ming @ 2008-03-07  1:33 UTC (permalink / raw)
  To: trenn; +Cc: rui.zhang, linux-acpi


On Thu, 2008-03-06 at 23:33 +0100, Thomas Renninger wrote:
> 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: Lin Ming <ming.m.lin@intel.com>

Thanks,
Lin Ming
> 
> 
> 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

* Re: [PATCH] Warn if packages with invalid references are evaluated
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Len Brown @ 2008-03-12  3:58 UTC (permalink / raw)
  To: trenn; +Cc: ming.m.lin, rui.zhang, linux-acpi

applied.

thanks,
-len

On Thursday 06 March 2008, Thomas Renninger wrote:
> 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;
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 



^ 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