public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Lin Ming <ming.m.lin@intel.com>
To: trenn@suse.de
Cc: rui.zhang@intel.com, linux-acpi <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] Warn if packages with invalid references are evaluated
Date: Fri, 07 Mar 2008 09:33:43 +0800	[thread overview]
Message-ID: <1204853623.14599.1.camel@minggr.sh.intel.com> (raw)
In-Reply-To: <1204842824.8741.6.camel@linux-2bdv.site>


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;
> 
> 


  reply	other threads:[~2008-03-07  1:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06 22:33 [PATCH] Warn if packages with invalid references are evaluated Thomas Renninger
2008-03-07  1:33 ` Lin Ming [this message]
2008-03-12  3:58 ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1204853623.14599.1.camel@minggr.sh.intel.com \
    --to=ming.m.lin@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=trenn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox