syzbot


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

Status: upstream: reported C repro on 2024/03/22 09:16
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+37e68cdad38ff6f2bde3@syzkaller.appspotmail.com
First crash: 244d, last: 27d
Fix bisection: failed (error log, bisect log)
  
Bug presence (2)
Date Name Commit Repro Result
2024/06/25 linux-5.15.y (ToT) 4878aadf2d15 C [report] BUG: sleeping function called from invalid context in console_lock
2024/06/25 upstream (ToT) 55027e689933 C Didn't crash
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 BUG: sleeping function called from invalid context in console_lock origin:upstream C inconclusive 958 129d 612d 0/3 upstream: reported C repro on 2023/03/20 10:28
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
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/10/25 09:39 15m retest repro linux-5.15.y report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/09/17 14:41 1m fix candidate upstream error job log
2024/08/13 23:36 0m bisect fix linux-5.15.y error job log

Sample crash report:
BUG: sleeping function called from invalid context at kernel/printk/printk.c:2555
in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 4024, name: syz-executor187
3 locks held by syz-executor187/4024:
 #0: ffff0000cd343098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x40/0x50 drivers/tty/tty_ldsem.c:340
 #1: ffff0000cd343130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:961 [inline]
 #1: ffff0000cd343130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: do_tty_write drivers/tty/tty_io.c:984 [inline]
 #1: ffff0000cd343130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write+0x1d4/0x758 drivers/tty/tty_io.c:1110
 #2: ffff0000cd342398 (&gsm->tx_lock){....}-{2:2}, at: gsmld_write+0x60/0x164 drivers/tty/n_gsm.c:2983
irq event stamp: 9286
hardirqs last  enabled at (9285): [<ffff800011a72328>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
hardirqs last  enabled at (9285): [<ffff800011a72328>] _raw_spin_unlock_irqrestore+0xac/0x158 kernel/locking/spinlock.c:194
hardirqs last disabled at (9286): [<ffff800011a71e04>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
hardirqs last disabled at (9286): [<ffff800011a71e04>] _raw_spin_lock_irqsave+0xfc/0x14c kernel/locking/spinlock.c:162
softirqs last  enabled at (9266): [<ffff8000080308b0>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:31
softirqs last disabled at (9264): [<ffff80000803087c>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:18
Preemption disabled at:
[<ffff80000b4108d8>] gsmld_write+0x60/0x164 drivers/tty/n_gsm.c:2983
CPU: 0 PID: 4024 Comm: syz-executor187 Not tainted 5.15.161-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call trace:
 dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 ___might_sleep+0x380/0x4dc kernel/sched/core.c:9626
 __might_sleep+0x98/0xf0 kernel/sched/core.c:9580
 console_lock+0x30/0x16c kernel/printk/printk.c:2555
 do_con_write+0x110/0x5934 drivers/tty/vt/vt.c:2908
 con_write+0x34/0x58 drivers/tty/vt/vt.c:3295
 gsmld_write+0x108/0x164 drivers/tty/n_gsm.c:2986
 do_tty_write drivers/tty/tty_io.c:1038 [inline]
 file_tty_write+0x44c/0x758 drivers/tty/tty_io.c:1110
 tty_write+0x48/0x58 drivers/tty/tty_io.c:1131
 call_write_iter include/linux/fs.h:2172 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0x87c/0xb3c fs/read_write.c:594
 ksys_write+0x15c/0x26c fs/read_write.c:647
 __do_sys_write fs/read_write.c:659 [inline]
 __se_sys_write fs/read_write.c:656 [inline]
 __arm64_sys_write+0x7c/0x90 fs/read_write.c:656
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Crashes (17):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/24 08:24 linux-5.15.y 4878aadf2d15 edc5149a .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/07/07 07:30 linux-5.15.y f45bea23c39c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: sleeping function called from invalid context in console_lock
2024/04/20 23:21 linux-5.15.y c52b9710c83d af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: sleeping function called from invalid context in console_lock
2024/03/28 05:30 linux-5.15.y 9465fef4ae35 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: sleeping function called from invalid context in console_lock
2024/03/22 09:16 linux-5.15.y b95c01af2113 7a239ce7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: sleeping function called from invalid context in console_lock
2024/07/06 10:03 linux-5.15.y f45bea23c39c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/06/24 06:58 linux-5.15.y 4878aadf2d15 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/06/10 00:04 linux-5.15.y c61bd26ae81a 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/06/02 11:59 linux-5.15.y c61bd26ae81a 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/05/13 19:09 linux-5.15.y 284087d4f7d5 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/20 11:20 linux-5.15.y c52b9710c83d af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/20 00:18 linux-5.15.y c52b9710c83d af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/17 20:50 linux-5.15.y c52b9710c83d acc528cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/14 16:40 linux-5.15.y fa3df276cd36 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/12 23:57 linux-5.15.y cdfd0a7f0139 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/12 23:57 linux-5.15.y cdfd0a7f0139 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
2024/04/12 23:57 linux-5.15.y cdfd0a7f0139 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: sleeping function called from invalid context in console_lock
* Struck through repros no longer work on HEAD.