[moderation] [mm?] KCSAN: data-race in __lru_add_drain_all / folio_activate (5)

0 views
Skip to first unread message

syzbot

unread,
Apr 24, 2024, 6:06:33 PM (9 days ago) Apr 24
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e88c4cfcb7b8 Merge tag 'for-6.9-rc5-tag' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=108e9380980000
kernel config: https://syzkaller.appspot.com/x/.config?x=4128b708dfac799b
dashboard link: https://syzkaller.appspot.com/bug?extid=a0daad591f6e1466327b
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/06508e2c52b4/disk-e88c4cfc.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f4362fce12b5/vmlinux-e88c4cfc.xz
kernel image: https://storage.googleapis.com/syzbot-assets/93228f45c53c/bzImage-e88c4cfc.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a0daad...@syzkaller.appspotmail.com

loop0: detected capacity change from 0 to 512
EXT4-fs (loop0): blocks per group (255) and clusters per group (4095) inconsistent
==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / folio_activate

read-write to 0xffff888237d2b008 of 1 bytes by task 63 on cpu 1:
folio_batch_add include/linux/pagevec.h:77 [inline]
folio_batch_add_and_move mm/swap.c:246 [inline]
folio_activate+0xb7/0x1c0 mm/swap.c:376
folio_mark_accessed+0x11d/0x190 mm/swap.c:496
shmem_file_read_iter+0x2d1/0x550 mm/shmem.c:2861
do_iter_readv_writev+0x339/0x3e0
vfs_iter_read+0x172/0x3a0 fs/read_write.c:830
lo_read_simple drivers/block/loop.c:286 [inline]
do_req_filebacked drivers/block/loop.c:496 [inline]
loop_handle_cmd drivers/block/loop.c:1907 [inline]
loop_process_work+0x7bc/0x1110 drivers/block/loop.c:1942
loop_rootcg_workfn+0x22/0x30 drivers/block/loop.c:1973
process_one_work kernel/workqueue.c:3254 [inline]
process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335
worker_thread+0x526/0x730 kernel/workqueue.c:3416
kthread+0x1d1/0x210 kernel/kthread.c:388
ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888237d2b008 of 1 bytes by task 6510 on cpu 0:
folio_batch_count include/linux/pagevec.h:56 [inline]
cpu_needs_drain mm/swap.c:815 [inline]
__lru_add_drain_all+0x21d/0x420 mm/swap.c:904
lru_add_drain_all+0x10/0x20 mm/swap.c:920
invalidate_bdev+0x54/0x80 block/bdev.c:95
__ext4_fill_super fs/ext4/super.c:5674 [inline]
ext4_fill_super+0x1788/0x39d0 fs/ext4/super.c:5699
get_tree_bdev+0x253/0x2e0 fs/super.c:1614
ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5731
vfs_get_tree+0x56/0x1d0 fs/super.c:1779
do_new_mount+0x227/0x690 fs/namespace.c:3352
path_mount+0x49b/0xb30 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount+0x27f/0x2d0 fs/namespace.c:3875
__x64_sys_mount+0x67/0x80 fs/namespace.c:3875
x64_sys_call+0x2591/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:166
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 6510 Comm: syz-executor.0 Not tainted 6.9.0-rc5-syzkaller-00042-ge88c4cfcb7b8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================


---
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
Reply all
Reply to author
Forward
0 new messages