Skip to content

Commit

Permalink
[PATCH] kernelparams: detect if and which parameter parsing enabled i…
Browse files Browse the repository at this point in the history
…rq's

The parsing of some kernel parameters seem to enable irq's at a stage that
irq's are not supposed to be enabled (Particularly the ide kernel parameters).

Having irq's enabled before the irq controller is initialized might lead to a
kernel panic.  This patch only detects this behaviour and warns about wich
parameter caused it.

[akpm@osdl.org: cleanups]
Signed-off-by: Ard van Breemen <ard@telegraafnet.nl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ard van Breemen authored and Linus Torvalds committed Jan 6, 2007
1 parent c4a6830 commit a416aba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,15 @@ int parse_args(const char *name,

while (*args) {
int ret;
int irq_was_disabled;

args = next_arg(args, &param, &val);
irq_was_disabled = irqs_disabled();
ret = parse_one(param, val, params, num, unknown);
if (irq_was_disabled && !irqs_disabled()) {
printk(KERN_WARNING "parse_args(): option '%s' enabled "
"irq's!\n", param);
}
switch (ret) {
case -ENOENT:
printk(KERN_ERR "%s: Unknown parameter `%s'\n",
Expand Down

0 comments on commit a416aba

Please sign in to comment.