From: akpm@linux-foundation.org
To: andi@firstfloor.org
Cc: linux-acpi@vger.kernel.org, akpm@linux-foundation.org,
gorcunov@gmail.com
Subject: [patch 1/2] acpi: add checking for NULL early param
Date: Wed, 20 Aug 2008 16:41:45 -0700 [thread overview]
Message-ID: <200808202341.m7KNfkb8005410@imap1.linux-foundation.org> (raw)
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);
_
next reply other threads:[~2008-08-20 23:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-20 23:41 akpm [this message]
2008-08-21 6:46 ` [patch 1/2] acpi: add checking for NULL early param Andi Kleen
2008-08-21 15:34 ` Cyrill Gorcunov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200808202341.m7KNfkb8005410@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=gorcunov@gmail.com \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox