KCSAN: data-race in ext4_da_reserve_space / ext4_file_getattr

8 views
Skip to first unread message

syzbot

unread,
Jan 8, 2020, 9:33:16 AM1/8/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 245a4300 Merge branch 'rcu/kcsan' into tip/locking/kcsan
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=120cdf51e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4b9db179318d21f
dashboard link: https://syzkaller.appspot.com/bug?extid=22433e141ccfff00dd8b
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [adilger...@dilger.ca linux...@vger.kernel.org
linux-...@vger.kernel.org ty...@mit.edu el...@google.com]

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

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

==================================================================
BUG: KCSAN: data-race in ext4_da_reserve_space / ext4_file_getattr

read to 0xffff888125714eb0 of 4 bytes by task 7956 on cpu 0:
ext4_file_getattr+0xa6/0x1a0 fs/ext4/inode.c:5429
vfs_getattr_nosec+0x12e/0x170 fs/stat.c:81
vfs_getattr+0x54/0x70 fs/stat.c:118
vfs_statx+0x102/0x190 fs/stat.c:191
vfs_lstat include/linux/fs.h:3254 [inline]
__do_sys_newlstat+0x51/0xb0 fs/stat.c:354
__se_sys_newlstat fs/stat.c:348 [inline]
__x64_sys_newlstat+0x3a/0x50 fs/stat.c:348
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff888125714eb0 of 4 bytes by task 11060 on cpu 1:
ext4_da_reserve_space+0x13f/0x280 fs/ext4/inode.c:1470
ext4_insert_delayed_block fs/ext4/inode.c:1633 [inline]
ext4_da_map_blocks fs/ext4/inode.c:1748 [inline]
ext4_da_get_block_prep+0x87f/0xa60 fs/ext4/inode.c:1812
ext4_block_write_begin+0x33e/0xba0 fs/ext4/inode.c:1055
ext4_da_write_begin+0x208/0x840 fs/ext4/inode.c:2996
generic_perform_write+0x136/0x320 mm/filemap.c:3309
ext4_buffered_write_iter+0x143/0x290 fs/ext4/file.c:252
ext4_file_write_iter+0xf4/0xd40 fs/ext4/file.c:547
call_write_iter include/linux/fs.h:1902 [inline]
new_sync_write+0x388/0x4a0 fs/read_write.c:483
__vfs_write+0xb1/0xc0 fs/read_write.c:496
vfs_write fs/read_write.c:558 [inline]
vfs_write+0x18a/0x390 fs/read_write.c:542
ksys_write+0xd5/0x1b0 fs/read_write.c:611
__do_sys_write fs/read_write.c:623 [inline]
__se_sys_write fs/read_write.c:620 [inline]
__x64_sys_write+0x4c/0x60 fs/read_write.c:620
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11060 Comm: syz-executor.4 Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
==================================================================


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
May 17, 2020, 2:58:09 PM5/17/20
to el...@google.com, 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