syzbot


BUG: sleeping function called from invalid context in __bio_release_pages (2)

Status: upstream: reported on 2025/11/13 04:38
Subsystems: scsi
[Documentation on labels]
Reported-by: syzbot+c01f8e6e73f20459912e@syzkaller.appspotmail.com
First crash: 7d15h, last: 6d07h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [scsi?] BUG: sleeping function called from invalid context in __bio_release_pages (2) 0 (1) 2025/11/13 04:38
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: sleeping function called from invalid context in __bio_release_pages scsi 5 14 176d 257d 0/29 auto-obsoleted due to no activity on 2025/08/23 00:40

Sample crash report:
BUG: sleeping function called from invalid context at ./include/linux/pagemap.h:1139
in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 12867, name: kworker/0:6
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
3 locks held by kworker/0:6/12867:
 #0: ffff88813ff15948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x12a2/0x1b70 kernel/workqueue.c:3238
 #1: ffffc90003ddfd00 ((work_completion)(&sfp->ew.work)){+.+.}-{0:0}, at: process_one_work+0x929/0x1b70 kernel/workqueue.c:3239
 #2: ffff88802a618080 (&sfp->rq_list_lock){..-.}-{3:3}, at: sg_remove_sfp_usercontext+0x81/0x590 drivers/scsi/sg.c:2208
irq event stamp: 943738
hardirqs last  enabled at (943737): [<ffffffff8b601a33>] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline]
hardirqs last  enabled at (943737): [<ffffffff8b601a33>] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202
hardirqs last disabled at (943738): [<ffffffff8b601ed2>] __raw_write_lock_irqsave include/linux/rwlock_api_smp.h:184 [inline]
hardirqs last disabled at (943738): [<ffffffff8b601ed2>] _raw_write_lock_irqsave+0x52/0x60 kernel/locking/spinlock.c:318
softirqs last  enabled at (943720): [<ffffffff89b46670>] local_bh_enable include/linux/bottom_half.h:33 [inline]
softirqs last  enabled at (943720): [<ffffffff89b46670>] update_defense_level+0x5d0/0xf70 net/netfilter/ipvs/ip_vs_ctl.c:210
softirqs last disabled at (943718): [<ffffffff89b46184>] local_bh_disable include/linux/bottom_half.h:20 [inline]
softirqs last disabled at (943718): [<ffffffff89b46184>] update_defense_level+0xe4/0xf70 net/netfilter/ipvs/ip_vs_ctl.c:112
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 UID: 0 PID: 12867 Comm: kworker/0:6 Tainted: G     U              syzkaller #0 PREEMPT(full) 
Tainted: [U]=USER
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Workqueue: events sg_remove_sfp_usercontext
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
 __might_resched+0x3c0/0x5e0 kernel/sched/core.c:8927
 folio_lock include/linux/pagemap.h:1139 [inline]
 __bio_release_pages+0x312/0x3b0 block/bio.c:1147
 bio_release_pages include/linux/bio.h:472 [inline]
 blk_rq_unmap_user+0x3be/0x980 block/blk-map.c:639
 sg_finish_rem_req+0xde/0x590 drivers/scsi/sg.c:1835
 sg_remove_sfp_usercontext+0x103/0x590 drivers/scsi/sg.c:2211
 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263
 process_scheduled_works kernel/workqueue.c:3346 [inline]
 worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427
 kthread+0x3c5/0x780 kernel/kthread.c:463
 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/10 12:43 upstream e9a6fb0bcdd7 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto BUG: sleeping function called from invalid context in __bio_release_pages
2025/11/09 04:34 upstream 7bb4d6512545 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto BUG: sleeping function called from invalid context in __bio_release_pages
2025/11/09 04:33 upstream 7bb4d6512545 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto BUG: sleeping function called from invalid context in __bio_release_pages
* Struck through repros no longer work on HEAD.