From: Len Brown <lenb@kernel.org>
To: yakui_zhao <yakui.zhao@intel.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH]: ACPI: Add the module param check for processor.max_cstate
Date: Thu, 23 Apr 2009 23:24:23 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0904232323410.15843@localhost.localdomain> (raw)
In-Reply-To: <1240539912.3651.68.camel@localhost.localdomain>
From: Len Brown <len.brown@intel.com>
Subject: [PATCH] ACPI: prevent processor.max_cstate=0 boot crash
As processor.max_cstate is an init-time-only modparam,
sanity checking it at init-time is sufficient.
http://bugzilla.kernel.org/show_bug.cgi?id=13142
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/processor_idle.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 6fe1214..436127e 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1037,6 +1037,9 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
dev->states[i].desc[0] = '\0';
}
+ if (max_cstate == 0)
+ max_cstate = 1;
+
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
cx = &pr->power.states[i];
state = &dev->states[count];
--
1.6.3.rc1.34.g0be9b
next prev parent reply other threads:[~2009-04-24 3:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-24 2:25 [PATCH]: ACPI: Add the module param check for processor.max_cstate yakui_zhao
2009-04-24 3:24 ` Len Brown [this message]
2009-04-24 3:30 ` yakui_zhao
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=alpine.LFD.2.00.0904232323410.15843@localhost.localdomain \
--to=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=yakui.zhao@intel.com \
/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