syzbot


KCSAN: data-race in __lru_add_drain_all / folio_add_lru

Status: moderation: reported on 2021/12/14 17:42
Reported-by: syzbot+d676f4fcc6452f55d1d0@syzkaller.appspotmail.com
First crash: 244d, last: 9m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / folio_add_lru

read-write to 0xffff888237c27968 of 1 bytes by task 21312 on cpu 0:
 pagevec_add include/linux/pagevec.h:75 [inline]
 pagevec_add_and_need_flush mm/swap.c:234 [inline]
 folio_add_lru+0x5a/0x160 mm/swap.c:466
 lru_cache_add+0x3b/0xe0 mm/folio-compat.c:109
 lru_cache_add_inactive_or_unevictable+0x44/0x60 mm/swap.c:488
 wp_page_copy+0x7d8/0x1460 mm/memory.c:3171
 do_wp_page+0x76f/0xe10
 handle_pte_fault mm/memory.c:4921 [inline]
 __handle_mm_fault mm/memory.c:5042 [inline]
 handle_mm_fault+0x5fb/0xa90 mm/memory.c:5140
 do_user_addr_fault+0x4cd/0x940 arch/x86/mm/fault.c:1397
 handle_page_fault arch/x86/mm/fault.c:1484 [inline]
 exc_page_fault+0x60/0x160 arch/x86/mm/fault.c:1540
 asm_exc_page_fault+0x27/0x30
 __put_user_nocheck_4+0x3/0x11
 schedule_tail+0x41/0x50 kernel/sched/core.c:5086
 ret_from_fork+0x8/0x30

read to 0xffff888237c27968 of 1 bytes by task 1819 on cpu 1:
 pagevec_count include/linux/pagevec.h:62 [inline]
 __lru_add_drain_all+0x118/0x3e0 mm/swap.c:826
 lru_add_drain_all+0xc/0x10 mm/swap.c:849
 invalidate_bdev+0x56/0x80 block/bdev.c:87
 invalidate_disk+0x25/0xb0 block/genhd.c:688
 __loop_clr_fd+0x176/0x3c0 drivers/block/loop.c:1159
 loop_clr_fd drivers/block/loop.c:1252 [inline]
 lo_ioctl+0xd8c/0x1290 drivers/block/loop.c:1558
 blkdev_ioctl+0x20e/0x440 block/ioctl.c:614
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 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+0x46/0xb0

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1819 Comm: syz-executor.0 Not tainted 5.19.0-rc5-syzkaller-00049-gc1084b6c5620-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
==================================================================

Crashes (319):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/07/05 00:43 upstream c1084b6c5620 bff65f44 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/07/04 17:07 upstream 88084a3df167 bff65f44 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/07/04 04:00 upstream 20855e4cb361 1434eec0 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/07/02 22:45 upstream 69cb6c6556ad 1434eec0 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/07/02 14:50 upstream 089866061428 1434eec0 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/07/02 05:31 upstream b336ad598a3b 1434eec0 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/07/01 14:11 upstream a175eca0f3d7 1434eec0 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/30 22:17 upstream 1a0e93df1e10 1434eec0 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/30 05:45 upstream d9b2ba67917c 1434eec0 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/29 15:52 upstream 941e3e791269 1434eec0 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/28 10:09 upstream 941e3e791269 ef82eb2c .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/27 15:17 upstream 03c765b0e3b4 a371c43c .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/26 23:16 upstream 82708bb1eb9e a371c43c .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/26 00:29 upstream 0840a7914caa a371c43c .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/25 10:07 upstream 8c23f235a6a8 a371c43c .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/24 20:03 upstream 38bc4ac43168 a371c43c .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/24 16:43 upstream 92f20ff72066 a371c43c .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/24 10:54 upstream 92f20ff72066 a5dbd430 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/23 21:21 upstream 92f20ff72066 912f5df7 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/23 08:46 upstream de5c208d533a 912f5df7 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/22 18:05 upstream 3abc3ae553c7 912f5df7 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/22 16:48 upstream ca1fdab7fd27 912f5df7 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/22 03:48 upstream ca1fdab7fd27 0fc5c330 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/21 00:46 upstream 78ca55889a54 0fc5c330 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/20 16:50 upstream 78ca55889a54 b9406563 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/20 07:01 upstream a111daf0c53a 8f633d84 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/19 05:31 upstream 354c6e071be9 8f633d84 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/18 09:32 upstream 4b35035bcf80 8f633d84 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/17 20:53 upstream 462abc9de7a1 8f633d84 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/16 23:06 upstream 48a23ec6ff2b 1719ee24 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/16 06:02 upstream 30306f6194ca 1719ee24 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/14 17:30 upstream 24625f7d91fb 127d1faf .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/14 14:20 upstream b13baccc3850 127d1faf .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/13 17:06 upstream b13baccc3850 0f087040 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/13 12:45 upstream b13baccc3850 0d5abf15 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/12 19:19 upstream 997952851843 0d5abf15 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/12 05:07 upstream 7a68065eb9cd 0d5abf15 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/11 01:56 upstream a32e7ea36235 0d5abf15 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/10 20:46 upstream 874c8ca1e60b 0d5abf15 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/10 06:08 upstream 3d9f55c57bc3 0d5abf15 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/09 08:14 upstream 6bfb56e93bce 0d5abf15 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/08 23:59 upstream 34f4335c16a5 0d5abf15 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/07 17:30 upstream e71e60cd74df b2706118 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/07 04:01 upstream e71e60cd74df c8857892 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/06 06:36 upstream f2906aa86338 c8857892 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/05 03:23 upstream d0e60d46bc03 c8857892 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/04 14:35 upstream 032dcf09e2bf c8857892 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2022/06/04 03:36 upstream 744983d87842 c8857892 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2021/12/14 16:36 upstream 5472f14a3742 d018dd31 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru
ci2-upstream-kcsan-gce 2021/11/02 13:42 upstream bfc484fe6abb 098b5d53 .config log report info KCSAN: data-race in __lru_add_drain_all / folio_add_lru