mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 22:09:30 +02:00
parisc: eisa: Fix infinite loop when parsing invalid IRQ value
When an invalid value is passed via the "eisa_irq_edge=" kernel command line parameter (e.g. "eisa_irq_edge=16,5"), eisa_irq_setup() prints an error message and continues without advancing the current position. As a result the same invalid value is parsed again and again, causing an infinite loop while the kernel boots. Advance to the next comma-separated entry, or stop parsing when there is no next entry, before continuing so that the remaining entries are processed normally. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Cc: stable@vger.kernel.org Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
@@ -442,6 +442,11 @@ static int __init eisa_irq_setup(char *str)
|
||||
val = (int) simple_strtoul(cur, &pe, 0);
|
||||
if (val > 15 || val < 0) {
|
||||
printk(KERN_ERR "eisa: EISA irq value are 0-15\n");
|
||||
cur = strchr(cur, ',');
|
||||
if (cur)
|
||||
cur++;
|
||||
else
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
if (val == 2) {
|
||||
|
||||
Reference in New Issue
Block a user