Hello,
syzbot found the following issue on:
HEAD commit: 8dac6df92a2e Merge tag 'nfsd-7.4-1' of git://git.kernel.or..
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=134bb54d580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=886d2ddd2d6b664e
dashboard link:
https://syzkaller.appspot.com/bug?extid=eb6c66d8f130ac27fe3a
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
CC: [
andriy.s...@linux.intel.com gre...@linuxfoundation.org hvill...@dimonoff.com ilpo.j...@linux.intel.com jiri...@kernel.org john....@linutronix.de linux...@vger.kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org]
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/dfc787d10469/disk-8dac6df9.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/db7a8e4799da/vmlinux-8dac6df9.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/169073a123bc/bzImage-8dac6df9.xz
AI-generated root cause summary:
A KCSAN data race occurs between move_linked_works() and queue_work_on() when
accessing struct work_struct::data. In move_linked_works(), WORK_STRUCT_LINKED
is inspected via an unmarked plain load (*work_data_bits(work) &
WORK_STRUCT_LINKED) while holding pool->lock. Concurrently, queue_work_on()
locklessly executes test_and_set_bit(WORK_STRUCT_PENDING_BIT,
work_data_bits(work)), performing an instrumented atomic read-modify-write on
the same 8-byte word. In production kernels this race is benign, as
WORK_STRUCT_PENDING_BIT is already set and test_and_set_bit() does not alter
WORK_STRUCT_LINKED_BIT.
full analysis:
https://syzkaller.appspot.com/x/ai_root_cause?x=eb6c66d8f130ac27fe3a
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+eb6c66...@syzkaller.appspotmail.com
==================================================================
BUG: KCSAN: data-race in assign_work / queue_work_on
read-write (marked) to 0xffff8881024444c0 of 8 bytes by interrupt on cpu 0:
instrument_atomic_read_write include/linux/instrumented.h:113 [inline]
test_and_set_bit include/asm-generic/bitops/instrumented-atomic.h:71 [inline]
queue_work_on+0x42/0x150 kernel/workqueue.c:2597
queue_work include/linux/workqueue.h:700 [inline]
tty_buffer_queue_work drivers/tty/tty_buffer.c:66 [inline]
tty_flip_buffer_push+0x82/0x90 drivers/tty/tty_buffer.c:540
serial8250_rx_chars drivers/tty/serial/8250/8250_port.c:1704 [inline]
serial8250_handle_irq_locked+0x40a/0x500 drivers/tty/serial/8250/8250_port.c:1868
serial8250_handle_irq+0xb5/0x260 drivers/tty/serial/8250/8250_port.c:1889
serial8250_default_handle_irq+0x65/0xd0 drivers/tty/serial/8250/8250_port.c:1907
serial8250_interrupt+0x63/0x110 drivers/tty/serial/8250/8250_core.c:87
__handle_irq_event_percpu+0x92/0x4a0 kernel/irq/handle.c:209
handle_irq_event_percpu kernel/irq/handle.c:246 [inline]
handle_irq_event+0x64/0xf0 kernel/irq/handle.c:263
handle_edge_irq+0x155/0x440 kernel/irq/chip.c:859
generic_handle_irq_desc include/linux/irqdesc.h:188 [inline]
handle_irq arch/x86/kernel/irq.c:209 [inline]
call_irq_handler arch/x86/kernel/irq.c:-1 [inline]
__common_interrupt+0x60/0xb0 arch/x86/kernel/irq.c:280
common_interrupt+0x3e/0x90 arch/x86/kernel/irq.c:273
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:665
__sanitizer_cov_trace_cmp8+0x0/0xb0 kernel/kcov.c:303
pie_calculate_probability+0x2f3/0x4c0 net/sched/sch_pie.c:392
fq_pie_timer+0xf6/0x1d0 net/sched/sch_fq_pie.c:403
call_timer_fn+0x36/0x280 kernel/time/timer.c:1749
expire_timers kernel/time/timer.c:1800 [inline]
__run_timers kernel/time/timer.c:2375 [inline]
__run_timer_base+0x40c/0x610 kernel/time/timer.c:2387
run_timer_base kernel/time/timer.c:2396 [inline]
run_timer_softirq+0x31/0x70 kernel/time/timer.c:2406
handle_softirqs+0x109/0x310 kernel/softirq.c:669
__do_softirq kernel/softirq.c:703 [inline]
invoke_softirq kernel/softirq.c:542 [inline]
__irq_exit_rcu+0x40/0xf0 kernel/softirq.c:786
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x74/0x80 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
constant_test_bit arch/x86/include/asm/bitops.h:202 [inline]
arch_test_bit arch/x86/include/asm/bitops.h:232 [inline]
_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
folio_test_unevictable include/linux/page-flags.h:641 [inline]
lru_gen_inc_refs mm/folio.c:386 [inline]
folio_mark_accessed+0x93/0x460 mm/folio.c:457
folio_add_lru+0x14a/0x190 mm/folio.c:515
folio_add_lru_vma+0x5d/0x80 mm/folio.c:537
wp_page_copy mm/memory.c:4172 [inline]
do_wp_page+0x13e8/0x2100 mm/memory.c:4569
handle_pte_fault mm/memory.c:6716 [inline]
__handle_mm_fault mm/memory.c:6841 [inline]
handle_mm_fault+0xe72/0x3880 mm/memory.c:7008
do_user_addr_fault+0x3ce/0xde0 arch/x86/mm/fault.c:1343
handle_page_fault arch/x86/mm/fault.c:1483 [inline]
exc_page_fault+0x62/0xa0 arch/x86/mm/fault.c:1536
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595
read to 0xffff8881024444c0 of 8 bytes by task 421 on cpu 1:
move_linked_works kernel/workqueue.c:1211 [inline]
assign_work+0x1c5/0x310 kernel/workqueue.c:1272
worker_thread+0x55b/0x770 kernel/workqueue.c:3658
kthread+0x248/0x2a0 kernel/kthread.c:436
ret_from_fork+0x146/0x330 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 421 Comm: kworker/u8:7 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Workqueue: 0x0 (ttyS-serial_8250)
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup