drivers/comedi/drivers/dt2811.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
#syz test
---
drivers/comedi/drivers/dt2811.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/comedi/drivers/dt2811.c b/drivers/comedi/drivers/dt2811.c
index 0438b8c90e44..5af2c71de4a2 100644
--- a/drivers/comedi/drivers/dt2811.c
+++ b/drivers/comedi/drivers/dt2811.c
@@ -567,7 +567,7 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it)
dt2811_reset(dev);
/* IRQ's 2,3,5,7 are valid for async command support */
- if (it->options[1] <= 7 && (BIT(it->options[1]) & 0xac)) {
+ if (it->options[1]>= 0 && it->options[1] <= 7 && (BIT(it->options[1]) & 0xac)) {
ret = request_irq(it->options[1], dt2811_interrupt, 0,
dev->board_name, dev);
if (ret == 0)
--
2.25.1
Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-by: syzbot+a4cedab706d0a8a3f988@syzkaller.appspotmail.com Tested-by: syzbot+a4cedab706d0a8a3f988@syzkaller.appspotmail.com Tested on: commit: f0100363 Merge tag 'xfs-fixes-7.3-rc5' of gitolite.ker.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=13e6f45e580000 kernel config: https://syzkaller.appspot.com/x/.config?x=7d012d9c67977ee4 dashboard link: https://syzkaller.appspot.com/bug?extid=a4cedab706d0a8a3f988 compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 patch: https://syzkaller.appspot.com/x/patch.diff?x=16dfea71580000 Note: testing is done by a robot and is best-effort only.
© 2016 - 2026 Red Hat, Inc.