public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2/4] acpi: Toshiba failure handling
@ 2005-03-30 21:16 akpm-3NddpPZAyC0
       [not found] ` <200503302116.j2ULGc4Y027730-bipKiLWnuIsyyg0EjBt7GtHuzzzSOjJt@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: akpm-3NddpPZAyC0 @ 2005-03-30 21:16 UTC (permalink / raw)
  To: len.brown-ral2JQCrhuEAvxtiuMwx3w
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, akpm-3NddpPZAyC0,
	panagiotis.issaris-hfxpx0nnwYVX2QMWbMbClIble9XqW/aP,
	takis-8nu/KwtRnEU


From: "Panagiotis Issaris" <panagiotis.issaris-hfxpx0nnwYVX2QMWbMbClIble9XqW/aP@public.gmane.org>

Adds the missing failure handling for a kmalloc in the Toshiba ACPI driver.

Signed-off-by: Panagiotis Issaris <takis-8nu/KwtRnEU@public.gmane.org>
Signed-off-by: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
---

 25-akpm/drivers/acpi/toshiba_acpi.c |    3 +++
 1 files changed, 3 insertions(+)

diff -puN drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling drivers/acpi/toshiba_acpi.c
--- 25/drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling	Wed Mar 30 13:16:02 2005
+++ 25-akpm/drivers/acpi/toshiba_acpi.c	Wed Mar 30 13:16:02 2005
@@ -263,6 +263,9 @@ dispatch_write(struct file* file, const 
 	 * destination so that sscanf can be used on it safely.
 	 */
 	tmp_buffer = kmalloc(count + 1, GFP_KERNEL);
+	if(!tmp_buffer)
+		return -ENOMEM;
+
 	if (copy_from_user(tmp_buffer, buffer, count)) {
 		result = -EFAULT;
 	}
_


-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/Info/Sentarus/hamr30

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

* Re: [patch 2/4] acpi: Toshiba failure handling
       [not found] ` <200503302116.j2ULGc4Y027730-bipKiLWnuIsyyg0EjBt7GtHuzzzSOjJt@public.gmane.org>
@ 2005-03-31  3:17   ` Len Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Len Brown @ 2005-03-31  3:17 UTC (permalink / raw)
  To: Andrew Morton
  Cc: ACPI Developers,
	panagiotis.issaris-hfxpx0nnwYVX2QMWbMbClIble9XqW/aP,
	takis-8nu/KwtRnEU

Applied.

thanks,
-Len

On Wed, 2005-03-30 at 16:16, akpm-3NddpPZAyC0@public.gmane.org wrote:
> From: "Panagiotis Issaris" <panagiotis.issaris-hfxpx0nnwYVX2QMWbMbClIble9XqW/aP@public.gmane.org>
> 
> Adds the missing failure handling for a kmalloc in the Toshiba ACPI
> driver.
> 
> Signed-off-by: Panagiotis Issaris <takis-8nu/KwtRnEU@public.gmane.org>
> Signed-off-by: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
> ---
> 
>  25-akpm/drivers/acpi/toshiba_acpi.c |    3 +++
>  1 files changed, 3 insertions(+)
> 
> diff -puN drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling
> drivers/acpi/toshiba_acpi.c
> ---
> 25/drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling       
> Wed Mar 30 13:16:02 2005
> +++ 25-akpm/drivers/acpi/toshiba_acpi.c Wed Mar 30 13:16:02 2005
> @@ -263,6 +263,9 @@ dispatch_write(struct file* file, const
>          * destination so that sscanf can be used on it safely.
>          */
>         tmp_buffer = kmalloc(count + 1, GFP_KERNEL);
> +       if(!tmp_buffer)
> +               return -ENOMEM;
> +
>         if (copy_from_user(tmp_buffer, buffer, count)) {
>                 result = -EFAULT;
>         }
> _
> 
> 



-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/Info/Sentarus/hamr30

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

* [patch 2/4] acpi: Toshiba failure handling
@ 2005-04-05  6:57 akpm-3NddpPZAyC0
  0 siblings, 0 replies; 3+ messages in thread
From: akpm-3NddpPZAyC0 @ 2005-04-05  6:57 UTC (permalink / raw)
  To: len.brown-ral2JQCrhuEAvxtiuMwx3w
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, akpm-3NddpPZAyC0,
	panagiotis.issaris-hfxpx0nnwYVX2QMWbMbClIble9XqW/aP,
	takis-8nu/KwtRnEU


From: "Panagiotis Issaris" <panagiotis.issaris-hfxpx0nnwYVX2QMWbMbClIble9XqW/aP@public.gmane.org>

Adds the missing failure handling for a kmalloc in the Toshiba ACPI driver.

Signed-off-by: Panagiotis Issaris <takis-8nu/KwtRnEU@public.gmane.org>
Signed-off-by: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
---

 25-akpm/drivers/acpi/toshiba_acpi.c |    3 +++
 1 files changed, 3 insertions(+)

diff -puN drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling drivers/acpi/toshiba_acpi.c
--- 25/drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling	2005-04-04 23:56:25.000000000 -0700
+++ 25-akpm/drivers/acpi/toshiba_acpi.c	2005-04-04 23:56:25.000000000 -0700
@@ -263,6 +263,9 @@ dispatch_write(struct file* file, const 
 	 * destination so that sscanf can be used on it safely.
 	 */
 	tmp_buffer = kmalloc(count + 1, GFP_KERNEL);
+	if(!tmp_buffer)
+		return -ENOMEM;
+
 	if (copy_from_user(tmp_buffer, buffer, count)) {
 		result = -EFAULT;
 	}
_


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

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

end of thread, other threads:[~2005-04-05  6:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-30 21:16 [patch 2/4] acpi: Toshiba failure handling akpm-3NddpPZAyC0
     [not found] ` <200503302116.j2ULGc4Y027730-bipKiLWnuIsyyg0EjBt7GtHuzzzSOjJt@public.gmane.org>
2005-03-31  3:17   ` Len Brown
  -- strict thread matches above, loose matches on Subject: below --
2005-04-05  6:57 akpm-3NddpPZAyC0

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