syzbot


KCSAN: data-race in __lru_add_drain_all / folio_activate (6)

Status: auto-obsoleted due to no activity on 2024/08/13 15:34
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+fd28149a73d268a39f45@syzkaller.appspotmail.com
First crash: 100d, last: 100d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __lru_add_drain_all / folio_activate mm 2 717d 736d 0/28 auto-obsoleted due to no activity on 2022/12/05 13:00
upstream KCSAN: data-race in __lru_add_drain_all / folio_activate (3) mm 1 543d 543d 0/28 auto-obsoleted due to no activity on 2023/05/29 00:21
upstream KCSAN: data-race in __lru_add_drain_all / folio_activate (2) mm 2 613d 650d 0/28 auto-obsoleted due to no activity on 2023/04/01 02:31
upstream KCSAN: data-race in __lru_add_drain_all / folio_activate (5) mm 2 151d 176d 0/28 auto-obsoleted due to no activity on 2024/06/23 21:11
upstream KCSAN: data-race in __lru_add_drain_all / folio_activate (4) mm 23 250d 314d 0/28 auto-obsoleted due to no activity on 2024/03/16 06:00

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / folio_activate

read-write to 0xffff888237c2b008 of 1 bytes by task 9051 on cpu 0:
 folio_batch_add include/linux/pagevec.h:77 [inline]
 folio_batch_add_and_move mm/swap.c:233 [inline]
 folio_activate+0xb7/0x1c0 mm/swap.c:363
 folio_mark_accessed+0x11d/0x190 mm/swap.c:486
 zap_present_folio_ptes mm/memory.c:1490 [inline]
 zap_present_ptes mm/memory.c:1564 [inline]
 zap_pte_range mm/memory.c:1606 [inline]
 zap_pmd_range mm/memory.c:1724 [inline]
 zap_pud_range mm/memory.c:1753 [inline]
 zap_p4d_range mm/memory.c:1774 [inline]
 unmap_page_range+0xecc/0x21f0 mm/memory.c:1795
 unmap_single_vma+0x142/0x1d0 mm/memory.c:1841
 unmap_vmas+0x18d/0x2b0 mm/memory.c:1885
 exit_mmap+0x18f/0x710 mm/mmap.c:3341
 __mmput+0x28/0x1c0 kernel/fork.c:1346
 mmput+0x4c/0x60 kernel/fork.c:1368
 exit_mm+0xe4/0x190 kernel/exit.c:567
 do_exit+0x556/0x1710 kernel/exit.c:863
 do_group_exit+0x102/0x150 kernel/exit.c:1025
 get_signal+0xf2f/0x1080 kernel/signal.c:2909
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x59/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237c2b008 of 1 bytes by task 9065 on cpu 1:
 folio_batch_count include/linux/pagevec.h:56 [inline]
 cpu_needs_drain mm/swap.c:805 [inline]
 __lru_add_drain_all+0x212/0x410 mm/swap.c:894
 lru_add_drain_all+0x10/0x20 mm/swap.c:910
 invalidate_bdev+0x47/0x70 block/bdev.c:100
 invalidate_disk+0x29/0x70 block/genhd.c:745
 __loop_clr_fd+0x191/0x3f0 drivers/block/loop.c:1183
 loop_clr_fd drivers/block/loop.c:1276 [inline]
 lo_ioctl+0xea6/0x1330 drivers/block/loop.c:1578
 blkdev_ioctl+0x35f/0x450 block/ioctl.c:676
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xd3/0x150 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x1581/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:17
 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: 0x06 -> 0x08

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 9065 Comm: syz.3.1858 Tainted: G        W          6.10.0-rc7-syzkaller-00003-g4376e966ecb7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================
xt_CT: You must specify a L4 protocol and not use inversions on it

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/09 15:34 upstream 4376e966ecb7 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_activate
* Struck through repros no longer work on HEAD.