summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPei Xiao <xiaopei01@kylinos.cn>2026-08-17 11:29:25 +0800
committerHelge Deller <deller@gmx.de>2026-08-18 11:43:05 +0200
commit8b585431a16cfb9d8f2955a9fa0787ce3dceb3c2 (patch)
treec888e8c5ee594758c1338fd479f00673c9445295
parent04cf68c9a76e3c6b67ad056a66a14923abf85925 (diff)
downloadlinux-next-8b585431a16cfb9d8f2955a9fa0787ce3dceb3c2.tar.gz
linux-next-8b585431a16cfb9d8f2955a9fa0787ce3dceb3c2.zip
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>
-rw-r--r--drivers/parisc/eisa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c
index 9eab974e6baf..b5b5413bfd1e 100644
--- a/drivers/parisc/eisa.c
+++ b/drivers/parisc/eisa.c
@@ -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) {