mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+516526e174b85b412d92@syzkaller.appspotmail.com>
To: abbotti@mev.co.uk, ds@schleef.org, gregkh@suse.de,
	 hsweeten@visionengravers.com, linux-kernel@vger.kernel.org,
	radu@rendec.net,  syzkaller-bugs@googlegroups.com,
	tglx@kernel.org
Subject: [syzbot] [comedi?] WARNING in request_threaded_irq (2)
Date: Wed, 02 Dec 2026 02:27:37 -0800	[thread overview]
Message-ID: <6b0ff299.8744ccba.1c9cf9.0050.GAE@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    2359fc3f3501 riscv: Fix memory leak in apply_relocate_add
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git for-next
console output: https://syzkaller.appspot.com/x/log.txt?x=149df07e580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=1c926bcddce39a2f
dashboard link: https://syzkaller.appspot.com/bug?extid=516526e174b85b412d92
compiler:       riscv64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
userspace arch: riscv64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/a741b348759c/non_bootable_disk-2359fc3f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bbfc6e81fd5a/vmlinux-2359fc3f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1b578743b797/Image-2359fc3f.xz

The issue was bisected by AI to:

commit 241ab6ad7108e51c67881f7881c5e46f0400cdb1
Author: David Schleef <ds@schleef.org>
Date:   Fri Nov 14 23:03:44 2008 +0000

    Staging: comedi: add comedi_parport driver

reasoning:      https://syzkaller.appspot.com/ai_job?id=9b82251c-c2b7-4404-9154-81f7974b9cb9

AI-generated root cause summary:
When configuring a comedi_parport device via the COMEDI_DEVCONFIG ioctl
(do_devconfig_ioctl()), parport_attach() in
drivers/comedi/drivers/comedi_parport.c accepts a user-supplied IRQ number
it->options[1] in the range 1-15 and passes it directly to request_irq() without
verifying irq_is_percpu_devid() or platform ISA support. Because
CONFIG_COMEDI_PARPORT only depends on HAS_IOPORT rather than ISA, it can be
enabled on non-ISA architectures such as RISC-V where virtual IRQ numbers 1-15
may be allocated to per-CPU interrupts (e.g., via riscv_intc_domain_map()
calling irq_set_percpu_devid()). Calling request_irq() on an IRQ with
IRQ_PER_CPU_DEVID set triggers WARN_ON(irq_settings_is_per_cpu_devid(desc)) in
request_threaded_irq() (kernel/irq/manage.c:2172) and returns -EINVAL.

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=516526e174b85b412d92

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+516526e174b85b412d92@syzkaller.appspotmail.com

The bisection result may be wrong.
If you agree with it, please also add:
Fixes: 241ab6ad7108 ("Staging: comedi: add comedi_parport driver")

------------[ cut here ]------------
WARNING: [irq_settings_is_per_cpu_devid(desc)] kernel/irq/manage.c:2172 at request_threaded_irq+0x320/0x38c kernel/irq/manage.c:2172, CPU#1: syz.0.37/4251
Modules linked in:
CPU: 1 UID: 0 PID: 4251 Comm: syz.0.37 Not tainted syzkaller #0 PREEMPT 
Hardware name: riscv-virtio,qemu (DT)
epc : request_threaded_irq+0x320/0x38c kernel/irq/manage.c:2172
 ra : request_threaded_irq+0x320/0x38c kernel/irq/manage.c:2172
epc : ffffffff8034d790 ra : ffffffff8034d790 sp : ffff8f8008ed77e0
 gp : ffffffff8b34ec40 tp : ffffaf8014295040 t0 : ffffffff8007c360
 t1 : ffffffff86c6b4d0 t2 : ffffffff8017df70 s0 : ffff8f8008ed7840
 s1 : 0000000000000000 a0 : 0000000000000005 a1 : 0000000000000000
 a2 : 0000000000080000 a3 : ffffffff8034d790 a4 : ffff8f8004644178
 a5 : 000000000002b178 a6 : 0000000000000003 a7 : 0000000000001fff
 s2 : 0000000000200000 s3 : ffffaf8012d18800 s4 : 0000000000000004
 s5 : ffffffff84f6940a s6 : ffffaf801dec9000 s7 : 0000000000000000
 s8 : ffffffff87c6ede0 s9 : 0000000000020000 s10: ffffaf801dec9000
 s11: 0000000000000001 t3 : 00000000000000c8 t4 : ffffffff92592a60
 t5 : 0000000000000001 t6 : 0000000000000002 ssp : 0000000000000000
status: 0000000200000120 badaddr: ffffffff8034d790 cause: 0000000000000003
[<ffffffff8034d790>] request_threaded_irq+0x320/0x38c kernel/irq/manage.c:2172
[<ffffffff84f69da2>] request_irq include/linux/interrupt.h:178 [inline]
[<ffffffff84f69da2>] parport_attach drivers/comedi/drivers/comedi_parport.c:248 [inline]
[<ffffffff84f69da2>] parport_attach+0x6be/0x906 drivers/comedi/drivers/comedi_parport.c:231
[<ffffffff84f5b1f2>] comedi_device_attach+0x380/0x828 drivers/comedi/drivers.c:1101
[<ffffffff84f46d52>] do_devconfig_ioctl+0x1a2/0x652 drivers/comedi/comedi_fops.c:931
[<ffffffff84f50ee4>] comedi_unlocked_ioctl+0x752/0x30e0 drivers/comedi/comedi_fops.c:2302
[<ffffffff80ddcb18>] vfs_ioctl fs/ioctl.c:52 [inline]
[<ffffffff80ddcb18>] __do_sys_ioctl fs/ioctl.c:598 [inline]
[<ffffffff80ddcb18>] __se_sys_ioctl fs/ioctl.c:584 [inline]
[<ffffffff80ddcb18>] __riscv_sys_ioctl+0x17c/0x1e2 fs/ioctl.c:584
[<ffffffff8007c360>] syscall_handler+0x92/0x114 arch/riscv/include/asm/syscall.h:112
[<ffffffff867ed0d2>] do_trap_ecall_u+0x4ca/0x658 arch/riscv/kernel/traps.c:341
[<ffffffff8681ae60>] handle_exception+0x168/0x174 arch/riscv/kernel/entry.S:237


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#ai-bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

                 reply	other threads:[~2026-12-02 10:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b0ff299.8744ccba.1c9cf9.0050.GAE@google.com \
    --to=syzbot+516526e174b85b412d92@syzkaller.appspotmail.com \
    --cc=abbotti@mev.co.uk \
    --cc=ds@schleef.org \
    --cc=gregkh@suse.de \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=radu@rendec.net \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®