syzbot


KCSAN: data-race in deactivate_file_page / lru_add_drain_all

Status: auto-closed as invalid on 2020/01/23 05:46
Subsystems: mm
[Documentation on labels]
First crash: 1622d, last: 1622d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in deactivate_file_page / lru_add_drain_all

read to 0xffff88812bf27520 of 1 bytes by task 14572 on cpu 0:
 lru_add_drain_all+0x153/0x350 mm/swap.c:730
 invalidate_bdev+0x6e/0x90 fs/block_dev.c:97
 __invalidate_device+0x61/0x80 fs/block_dev.c:2204
 invalidate_partition+0x4c/0x70 block/genhd.c:1610
 drop_partitions block/partition-generic.c:450 [inline]
 rescan_partitions+0xad/0x680 block/partition-generic.c:523
 __blkdev_reread_part+0xdd/0x110 block/ioctl.c:174
 blkdev_reread_part+0x2e/0x50 block/ioctl.c:194
 loop_reread_partitions+0x25/0x50 drivers/block/loop.c:633
 loop_set_status+0xa02/0xb30 drivers/block/loop.c:1343
 loop_set_status64+0x6d/0xb0 drivers/block/loop.c:1463
 lo_ioctl+0x30b/0xc80 drivers/block/loop.c:1606
 __blkdev_driver_ioctl block/ioctl.c:304 [inline]
 blkdev_ioctl+0x979/0x1160 block/ioctl.c:606
 block_ioctl+0x95/0xc0 fs/block_dev.c:1954
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0x991/0xc60 fs/ioctl.c:696
 ksys_ioctl+0xbd/0xe0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x4c/0x60 fs/ioctl.c:718
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88812bf27520 of 1 bytes by task 14573 on cpu 1:
 pagevec_add include/linux/pagevec.h:81 [inline]
 deactivate_file_page+0x165/0x250 mm/swap.c:641
 invalidate_mapping_pages+0x72b/0x900 mm/truncate.c:614
 invalidate_bdev+0x7f/0x90 fs/block_dev.c:98
 __invalidate_device+0x61/0x80 fs/block_dev.c:2204
 invalidate_partition+0x4c/0x70 block/genhd.c:1610
 drop_partitions block/partition-generic.c:450 [inline]
 rescan_partitions+0xad/0x680 block/partition-generic.c:523
 __blkdev_reread_part+0xdd/0x110 block/ioctl.c:174
 blkdev_reread_part+0x2e/0x50 block/ioctl.c:194
 loop_reread_partitions+0x25/0x50 drivers/block/loop.c:633
 loop_set_status+0xa02/0xb30 drivers/block/loop.c:1343
 loop_set_status64+0x6d/0xb0 drivers/block/loop.c:1463
 lo_ioctl+0x30b/0xc80 drivers/block/loop.c:1606
 __blkdev_driver_ioctl block/ioctl.c:304 [inline]
 blkdev_ioctl+0x979/0x1160 block/ioctl.c:606
 block_ioctl+0x95/0xc0 fs/block_dev.c:1954
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0x991/0xc60 fs/ioctl.c:696
 ksys_ioctl+0xbd/0xe0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x4c/0x60 fs/ioctl.c:718
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14573 Comm: syz-executor.0 Not tainted 5.4.0-rc7+ #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/14 05:45 https://github.com/google/ktsan.git kcsan 7f2955e0d056 048f2d49 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.