diff mbox

ACPI: Fix crash on ASUS laptops

Message ID alpine.LFD.2.00.0901171303040.3032@localhost.localdomain (mailing list archive)
State Accepted
Headers show

Commit Message

Tero Roponen Jan. 17, 2009, 11:06 a.m. UTC
This patch fixes the crash I experienced in 2.6.29-rc2.
Tested on ASUS M50vm.

Signed-off-by: Tero Roponen <tero.roponen@gmail.com>

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

Comments

Alexey Starikovskiy Jan. 17, 2009, 5:20 p.m. UTC | #1
Thanks, ACK
Alex.
Tero Roponen wrote:
> This patch fixes the crash I experienced in 2.6.29-rc2.
> Tested on ASUS M50vm.
> 
> Signed-off-by: Tero Roponen <tero.roponen@gmail.com>
> 
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index a2b82c9..5c2f5d3 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -982,7 +982,7 @@ int __init acpi_ec_ecdt_probe(void)
>  		saved_ec = kmalloc(sizeof(struct acpi_ec), GFP_KERNEL);
>  		if (!saved_ec)
>  			return -ENOMEM;
> -		memcpy(&saved_ec, boot_ec, sizeof(saved_ec));
> +		memcpy(saved_ec, boot_ec, sizeof(*saved_ec));
>  	/* fall through */
>  	}
>  	/* This workaround is needed only on some broken machines,

--
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
Len Brown Jan. 18, 2009, 1:17 a.m. UTC | #2
applied.

thanks,
--
Len Brown, Intel Open Source Technology Center

On Sat, 17 Jan 2009, Alexey Starikovskiy wrote:

> Thanks, ACK
> Alex.
> Tero Roponen wrote:
> > This patch fixes the crash I experienced in 2.6.29-rc2.
> > Tested on ASUS M50vm.
> > 
> > Signed-off-by: Tero Roponen <tero.roponen@gmail.com>
> > 
> > diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> > index a2b82c9..5c2f5d3 100644
> > --- a/drivers/acpi/ec.c
> > +++ b/drivers/acpi/ec.c
> > @@ -982,7 +982,7 @@ int __init acpi_ec_ecdt_probe(void)
> >  		saved_ec = kmalloc(sizeof(struct acpi_ec), GFP_KERNEL);
> >  		if (!saved_ec)
> >  			return -ENOMEM;
> > -		memcpy(&saved_ec, boot_ec, sizeof(saved_ec));
> > +		memcpy(saved_ec, boot_ec, sizeof(*saved_ec));
> >  	/* fall through */
> >  	}
> >  	/* This workaround is needed only on some broken machines,
> 
> --
> 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
> 
--
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
diff mbox

Patch

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index a2b82c9..5c2f5d3 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -982,7 +982,7 @@  int __init acpi_ec_ecdt_probe(void)
 		saved_ec = kmalloc(sizeof(struct acpi_ec), GFP_KERNEL);
 		if (!saved_ec)
 			return -ENOMEM;
-		memcpy(&saved_ec, boot_ec, sizeof(saved_ec));
+		memcpy(saved_ec, boot_ec, sizeof(*saved_ec));
 	/* fall through */
 	}
 	/* This workaround is needed only on some broken machines,