[moderation] [iomap?] KCSAN: data-race in __filemap_remove_folio / page_remove_rmap (3)

10 views
Skip to first unread message

syzbot

unread,
Dec 7, 2023, 4:59:24 AM12/7/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: bee0e7762ad2 Merge tag 'for-linus-iommufd' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17a7be02e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ac34c1f29a8029df
dashboard link: https://syzkaller.appspot.com/bug?extid=5a1447ee077a1fd163f5
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [bra...@kernel.org djw...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org linu...@vger.kernel.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/233be5f65dd2/disk-bee0e776.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/94423738a289/vmlinux-bee0e776.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0b977463fa9a/bzImage-bee0e776.xz

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

==================================================================
BUG: KCSAN: data-race in __filemap_remove_folio / page_remove_rmap

write to 0xffffea000492b6d8 of 8 bytes by task 5115 on cpu 0:
page_cache_delete mm/filemap.c:142 [inline]
__filemap_remove_folio+0x1b8/0x2d0 mm/filemap.c:222
invalidate_complete_folio2 mm/truncate.c:584 [inline]
invalidate_inode_pages2_range+0x404/0x720 mm/truncate.c:671
kiocb_invalidate_pages+0x1b1/0x1e0 mm/filemap.c:2705
__iomap_dio_rw+0x5ad/0x1090 fs/iomap/direct-io.c:638
iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:748
ext4_dio_write_iter fs/ext4/file.c:575 [inline]
ext4_file_write_iter+0xa8a/0xe10 fs/ext4/file.c:694
do_iter_write+0x4ad/0x770 fs/read_write.c:860
vfs_iter_write+0x56/0x70 fs/read_write.c:901
iter_file_splice_write+0x462/0x7e0 fs/splice.c:736
do_splice_from fs/splice.c:933 [inline]
direct_splice_actor+0x8a/0xb0 fs/splice.c:1142
splice_direct_to_actor+0x31d/0x690 fs/splice.c:1088
do_splice_direct+0x10d/0x190 fs/splice.c:1194
do_sendfile+0x3c4/0x980 fs/read_write.c:1254
__do_sys_sendfile64 fs/read_write.c:1322 [inline]
__se_sys_sendfile64 fs/read_write.c:1308 [inline]
__x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffffea000492b6d8 of 8 bytes by task 5103 on cpu 1:
folio_test_anon include/linux/page-flags.h:652 [inline]
page_remove_rmap+0x135/0x260 mm/rmap.c:1487
zap_pte_range mm/memory.c:1465 [inline]
zap_pmd_range mm/memory.c:1582 [inline]
zap_pud_range mm/memory.c:1611 [inline]
zap_p4d_range mm/memory.c:1632 [inline]
unmap_page_range+0xd01/0x1d10 mm/memory.c:1653
unmap_single_vma+0x142/0x1d0 mm/memory.c:1699
zap_page_range_single+0x213/0x2f0 mm/memory.c:1777
unmap_mapping_range_vma mm/memory.c:3517 [inline]
unmap_mapping_range_tree+0xa6/0xe0 mm/memory.c:3534
unmap_mapping_pages+0xc0/0xd0 mm/memory.c:3600
invalidate_inode_pages2_range+0x203/0x720 mm/truncate.c:652
kiocb_invalidate_pages+0x1b1/0x1e0 mm/filemap.c:2705
__iomap_dio_rw+0x5ad/0x1090 fs/iomap/direct-io.c:638
iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:748
ext4_dio_write_iter fs/ext4/file.c:575 [inline]
ext4_file_write_iter+0xa8a/0xe10 fs/ext4/file.c:694
do_iter_write+0x4ad/0x770 fs/read_write.c:860
vfs_iter_write+0x56/0x70 fs/read_write.c:901
iter_file_splice_write+0x462/0x7e0 fs/splice.c:736
do_splice_from fs/splice.c:933 [inline]
direct_splice_actor+0x8a/0xb0 fs/splice.c:1142
splice_direct_to_actor+0x31d/0x690 fs/splice.c:1088
do_splice_direct+0x10d/0x190 fs/splice.c:1194
do_sendfile+0x3c4/0x980 fs/read_write.c:1254
__do_sys_sendfile64 fs/read_write.c:1322 [inline]
__se_sys_sendfile64 fs/read_write.c:1308 [inline]
__x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0xffff888107dd7df0 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 5103 Comm: syz-executor.1 Tainted: G W 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================
syz-executor.1 (5103) used greatest stack depth: 9496 bytes left


---
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

syzbot

unread,
Feb 8, 2024, 2:56:15 PMFeb 8
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages