KCSAN: data-race in __lru_add_drain_all / lru_cache_add

4 views
Skip to first unread message

syzbot

unread,
Jul 22, 2021, 1:12:23 AM7/22/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f0eb870a8422 Merge tag 'xfs-5.14-fixes-1' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1295b174300000
kernel config: https://syzkaller.appspot.com/x/.config?x=f5e73542d774430b
dashboard link: https://syzkaller.appspot.com/bug?extid=0501784df97bc679a010
compiler: Debian clang version 11.0.1-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+050178...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / lru_cache_add

write to 0xffff888237d42528 of 1 bytes by task 21962 on cpu 1:
pagevec_add include/linux/pagevec.h:74 [inline]
pagevec_add_and_need_flush mm/swap.c:244 [inline]
lru_cache_add+0x75/0x150 mm/swap.c:474
add_to_page_cache_lru+0x150/0x1b0 mm/filemap.c:983
pagecache_get_page+0x6a3/0x900 mm/filemap.c:1896
find_or_create_page include/linux/pagemap.h:420 [inline]
grow_dev_page fs/buffer.c:949 [inline]
grow_buffers fs/buffer.c:1014 [inline]
__getblk_slow fs/buffer.c:1041 [inline]
__getblk_gfp+0x199/0x590 fs/buffer.c:1334
sb_getblk_gfp include/linux/buffer_head.h:334 [inline]
__ext4_sb_bread_gfp fs/ext4/super.c:220 [inline]
ext4_sb_bread_unmovable+0x3b/0x1a0 fs/ext4/super.c:243
ext4_fill_super+0x427/0x7ff0 fs/ext4/super.c:4085
mount_bdev+0x1e8/0x290 fs/super.c:1368
ext4_mount+0x2d/0x40 fs/ext4/super.c:6638
legacy_get_tree+0x70/0xc0 fs/fs_context.c:610
vfs_get_tree+0x4a/0x1a0 fs/super.c:1498
do_new_mount fs/namespace.c:2905 [inline]
path_mount+0x11d4/0x1ce0 fs/namespace.c:3235
do_mount fs/namespace.c:3248 [inline]
__do_sys_mount fs/namespace.c:3456 [inline]
__se_sys_mount+0x23d/0x2e0 fs/namespace.c:3433
__x64_sys_mount+0x63/0x70 fs/namespace.c:3433
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888237d42528 of 1 bytes by task 21975 on cpu 0:
pagevec_count include/linux/pagevec.h:61 [inline]
__lru_add_drain_all+0x12c/0x3e0 mm/swap.c:828
lru_add_drain_all+0xc/0x10 mm/swap.c:850
invalidate_bdev+0x50/0x70 fs/block_dev.c:96
__loop_clr_fd+0x52b/0x8b0 drivers/block/loop.c:1336
loop_clr_fd drivers/block/loop.c:1430 [inline]
lo_ioctl+0x9f7/0x1210 drivers/block/loop.c:1786
blkdev_ioctl+0x1d0/0x3c0 block/ioctl.c:585
block_ioctl+0x6d/0x80 fs/block_dev.c:1602
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:1069 [inline]
__se_sys_ioctl+0xcb/0x140 fs/ioctl.c:1055
__x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 21975 Comm: syz-executor.4 Not tainted 5.14.0-rc1-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.

syzbot

unread,
Dec 5, 2021, 4:43:22 PM12/5/21
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