syzbot


BUG: sleeping function called from invalid context in console_lock

Status: upstream: reported C repro on 2023/03/20 10:28
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+3b4e5a312b4a72ffb261@syzkaller.appspotmail.com
First crash: 612d, last: 129d
Fix bisection: the issue occurs on the latest tested release (bisect log)
  
Bug presence (1)
Date Name Commit Repro Result
2024/05/14 upstream (ToT) a7c840ba5fa7 C [report] BUG: sleeping function called from invalid context in console_lock
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 BUG: sleeping function called from invalid context in console_lock (2) origin:lts-only C error 17 27d 244d 0/3 upstream: reported C repro on 2024/03/22 09:16
upstream BUG: sleeping function called from invalid context in console_lock (2) serial C inconclusive inconclusive 7447 169d 1263d 25/28 fixed on 2024/06/05 13:52
linux-5.15 BUG: sleeping function called from invalid context in console_lock 4 396d 545d 0/3 auto-obsoleted due to no activity on 2024/01/30 12:42
upstream BUG: sleeping function called from invalid context in console_lock serial 1 1649d 1648d 0/28 auto-closed as invalid on 2020/09/14 09:18
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/08/23 19:08 1h29m bisect fix linux-6.1.y OK (0) job log
2024/07/15 01:24 1h04m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
BUG: sleeping function called from invalid context at kernel/printk/printk.c:2623
in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 3544, name: syz-executor376
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
3 locks held by syz-executor376/3544:
 #0: ffff888079dff098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffff888079dff130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:944 [inline]
 #1: ffff888079dff130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: do_tty_write drivers/tty/tty_io.c:967 [inline]
 #1: ffff888079dff130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write+0x1f5/0x890 drivers/tty/tty_io.c:1089
 #2: ffff8880182923e0 (&gsm->tx_lock){....}-{2:2}, at: gsmld_write+0x5b/0x120 drivers/tty/n_gsm.c:3060
irq event stamp: 18468
hardirqs last  enabled at (18467): [<ffffffff8a8abe8e>] syscall_enter_from_user_mode+0x2e/0x230 kernel/entry/common.c:117
hardirqs last disabled at (18468): [<ffffffff8a94f81c>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
hardirqs last disabled at (18468): [<ffffffff8a94f81c>] _raw_spin_lock_irqsave+0xac/0x120 kernel/locking/spinlock.c:162
softirqs last  enabled at (16926): [<ffffffff8132acaf>] local_bh_disable include/linux/bottom_half.h:20 [inline]
softirqs last  enabled at (16926): [<ffffffff8132acaf>] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline]
softirqs last  enabled at (16926): [<ffffffff8132acaf>] fpu_reset_fpregs arch/x86/kernel/fpu/core.c:682 [inline]
softirqs last  enabled at (16926): [<ffffffff8132acaf>] fpu_flush_thread+0x1df/0x340 arch/x86/kernel/fpu/core.c:743
softirqs last disabled at (16924): [<ffffffff8132acaf>] local_bh_disable include/linux/bottom_half.h:20 [inline]
softirqs last disabled at (16924): [<ffffffff8132acaf>] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline]
softirqs last disabled at (16924): [<ffffffff8132acaf>] fpu_reset_fpregs arch/x86/kernel/fpu/core.c:682 [inline]
softirqs last disabled at (16924): [<ffffffff8132acaf>] fpu_flush_thread+0x1df/0x340 arch/x86/kernel/fpu/core.c:743
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 PID: 3544 Comm: syz-executor376 Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 __might_resched+0x5cb/0x780 kernel/sched/core.c:9942
 console_lock+0x1c/0x1c0 kernel/printk/printk.c:2623
 do_con_write+0x110/0x7270 drivers/tty/vt/vt.c:2908
 con_write+0x20/0x40 drivers/tty/vt/vt.c:3295
 gsmld_write+0xf9/0x120 drivers/tty/n_gsm.c:3063
 do_tty_write drivers/tty/tty_io.c:1018 [inline]
 file_tty_write+0x504/0x890 drivers/tty/tty_io.c:1089
 call_write_iter include/linux/fs.h:2265 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x7ae/0xba0 fs/read_write.c:584
 ksys_write+0x19c/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fdc063fb569
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff68d6bf08 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fff68d6c0d8 RCX: 00007fdc063fb569
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007fdc0646e610 R08: 00007fff68d6bc17 R09: 00007fff68d6c0d8
R10: 000000000000000d R11: 0000000000000246 R12: 0000000000000001
R13: 00007fff68d6c0c8 R14: 0000000000000001 R15: 0000000000000001

