[moderation] [block?] KCSAN: data-race in delete_from_page_cache_batch / folio_mapping (2)

4 views
Skip to first unread message

syzbot

unread,
Dec 7, 2023, 5:15:25 AM12/7/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 090472ed9c92 Merge tag 'usb-6.7-rc3' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12330542e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=8c1151391aefc0c3
dashboard link: https://syzkaller.appspot.com/bug?extid=1da3e64037786c0f857e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [adilger...@dilger.ca linux...@vger.kernel.org linux...@vger.kernel.org linux-...@vger.kernel.org ty...@mit.edu]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1a174462946c/disk-090472ed.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5b721db2846b/vmlinux-090472ed.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7267027fa885/bzImage-090472ed.xz

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

==================================================================
BUG: KCSAN: data-race in delete_from_page_cache_batch / folio_mapping

write to 0xffffea00056499d8 of 8 bytes by task 937 on cpu 1:
page_cache_delete_batch mm/filemap.c:307 [inline]
delete_from_page_cache_batch+0x32a/0x710 mm/filemap.c:333
truncate_inode_pages_range+0x1bd/0x6a0 mm/truncate.c:368
truncate_inode_pages mm/truncate.c:448 [inline]
truncate_inode_pages_final+0x55/0x60 mm/truncate.c:483
ext4_evict_inode+0x174/0xdc0 fs/ext4/inode.c:193
evict+0x1aa/0x410 fs/inode.c:666
iput_final fs/inode.c:1777 [inline]
iput+0x42c/0x5b0 fs/inode.c:1803
dentry_unlink_inode+0x22a/0x240 fs/dcache.c:401
__dentry_kill+0x2db/0x4a0 fs/dcache.c:607
dentry_kill+0x8d/0x1e0
dput+0x118/0x1f0 fs/dcache.c:913
__fput+0x41d/0x630 fs/file_table.c:402
____fput+0x15/0x20 fs/file_table.c:422
task_work_run+0x135/0x1a0 kernel/task_work.c:180
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0x604/0x16d0 kernel/exit.c:871
do_group_exit+0x101/0x150 kernel/exit.c:1021
get_signal+0xf4e/0x10a0 kernel/signal.c:2904
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
irqentry_exit_to_user_mode+0x9/0x20 kernel/entry/common.c:309
irqentry_exit+0x12/0x40 kernel/entry/common.c:412
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570

read to 0xffffea00056499d8 of 8 bytes by task 993 on cpu 0:
folio_mapping+0x92/0x110 mm/util.c:782
folio_evictable mm/internal.h:162 [inline]
move_folios_to_lru+0x132/0x690 mm/vmscan.c:1800
shrink_inactive_list mm/vmscan.c:1916 [inline]
shrink_list mm/vmscan.c:2154 [inline]
shrink_lruvec+0xd98/0x17a0 mm/vmscan.c:5626
shrink_node_memcgs mm/vmscan.c:5812 [inline]
shrink_node+0xab3/0x15c0 mm/vmscan.c:5847
shrink_zones mm/vmscan.c:6086 [inline]
do_try_to_free_pages+0x43d/0xce0 mm/vmscan.c:6148
try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:6463
try_charge_memcg+0x280/0xd30 mm/memcontrol.c:2742
obj_cgroup_charge_pages+0xab/0x130 mm/memcontrol.c:3255
__memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3281
__alloc_pages+0x1bb/0x340 mm/page_alloc.c:4585
alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133
alloc_pages+0xe0/0x100 mm/mempolicy.c:2204
vm_area_alloc_pages mm/vmalloc.c:3063 [inline]
__vmalloc_area_node mm/vmalloc.c:3139 [inline]
__vmalloc_node_range+0x6d2/0xea0 mm/vmalloc.c:3320
__bpf_map_area_alloc kernel/bpf/syscall.c:308 [inline]
bpf_map_area_alloc+0xd8/0x100 kernel/bpf/syscall.c:315
bloom_map_alloc+0x1aa/0x2b0 kernel/bpf/bloom_filter.c:134
map_create+0x713/0xa40 kernel/bpf/syscall.c:1210
__sys_bpf+0x62a/0x780 kernel/bpf/syscall.c:5365
__do_sys_bpf kernel/bpf/syscall.c:5487 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5485 [inline]
__x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5485
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: 0xffff8881412a54e0 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 993 Comm: syz-executor.1 Not tainted 6.7.0-rc2-syzkaller-00242-g090472ed9c92 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================
syz-executor.1 (993) used greatest stack depth: 9992 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
Reply all
Reply to author
Forward
0 new messages