All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: trenn@suse.de
Cc: ming.m.lin@intel.com, rui.zhang@intel.com,
	linux-acpi <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] Warn if packages with invalid references are evaluated
Date: Tue, 11 Mar 2008 23:58:17 -0400	[thread overview]
Message-ID: <200803112358.17466.lenb@kernel.org> (raw)
In-Reply-To: <1204842824.8741.6.camel@linux-2bdv.site>

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
> 



      parent reply	other threads:[~2008-03-12  3:58 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
2008-03-12  3:58 ` Len Brown [this message]

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=200803112358.17466.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.