syzbot


KCSAN: data-race in shmem_getattr / shmem_getpage_gfp (3)

Status: auto-closed as invalid on 2021/10/01 07:46
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 504d, last: 467d
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in shmem_getattr / shmem_getpage_gfp (6) 2 288d 294d 0/24 auto-closed as invalid on 2022/03/29 04:30
upstream KCSAN: data-race in shmem_getattr / shmem_getpage_gfp 1 1090d 1090d 0/24 auto-closed as invalid on 2020/02/21 18:37
upstream KCSAN: data-race in shmem_getattr / shmem_getpage_gfp (5) 2 337d 347d 0/24 auto-closed as invalid on 2022/02/08 18:20
upstream KCSAN: data-race in shmem_getattr / shmem_getpage_gfp (2) 1 587d 587d 0/24 auto-closed as invalid on 2021/06/03 02:49
upstream KCSAN: data-race in shmem_getattr / shmem_getpage_gfp (4) 1 390d 390d 0/24 auto-closed as invalid on 2021/12/17 11:16

Sample crash report:
loop3: detected capacity change from 0 to 264192
==================================================================
BUG: KCSAN: data-race in shmem_getattr / shmem_getpage_gfp

write to 0xffff88810521a7f0 of 8 bytes by task 1794 on cpu 1:
 shmem_getpage_gfp+0xf33/0x13d0 mm/shmem.c:1947
 shmem_getpage mm/shmem.c:155 [inline]
 shmem_file_read_iter+0x1ae/0x5d0 mm/shmem.c:2559
 call_read_iter include/linux/fs.h:2108 [inline]
 do_iter_readv_writev+0x2e8/0x360 fs/read_write.c:738
 do_iter_read+0x109/0x4b0 fs/read_write.c:801
 vfs_iter_read+0x4c/0x70 fs/read_write.c:843
 lo_read_simple drivers/block/loop.c:404 [inline]
 do_req_filebacked drivers/block/loop.c:675 [inline]
 loop_handle_cmd drivers/block/loop.c:2204 [inline]
 loop_process_work+0x110b/0x1850 drivers/block/loop.c:2244
 loop_rootcg_workfn+0x1b/0x20 drivers/block/loop.c:2275
 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2276
 worker_thread+0x636/0xae0 kernel/workqueue.c:2422
 kthread+0x262/0x280 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

read to 0xffff88810521a7f0 of 8 bytes by task 15693 on cpu 0:
 shmem_getattr+0x41/0x250 mm/shmem.c:1043
 vfs_getattr_nosec+0x152/0x2f0 fs/stat.c:105
 vfs_getattr+0x4d/0x60 fs/stat.c:142
 loop_get_status+0x23e/0x310 drivers/block/loop.c:1615
 loop_get_status64 drivers/block/loop.c:1723 [inline]
 lo_ioctl+0x1b5/0x1340 drivers/block/loop.c:1868
 blkdev_ioctl+0x1d0/0x3c0 block/ioctl.c:585
 block_ioctl+0x6d/0x80 fs/block_dev.c:1604
 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: 0x0000000000000099 -> 0x000000000000009e

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 15693 Comm: syz-executor.3 Not tainted 5.14.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
 loop3: p1 p2 < > p3 p4 < p5 p6 >
loop3: p1 size 11290111 extends beyond EOD, truncated
loop3: p3 size 1912633224 extends beyond EOD, truncated
loop3: p5 size 11290111 extends beyond EOD, truncated
loop3: p6 size 1912633224 extends beyond EOD, truncated

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/08/27 07:40 upstream 1a6d80ff2419 b318694d .config log report info KCSAN: data-race in shmem_getattr / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2021/07/31 02:20 upstream 4669e13cd67f 6c236867 .config log report info KCSAN: data-race in shmem_getattr / shmem_getpage_gfp
ci2-upstream-kcsan-gce 2021/07/21 04:43 upstream 8cae8cd89f05 1b201b48 .config log report info KCSAN: data-race in shmem_getattr / shmem_getpage_gfp
* Struck through repros no longer work on HEAD.