syzbot


KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl

Status: auto-obsoleted due to no activity on 2022/10/24 16:46
Subsystems: serial
[Documentation on labels]
First crash: 578d, last: 578d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl (5) serial 5 6d09h 40d 0/26 moderation: reported on 2024/03/10 17:13
upstream KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl (4) serial 1 119d 119d 0/26 auto-obsoleted due to no activity on 2024/01/26 04:56
upstream KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl (2) serial 14 353d 528d 0/26 auto-obsoleted due to no activity on 2023/06/06 13:18
upstream KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl (3) serial 6 244d 307d 0/26 auto-obsoleted due to no activity on 2023/09/23 08:11

Sample crash report:
==================================================================
BUG: KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl

write to 0xffffc9000c805270 of 8 bytes by task 19366 on cpu 0:
 reset_buffer_flags drivers/tty/n_tty.c:340 [inline]
 n_tty_flush_buffer+0x9b/0x180 drivers/tty/n_tty.c:371
 tty_ldisc_hangup+0x72/0x470 drivers/tty/tty_ldisc.c:694
 __tty_hangup+0x438/0x5b0 drivers/tty/tty_io.c:637
 tty_vhangup+0x13/0x20 drivers/tty/tty_io.c:707
 pty_close+0x25e/0x280 drivers/tty/pty.c:79
 tty_release+0x255/0x9d0 drivers/tty/tty_io.c:1758
 __fput+0x292/0x510 fs/file_table.c:320
 ____fput+0x11/0x20 fs/file_table.c:353
 task_work_run+0x8e/0x110 kernel/task_work.c:177
 get_signal+0xeca/0x1020 kernel/signal.c:2634
 arch_do_signal_or_restart+0x87/0x2d0 arch/x86/kernel/signal.c:869
 exit_to_user_mode_loop+0x78/0x130 kernel/entry/common.c:166
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read-write to 0xffffc9000c805270 of 8 bytes by task 8 on cpu 1:
 n_tty_lookahead_flow_ctrl+0x4f/0x2f0 drivers/tty/n_tty.c:1490
 tty_port_default_lookahead_buf+0x81/0xb0 drivers/tty/tty_port.c:61
 lookahead_bufs drivers/tty/tty_buffer.c:498 [inline]
 flush_to_ldisc+0x33e/0x470 drivers/tty/tty_buffer.c:568
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30

value changed: 0x0000000000001ff9 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8 Comm: kworker/u4:0 Not tainted 6.0.0-rc6-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Workqueue: events_unbound flush_to_ldisc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/19 16:41 upstream 521a547ced64 dd9a85ff .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl
* Struck through repros no longer work on HEAD.