public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [patch 1/5] x86: ACPI - add checking for NULL early param
       [not found] ` <486f61a9.2135440a.0d16.ffffbd7f@mx.google.com>
@ 2008-07-22  9:53   ` Andrew Morton
  2008-07-22 10:19     ` Cyrill Gorcunov
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2008-07-22  9:53 UTC (permalink / raw)
  To: Cyrill Gorcunov; +Cc: mingo, hpa, tglx, andi, linux-kernel, linux-acpi

On Sat, 05 Jul 2008 15:53:35 +0400 Cyrill Gorcunov <gorcunov@gmail.com> wrote:

> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
> 
> Index: linux-2.6.git/drivers/acpi/tables.c
> ====================================================================
> --- linux-2.6.git.orig/drivers/acpi/tables.c	2008-01-21 23:14:47.000000000 +0300
> +++ linux-2.6.git/drivers/acpi/tables.c	2008-07-05 12:24:16.000000000 +0400
> @@ -300,6 +300,8 @@ int __init acpi_table_init(void)
>  
>  static int __init acpi_parse_apic_instance(char *str)
>  {
> +	if (!str)
> +		return -EINVAL;
>  
>  	acpi_apic_instance = simple_strtoul(str, NULL, 0);
>  

Could you please explain this patch?

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

* Re: [patch 1/5] x86: ACPI - add checking for NULL early param
  2008-07-22  9:53   ` [patch 1/5] x86: ACPI - add checking for NULL early param Andrew Morton
@ 2008-07-22 10:19     ` Cyrill Gorcunov
  0 siblings, 0 replies; 2+ messages in thread
From: Cyrill Gorcunov @ 2008-07-22 10:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: mingo, hpa, tglx, andi, linux-kernel, linux-acpi

[Andrew Morton - Tue, Jul 22, 2008 at 02:53:32AM -0700]
| On Sat, 05 Jul 2008 15:53:35 +0400 Cyrill Gorcunov <gorcunov@gmail.com> wrote:
| 
| > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| > ---
| > 
| > Index: linux-2.6.git/drivers/acpi/tables.c
| > ====================================================================
| > --- linux-2.6.git.orig/drivers/acpi/tables.c	2008-01-21 23:14:47.000000000 +0300
| > +++ linux-2.6.git/drivers/acpi/tables.c	2008-07-05 12:24:16.000000000 +0400
| > @@ -300,6 +300,8 @@ int __init acpi_table_init(void)
| >  
| >  static int __init acpi_parse_apic_instance(char *str)
| >  {
| > +	if (!str)
| > +		return -EINVAL;
| >  
| >  	acpi_apic_instance = simple_strtoul(str, NULL, 0);
| >  
| 
| Could you please explain this patch?
| 

we could get NULL deref here - if you start kernel as

	qemu-system-x86_64 -kernel arch/x86/boot/bzImage -append "root=/dev/sda acpi_apic_instance" ../images/root-j

so user was not carried about correct boot option and the kernel respond by
hang - which is not good I think. Actually - by the patch we easy protect
ourself from user-madness :)

		- Cyrill -

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

end of thread, other threads:[~2008-07-22 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080705115334.892720771@gmail.com>
     [not found] ` <486f61a9.2135440a.0d16.ffffbd7f@mx.google.com>
2008-07-22  9:53   ` [patch 1/5] x86: ACPI - add checking for NULL early param Andrew Morton
2008-07-22 10:19     ` Cyrill Gorcunov

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