syzbot


KCSAN: data-race in n_tty_receive_char_inline / n_tty_write

Status: auto-closed as invalid on 2021/05/17 09:21
Subsystems: serial
[Documentation on labels]
First crash: 1602d, last: 1602d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_receive_char_inline / n_tty_write (2) serial 6 1 1549d 1549d 0/29 auto-closed as invalid on 2021/06/27 20:47

Sample crash report:
==================================================================
BUG: KCSAN: data-race in n_tty_receive_char_inline / n_tty_write

write to 0xffffc9001741d028 of 8 bytes by task 12082 on cpu 0:
 commit_echoes drivers/tty/n_tty.c:776 [inline]
 n_tty_receive_char_inline+0x4d8/0x680 drivers/tty/n_tty.c:1417
 n_tty_receive_buf_standard drivers/tty/n_tty.c:1579 [inline]
 __receive_buf drivers/tty/n_tty.c:1642 [inline]
 n_tty_receive_buf_common+0x1893/0x1e20 drivers/tty/n_tty.c:1739
 n_tty_receive_buf2+0x2e/0x40 drivers/tty/n_tty.c:1774
 tty_ldisc_receive_buf+0x61/0xf0 drivers/tty/tty_buffer.c:461
 tty_port_default_receive_buf+0x54/0x80 drivers/tty/tty_port.c:38
 receive_buf drivers/tty/tty_buffer.c:481 [inline]
 flush_to_ldisc+0x1c5/0x2c0 drivers/tty/tty_buffer.c:533
 process_one_work+0x3e1/0x950 kernel/workqueue.c:2275
 worker_thread+0x616/0xa70 kernel/workqueue.c:2421
 kthread+0x20b/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

read to 0xffffc9001741d028 of 8 bytes by task 18131 on cpu 1:
 process_echoes drivers/tty/n_tty.c:802 [inline]
 n_tty_write+0x137/0xaf0 drivers/tty/n_tty.c:2339
 do_tty_write drivers/tty/tty_io.c:1043 [inline]
 file_tty_write+0x409/0x660 drivers/tty/tty_io.c:1133
 tty_write+0x24/0x30 drivers/tty/tty_io.c:1140
 call_write_iter include/linux/fs.h:1977 [inline]
 new_sync_write fs/read_write.c:518 [inline]
 vfs_write+0x6f9/0x7e0 fs/read_write.c:605
 ksys_write+0xce/0x180 fs/read_write.c:658
 __do_sys_write fs/read_write.c:670 [inline]
 __se_sys_write fs/read_write.c:667 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:667
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 18131 Comm: syz-executor.2 Not tainted 5.12.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/01 00:15 upstream d19cc4bfbff1 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_char_inline / n_tty_write
* Struck through repros no longer work on HEAD.