syzbot


KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq (2)

Status: moderation: reported on 2024/12/19 22:40
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+5f348e3542302335e61e@syzkaller.appspotmail.com
First crash: 54d, last: 1d04h
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq serial 3 553d 569d 0/28 auto-obsoleted due to no activity on 2023/09/13 05:36

Sample crash report:
==================================================================
BUG: KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq

write to 0xffffffff88c405c6 of 1 bytes by task 22450 on cpu 1:
 serial8250_do_startup+0x165c/0x1ea0 drivers/tty/serial/8250/8250_port.c:2468
 serial8250_startup+0x40/0x50 drivers/tty/serial/8250/8250_port.c:2490
 uart_port_startup drivers/tty/serial/serial_core.c:323 [inline]
 uart_startup+0x481/0x9b0 drivers/tty/serial/serial_core.c:367
 uart_port_activate+0x66/0xb0 drivers/tty/serial/serial_core.c:1994
 tty_port_open+0x160/0x1f0 drivers/tty/tty_port.c:784
 uart_open+0x30/0x40 drivers/tty/serial/serial_core.c:1974
 tty_open+0x3d4/0xb00 drivers/tty/tty_io.c:2146
 chrdev_open+0x2f9/0x370 fs/char_dev.c:414
 do_dentry_open+0x621/0xa20 fs/open.c:956
 vfs_open+0x38/0x1e0 fs/open.c:1086
 do_open fs/namei.c:3830 [inline]
 path_openat+0x1ae0/0x1fc0 fs/namei.c:3989
 do_filp_open+0x107/0x230 fs/namei.c:4016
 do_sys_openat2+0xab/0x120 fs/open.c:1428
 do_sys_open fs/open.c:1443 [inline]
 __do_sys_openat fs/open.c:1459 [inline]
 __se_sys_openat fs/open.c:1454 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1454
 x64_sys_call+0x2b30/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff88c405c6 of 1 bytes by interrupt on cpu 0:
 serial8250_handle_irq+0x3c9/0x620 drivers/tty/serial/8250/8250_port.c:1950
 serial8250_default_handle_irq+0x94/0x130 drivers/tty/serial/8250/8250_port.c:1972
 serial8250_interrupt+0x5d/0x120 drivers/tty/serial/8250/8250_core.c:86
 __handle_irq_event_percpu+0x95/0x490 kernel/irq/handle.c:158
 handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
 handle_irq_event+0x64/0xf0 kernel/irq/handle.c:210
 handle_edge_irq+0x16d/0x5b0 kernel/irq/chip.c:831
 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline]
 handle_irq arch/x86/kernel/irq.c:247 [inline]
 call_irq_handler arch/x86/kernel/irq.c:259 [inline]
 __common_interrupt+0x58/0xe0 arch/x86/kernel/irq.c:285
 common_interrupt+0x7c/0x90 arch/x86/kernel/irq.c:278
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
 get_current arch/x86/include/asm/current.h:49 [inline]
 write_comp_data kernel/kcov.c:245 [inline]
 __sanitizer_cov_trace_const_cmp4+0x11/0x90 kernel/kcov.c:314
 atime_needs_update+0x41/0x3e0 fs/inode.c:2144
 pick_link+0x2f9/0x7e0 fs/namei.c:1897
 step_into+0x748/0x820 fs/namei.c:1984
 walk_component fs/namei.c:2120 [inline]
 link_path_walk+0x50e/0x830 fs/namei.c:2479
 path_lookupat+0x72/0x2b0 fs/namei.c:2635
 filename_lookup+0x150/0x340 fs/namei.c:2665
 vfs_statx+0x9a/0x170 fs/stat.c:346
 vfs_fstatat fs/stat.c:368 [inline]
 __do_sys_newfstatat fs/stat.c:532 [inline]
 __se_sys_newfstatat+0xdc/0x300 fs/stat.c:526
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:526
 x64_sys_call+0x236d/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:263
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00 -> 0x05

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 22451 Comm: modprobe Not tainted 6.14.0-rc2-syzkaller-00034-gfebbc555cf0f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/11 10:27 upstream febbc555cf0f 43f51a00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq
2025/02/06 06:46 upstream 92514ef226f5 577d049b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq
2024/12/19 22:39 upstream baaa2567a712 5905cb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq
* Struck through repros no longer work on HEAD.