KCSAN: data-race in __lru_add_drain_all / lru_cache_add_inactive_or_unevictable

4 views
Skip to first unread message

syzbot

unread,
Jul 8, 2021, 3:56:24 AM7/8/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3dbdb38e Merge branch 'for-5.14' of git://git.kernel.org/p..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13e1f752300000
kernel config: https://syzkaller.appspot.com/x/.config?x=2557b67ce612a86c
dashboard link: https://syzkaller.appspot.com/bug?extid=d1672aa09714e8bfebdd
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+d1672a...@syzkaller.appspotmail.com

ISOFS: primary root directory is empty. Disabling Rock Ridge and switching to Joliet.
isofs_fill_super: root inode is not a directory. Corrupted media?
==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / lru_cache_add_inactive_or_unevictable

write to 0xffff888237c264e8 of 1 bytes by task 9940 on cpu 0:
pagevec_add include/linux/pagevec.h:74 [inline]
pagevec_add_and_need_flush mm/swap.c:244 [inline]
lru_cache_add mm/swap.c:474 [inline]
lru_cache_add_inactive_or_unevictable+0xaa/0x270 mm/swap.c:506
do_anonymous_page+0x709/0x8a0 mm/memory.c:3679
handle_pte_fault mm/memory.c:4418 [inline]
__handle_mm_fault mm/memory.c:4555 [inline]
handle_mm_fault+0x966/0x1a60 mm/memory.c:4653
do_user_addr_fault+0x609/0xc00 arch/x86/mm/fault.c:1390
handle_page_fault arch/x86/mm/fault.c:1475 [inline]
exc_page_fault+0x91/0x220 arch/x86/mm/fault.c:1531
asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568
copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:205
copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline]
copyout lib/iov_iter.c:190 [inline]
copy_page_to_iter_iovec lib/iov_iter.c:261 [inline]
copy_page_to_iter+0x32d/0x860 lib/iov_iter.c:973
filemap_read+0xf06/0x1230 mm/filemap.c:2605
generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
blkdev_read_iter+0xb9/0xf0 fs/block_dev.c:1670
call_read_iter include/linux/fs.h:2108 [inline]
new_sync_read fs/read_write.c:415 [inline]
vfs_read+0x565/0x5d0 fs/read_write.c:496
ksys_read+0xce/0x180 fs/read_write.c:634
__do_sys_read fs/read_write.c:644 [inline]
__se_sys_read fs/read_write.c:642 [inline]
__x64_sys_read+0x3e/0x50 fs/read_write.c:642
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 0xffff888237c264e8 of 1 bytes by task 9961 on cpu 1:
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:1788
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: 0x01 -> 0x04

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 9961 Comm: syz-executor.3 Not tainted 5.13.0-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, 10:14:20 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