KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range

9 views
Skip to first unread message

syzbot

unread,
Jan 6, 2022, 3:11:25 PM1/6/22
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 75acfdb6fd92 Merge tag 'net-5.16-final' of git://git.kerne..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=124510ddb00000
kernel config: https://syzkaller.appspot.com/x/.config?x=309badab33752916
dashboard link: https://syzkaller.appspot.com/bug?extid=06d291120ff02d083cb8
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

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

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

loop1: detected capacity change from 0 to 131456
EXT4-fs (loop1): #blocks per group too big: 8238
==================================================================
BUG: KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range

write to 0xffff88810139a6f8 of 8 bytes by task 26601 on cpu 0:
__filemap_add_folio+0x256/0x4d0 mm/filemap.c:946
filemap_add_folio+0x6b/0x150 mm/filemap.c:999
add_to_page_cache_lru+0x4e/0x70 mm/folio-compat.c:115
page_cache_ra_unbounded+0x274/0x430 mm/readahead.c:221
do_page_cache_ra mm/readahead.c:268 [inline]
force_page_cache_ra+0x1e6/0x220 mm/readahead.c:300
page_cache_sync_ra+0xcc/0xe0 mm/readahead.c:574
page_cache_sync_readahead include/linux/pagemap.h:1028 [inline]
filemap_get_pages mm/filemap.c:2556 [inline]
filemap_read+0x3eb/0x16d0 mm/filemap.c:2642
generic_file_read_iter+0x72/0x2a0 mm/filemap.c:2792
blkdev_read_iter+0x96/0x140 block/fops.c:583
call_read_iter include/linux/fs.h:2156 [inline]
new_sync_read fs/read_write.c:400 [inline]
vfs_read+0x66c/0x750 fs/read_write.c:481
ksys_read+0xd9/0x190 fs/read_write.c:619
__do_sys_read fs/read_write.c:629 [inline]
__se_sys_read fs/read_write.c:627 [inline]
__x64_sys_read+0x3e/0x50 fs/read_write.c:627
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88810139a6f8 of 8 bytes by task 30226 on cpu 1:
mapping_needs_writeback mm/filemap.c:646 [inline]
filemap_write_and_wait_range+0x36/0x340 mm/filemap.c:717
filemap_write_and_wait include/linux/fs.h:2865 [inline]
sync_blockdev+0x3e/0x50 block/bdev.c:204
kill_block_super+0x52/0x90 fs/super.c:1398
deactivate_locked_super+0x6a/0xb0 fs/super.c:335
mount_bdev+0x204/0x290 fs/super.c:1372
legacy_get_tree+0x70/0xc0 fs/fs_context.c:610
vfs_get_tree+0x4a/0x1a0 fs/super.c:1500
do_new_mount fs/namespace.c:2988 [inline]
path_mount+0x11cf/0x1c40 fs/namespace.c:3318
do_mount fs/namespace.c:3331 [inline]
__do_sys_mount fs/namespace.c:3539 [inline]
__se_sys_mount+0x24b/0x2f0 fs/namespace.c:3516
__x64_sys_mount+0x63/0x70 fs/namespace.c:3516
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x000000000000002d -> 0x0000000000000030

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 30226 Comm: syz-executor.1 Tainted: G W 5.16.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


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