Crashes (958):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/13 18:51 linux-6.1.y 909ba1f1b414 9026e142 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in console_lock
2024/04/22 07:42 linux-6.1.y 6741e066ec76 af24b050 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/01 00:10 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/12/27 06:31 linux-6.1.y 4aa6747d9352 fb427a07 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/12/17 08:17 linux-6.1.y ba6f5fb46511 3222d10c .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/12/17 07:36 linux-6.1.y ba6f5fb46511 3222d10c .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/12/16 23:35 linux-6.1.y ba6f5fb46511 3222d10c .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/12/16 12:51 linux-6.1.y ba6f5fb46511 3222d10c .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/12/10 12:36 linux-6.1.y 6c6a6c7e211c 28b24332 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/12/02 13:53 linux-6.1.y 6ac30d748bb0 f819d6f7 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/12/01 08:33 linux-6.1.y 6ac30d748bb0 f819d6f7 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/03/20 10:41 linux-6.1.y 7eaef76fbc46 7939252e .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/05/14 12:23 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in console_lock
2023/08/23 01:14 linux-6.1.y 6c44e13dc284 b81ca3f6 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/06/02 23:34 linux-6.1.y 88690811da69 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in console_lock
2024/05/17 04:15 linux-6.1.y 909ba1f1b414 c2e07261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in console_lock
2024/05/11 16:44 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in console_lock
2024/04/30 15:03 linux-6.1.y dcbc050cb0d3 3ce4924c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in console_lock
2024/04/29 22:40 linux-6.1.y dcbc050cb0d3 f10afd69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in console_lock
2024/04/29 07:56 linux-6.1.y f2295faba5e8 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: sleeping function called from invalid context in console_lock
2024/05/22 07:36 linux-6.1.y 4078fa637fcd 1014eca7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/18 22:01 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/17 02:27 linux-6.1.y 909ba1f1b414 c2e07261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/13 01:14 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/11 12:55 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/03 21:18 linux-6.1.y 909ba1f1b414 dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/03 01:39 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/03 00:16 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/02 23:53 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/02 20:27 linux-6.1.y 909ba1f1b414 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/02 18:23 linux-6.1.y 909ba1f1b414 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/02 16:30 linux-6.1.y 909ba1f1b414 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/02 01:50 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/02 00:47 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/01 04:43 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/01 02:06 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/30 16:16 linux-6.1.y dcbc050cb0d3 3ce4924c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/30 14:24 linux-6.1.y dcbc050cb0d3 3ce4924c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/30 13:17 linux-6.1.y dcbc050cb0d3 3ce4924c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/30 11:09 linux-6.1.y dcbc050cb0d3 f10afd69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/29 23:57 linux-6.1.y dcbc050cb0d3 f10afd69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/29 15:21 linux-6.1.y dcbc050cb0d3 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/29 13:39 linux-6.1.y dcbc050cb0d3 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/29 13:03 linux-6.1.y dcbc050cb0d3 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/29 10:32 linux-6.1.y f2295faba5e8 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/29 09:32 linux-6.1.y f2295faba5e8 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/29 03:30 linux-6.1.y f2295faba5e8 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/29 01:00 linux-6.1.y f2295faba5e8 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/28 22:59 linux-6.1.y f2295faba5e8 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/28 20:00 linux-6.1.y f2295faba5e8 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/28 18:08 linux-6.1.y f2295faba5e8 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/28 10:21 linux-6.1.y f2295faba5e8 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/27 19:35 linux-6.1.y f2295faba5e8 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/27 16:23 linux-6.1.y f2295faba5e8 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/27 06:35 linux-6.1.y 6741e066ec76 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/27 04:13 linux-6.1.y 6741e066ec76 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/26 21:00 linux-6.1.y 6741e066ec76 059e9963 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/26 15:56 linux-6.1.y 6741e066ec76 059e9963 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/26 15:34 linux-6.1.y 6741e066ec76 059e9963 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/26 09:53 linux-6.1.y 6741e066ec76 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2023/03/20 10:27 linux-6.1.y 7eaef76fbc46 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
* Struck through repros no longer work on HEAD.