syzbot


KCSAN: data-race in drain_all_stock / try_charge

Status: closed as invalid on 2019/11/19 13:44
Subsystems: cgroups mm
[Documentation on labels]
First crash: 1633d, last: 1633d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in drain_all_stock / try_charge (2) cgroups mm 2 1515d 1567d 0/26 auto-closed as invalid on 2020/05/11 18:40

Sample crash report:
==================================================================
BUG: KCSAN: data-race in drain_all_stock / try_charge

read to 0xffff88812bf27d48 of 4 bytes by task 21990 on cpu 0:
 drain_all_stock mm/memcontrol.c:2276 [inline]
 drain_all_stock+0xe5/0x240 mm/memcontrol.c:2255
 try_charge+0x7f2/0xbc0 mm/memcontrol.c:2570
 mem_cgroup_try_charge+0xd2/0x260 mm/memcontrol.c:6504
 __add_to_page_cache_locked+0x163/0x780 mm/filemap.c:866
 add_to_page_cache_lru+0xc4/0x260 mm/filemap.c:943
 ext4_mpage_readpages+0x3ab/0x12c0 fs/ext4/readpage.c:247
 ext4_readpages+0x92/0xc0 fs/ext4/inode.c:3342
 read_pages+0xa2/0x2d0 mm/readahead.c:126
 __do_page_cache_readahead+0x353/0x390 mm/readahead.c:212
 ra_submit mm/internal.h:62 [inline]
 do_sync_mmap_readahead mm/filemap.c:2443 [inline]
 filemap_fault+0xdad/0xf90 mm/filemap.c:2529
 ext4_filemap_fault+0x59/0x72 fs/ext4/inode.c:6292
 __do_fault+0xae/0x1f0 mm/memory.c:3092
 do_read_fault mm/memory.c:3489 [inline]
 do_fault mm/memory.c:3618 [inline]
 handle_pte_fault mm/memory.c:3849 [inline]
 __handle_mm_fault+0x1f90/0x2c70 mm/memory.c:3973
 handle_mm_fault+0x21b/0x530 mm/memory.c:4010
 do_user_addr_fault arch/x86/mm/fault.c:1441 [inline]
 __do_page_fault+0x3fb/0x9e0 arch/x86/mm/fault.c:1506
 do_page_fault+0x54/0x233 arch/x86/mm/fault.c:1530
 page_fault+0x34/0x40 arch/x86/entry/entry_64.S:1202
 do_strncpy_from_user lib/strncpy_from_user.c:47 [inline]
 strncpy_from_user+0x177/0x2b0 lib/strncpy_from_user.c:120
 getname_flags fs/namei.c:149 [inline]
 getname_flags+0xc3/0x380 fs/namei.c:128
 getname+0x23/0x40 fs/namei.c:209
 do_sys_open+0x27f/0x4f0 fs/open.c:1091
 __do_sys_openat fs/open.c:1124 [inline]
 __se_sys_openat fs/open.c:1118 [inline]
 __x64_sys_openat+0x62/0x80 fs/open.c:1118
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88812bf27d48 of 4 bytes by task 22007 on cpu 1:
 consume_stock mm/memcontrol.c:2183 [inline]
 try_charge+0x38d/0xbc0 mm/memcontrol.c:2517
 mem_cgroup_try_charge+0xd2/0x260 mm/memcontrol.c:6504
 mem_cgroup_try_charge_delay+0x3a/0x80 mm/memcontrol.c:6519
 do_anonymous_page mm/memory.c:3006 [inline]
 handle_pte_fault mm/memory.c:3847 [inline]
 __handle_mm_fault+0x17ab/0x2c70 mm/memory.c:3973
 handle_mm_fault+0x21b/0x530 mm/memory.c:4010
 do_user_addr_fault arch/x86/mm/fault.c:1441 [inline]
 __do_page_fault+0x3fb/0x9e0 arch/x86/mm/fault.c:1506
 do_page_fault+0x54/0x233 arch/x86/mm/fault.c:1530
 page_fault+0x34/0x40 arch/x86/entry/entry_64.S:1202

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 22007 Comm: syz-executor.3 Not tainted 5.4.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/05 03:22 https://github.com/google/ktsan.git kcsan 94c006602e13 76630fc9 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.