public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/2] acpi: add checking for NULL early param
@ 2008-08-20 23:41 akpm
  2008-08-21  6:46 ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2008-08-20 23:41 UTC (permalink / raw)
  To: andi; +Cc: linux-acpi, akpm, gorcunov

From: Cyrill Gorcunov <gorcunov@gmail.com>

The early_param handling function could recieve NULL pointer as argument
in case if user didn't enter parameter value.  So we have to be ready for
a such situation and do check for NULL pointer if needed.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/acpi/tables.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN drivers/acpi/tables.c~acpi-add-checking-for-null-early-param drivers/acpi/tables.c
--- a/drivers/acpi/tables.c~acpi-add-checking-for-null-early-param
+++ a/drivers/acpi/tables.c
@@ -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);
 
_

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

end of thread, other threads:[~2008-08-21 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-20 23:41 [patch 1/2] acpi: add checking for NULL early param akpm
2008-08-21  6:46 ` Andi Kleen
2008-08-21 15:34   ` Cyrill Gorcunov

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