syzbot


KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp (2)

Status: moderation: reported on 2021/11/18 12:56
Reported-by: syzbot+ca1a39cda7547e0dce74@syzkaller.appspotmail.com
First crash: 482d, last: 7d09h
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp 209 483d 727d 0/24 closed as invalid on 2021/06/07 13:58

Sample crash report:
==================================================================
BUG: KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp

read-write to 0xffff8881373d2308 of 8 bytes by task 11911 on cpu 1:
 shmem_add_to_page_cache+0x802/0x8e0 mm/shmem.c:746
 shmem_getpage_gfp+0x7af/0x1750 mm/shmem.c:1951
 shmem_fault+0xd2/0x350 mm/shmem.c:2128
 __do_fault mm/memory.c:4173 [inline]
 do_shared_fault mm/memory.c:4573 [inline]
 do_fault+0x5df/0xb20 mm/memory.c:4651
 handle_pte_fault mm/memory.c:4911 [inline]
 __handle_mm_fault mm/memory.c:5053 [inline]
 handle_mm_fault+0x889/0xa90 mm/memory.c:5151
 do_user_addr_fault+0x4a1/0x980 arch/x86/mm/fault.c:1397
 handle_page_fault arch/x86/mm/fault.c:1488 [inline]
 exc_page_fault+0x60/0x160 arch/x86/mm/fault.c:1544
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570
 copy_user_enhanced_fast_string+0xa/0x40 arch/x86/lib/copy_user_64.S:165
 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+0x72/0x90 lib/iov_iter.c:170
 _copy_to_iter+0x261/0x8b0 lib/iov_iter.c:524
 copy_to_iter include/linux/uio.h:176 [inline]
 get_random_bytes_user+0x121/0x270 drivers/char/random.c:430
 __do_sys_getrandom drivers/char/random.c:1280 [inline]
 __se_sys_getrandom drivers/char/random.c:1253 [inline]
 __x64_sys_getrandom+0xc4/0x190 drivers/char/random.c:1253
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff8881373d2308 of 8 bytes by task 11912 on cpu 0:
 shmem_recalc_inode mm/shmem.c:363 [inline]
 shmem_getpage_gfp+0xd8b/0x1750 mm/shmem.c:1961
 shmem_fault+0xd2/0x350 mm/shmem.c:2128
 __do_fault mm/memory.c:4173 [inline]
 do_read_fault mm/memory.c:4518 [inline]
 do_fault+0x500/0xb20 mm/memory.c:4647
 handle_pte_fault mm/memory.c:4911 [inline]
 __handle_mm_fault mm/memory.c:5053 [inline]
 handle_mm_fault+0x889/0xa90 mm/memory.c:5151
 faultin_page mm/gup.c:990 [inline]
 __get_user_pages+0x34a/0xc40 mm/gup.c:1219
 populate_vma_page_range mm/gup.c:1576 [inline]
 __mm_populate+0x26e/0x3a0 mm/gup.c:1689
 mm_populate include/linux/mm.h:2663 [inline]
 vm_mmap_pgoff+0x160/0x1f0 mm/util.c:557
 ksys_mmap_pgoff+0xc2/0x320 mm/mmap.c:1586
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00000000000004cd -> 0x00000000000004ce

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11912 Comm: syz-executor.0 Not tainted 6.0.0-rc7-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
==================================================================

Crashes (153):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/09/26 11:26 upstream f76349cf4145 d59ba983 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/09/23 20:05 upstream bf682942cd26 0042f2b4 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/09/22 12:55 upstream dc164f4fb00a 60af5050 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/09/20 03:40 upstream 521a547ced64 dd9a85ff .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/09/10 05:04 upstream ce888220d5c7 356d8217 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/09/09 04:19 upstream 506357871c18 f3027468 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/09/04 01:58 upstream 42cf58c272ee 28811d0a .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/08/31 15:10 upstream dcf8e5633e2e 51e54e30 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/08/29 11:46 upstream b90cb1053190 94da0b6b .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/08/17 08:41 upstream 7ebfc85e2cd7 4e72d229 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/08/12 22:38 upstream 7ebfc85e2cd7 8dfcaa3d .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/08/09 16:46 upstream eb555cb5b794 c2a623d6 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/08/08 16:45 upstream 4e23eeebb2e5 da700653 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/08/07 19:10 upstream 3bc1bc0b59d0 88e3a122 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/08/06 11:40 upstream 6614a3c3164a e853abd9 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/08/04 16:23 upstream b44f2fd87919 1c9013ac .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/29 14:06 upstream 6e2c0490769e fef302b1 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/27 12:07 upstream 39c3c396f813 da9d0366 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/27 06:24 upstream 5de64d44968e ae971e66 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/25 09:14 upstream e0dccc3b76fb 664c519c .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/21 17:19 upstream 353f7988dd84 6e67af9d .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/19 20:49 upstream ca85855bdcae 775344bc .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/18 21:49 upstream 80e19f34c288 ff988920 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/16 21:08 upstream c658cabbfd32 95cb00d1 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/16 17:25 upstream 9b59ec8d50a1 95cb00d1 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/12 14:32 upstream 5a29232d870d d91dd8ea .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/11 13:48 upstream 32346491ddf2 f3f217ff .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/07 19:14 upstream e8a4e1c1bb69 bff65f44 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/05 00:01 upstream c1084b6c5620 bff65f44 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/07/04 12:44 upstream 88084a3df167 bff65f44 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/06/24 03:10 upstream 92f20ff72066 912f5df7 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/06/23 01:55 upstream 3abc3ae553c7 912f5df7 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/06/16 22:16 upstream 48a23ec6ff2b 1719ee24 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/06/15 11:49 upstream 018ab4fabddd 1719ee24 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/06/13 00:09 upstream 997952851843 0d5abf15 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/06/03 00:48 upstream 58f9d52ff689 02dddea8 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/05/30 15:49 upstream b00ed48bb0a7 af70c3a9 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/05/27 13:55 upstream 7e284070abe5 116e7a7b .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/05/20 14:10 upstream b015dcd62b86 cb1ac2e7 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/05/19 20:06 upstream f993aed406ea cb1ac2e7 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/05/18 17:40 upstream ef1302160bfb 50c53f39 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/05/16 03:37 upstream 42226c989789 744a39e2 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/05/15 06:29 upstream 2fe1020d73ca 744a39e2 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2022/05/09 04:01 upstream c5eb0a61238d e60b1103 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2021/11/17 12:12 upstream 8ab774587903 cafff8b6 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2021/11/15 18:49 upstream 8ab774587903 75b04091 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2021/06/08 15:28 upstream 614124bea77e 5c2fe346 .config log report info KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp
* Struck through repros no longer work on HEAD.