* [PATCH] parisc: eisa: Fix infinite loop when parsing invalid IRQ value
@ 2026-08-17 3:29 Pei Xiao
2026-08-18 9:46 ` Helge Deller
0 siblings, 1 reply; 2+ messages in thread
From: Pei Xiao @ 2026-08-17 3:29 UTC (permalink / raw)
To: James.Bottomley, deller, linux-parisc, linux-kernel; +Cc: Pei Xiao
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.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
drivers/parisc/eisa.c | 5 +++++
1 file changed, 5 insertions(+)
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) {
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] parisc: eisa: Fix infinite loop when parsing invalid IRQ value
2026-08-17 3:29 [PATCH] parisc: eisa: Fix infinite loop when parsing invalid IRQ value Pei Xiao
@ 2026-08-18 9:46 ` Helge Deller
0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2026-08-18 9:46 UTC (permalink / raw)
To: Pei Xiao, James.Bottomley, linux-parisc, linux-kernel
On 8/17/26 05:29, Pei Xiao wrote:
> 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.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---
> drivers/parisc/eisa.c | 5 +++++
> 1 file changed, 5 insertions(+)
applied.
Thanks!
Helge
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-18 9:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17 3:29 [PATCH] parisc: eisa: Fix infinite loop when parsing invalid IRQ value Pei Xiao
2026-08-18 9:46 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox