acpi: Toshiba failure handling
PATCH 2/4 acpi: Toshiba failure handling
From: "Panagiotis Issaris" <panagiotis.issaris-hfxpx0nnwYVX2QMWbMbClIble9XqW/[email protected]>
Adds the missing failure handling for a kmalloc in the Toshiba ACPI driver.
---
25-akpm/drivers/acpi/toshiba_acpi.c | 3 +++ 1 files changed, 3 insertions(+)
drivers/acpi/toshiba_acpi.c renamed from drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling +3 -0
@@ -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
Len Brown
AppliedApplied.
thanks,
-Len
Quoted 28 lines · On Wed, 2005-03-30 at 16:16, [email protected] wrote:
From: "Panagiotis Issaris" <panagiotis.issaris-hfxpx0nnwYVX2QMWbMbClIble9XqW/[email protected]>
Adds the missing failure handling for a kmalloc in the Toshiba ACPI driver.
Signed-off-by Panagiotis Issaris <takis-8nu/[email protected]>Signed-off-by Andrew Morton <[email protected]>---
25-akpm/drivers/acpi/toshiba_acpi.c | 3 +++ 1 files changed, 3 insertions(+)diff -puN
drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handlingdrivers/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.cWed Mar 30 13:16:02 2005drivers/acpi/toshiba_acpi.c renamed from drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling +3
-0@@ -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 ; }
Quoted 3 lines
_
-------------------------------------------------------
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