syzbot


KCSAN: data-race in data_alloc / prb_reserve

Status: moderation: reported on 2021/03/25 21:28
Reported-by: syzbot+3ef70d22840405b8403f@syzkaller.appspotmail.com
First crash: 647d, last: 1d11h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in data_alloc / prb_reserve

write to 0xffffffff85c857b0 of 8 bytes by task 32270 on cpu 0:
 data_alloc+0x27e/0x2b0 kernel/printk/printk_ringbuffer.c:1088
 prb_reserve+0x897/0xbd0 kernel/printk/printk_ringbuffer.c:1555
 vprintk_store+0x51c/0xb50 kernel/printk/printk.c:2196
 vprintk_emit+0xcc/0x430 kernel/printk/printk.c:2252
 vprintk_default+0x22/0x30 kernel/printk/printk.c:2282
 vprintk+0x7f/0x90 kernel/printk/printk_safe.c:50
 _printk+0x76/0x96 kernel/printk/printk.c:2292
 __loop_clr_fd+0x3ba/0x3c0 drivers/block/loop.c:1193
 loop_clr_fd drivers/block/loop.c:1257 [inline]
 lo_ioctl+0xd8c/0x1290 drivers/block/loop.c:1563
 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+0x63/0xcd

read to 0xffffffff85c857b0 of 8 bytes by task 32273 on cpu 1:
 desc_read kernel/printk/printk_ringbuffer.c:478 [inline]
 desc_push_tail kernel/printk/printk_ringbuffer.c:774 [inline]
 desc_reserve kernel/printk/printk_ringbuffer.c:920 [inline]
 prb_reserve+0x224/0xbd0 kernel/printk/printk_ringbuffer.c:1505
 vprintk_store+0x51c/0xb50 kernel/printk/printk.c:2196
 vprintk_emit+0xcc/0x430 kernel/printk/printk.c:2252
 vprintk_default+0x22/0x30 kernel/printk/printk.c:2282
 vprintk+0x7f/0x90 kernel/printk/printk_safe.c:50
 _printk+0x76/0x96 kernel/printk/printk.c:2292
 blk_print_req_error+0x117/0x120 block/blk-mq.c:711
 blk_update_request+0x77c/0x850 block/blk-mq.c:809
 blk_mq_end_request block/blk-mq.c:951 [inline]
 blk_mq_plug_issue_direct+0x19f/0x5c0 block/blk-mq.c:2558
 blk_mq_flush_plug_list+0x27a/0x340 block/blk-mq.c:2639
 __blk_flush_plug+0x25a/0x2b0 block/blk-core.c:1153
 blk_finish_plug+0x44/0x60 block/blk-core.c:1177
 read_pages+0x71c/0x790 mm/readahead.c:181
 page_cache_ra_unbounded+0x2a8/0x2e0 mm/readahead.c:263
 do_page_cache_ra mm/readahead.c:293 [inline]
 force_page_cache_ra+0x1c6/0x200 mm/readahead.c:324
 page_cache_sync_ra+0xc8/0xf0 mm/readahead.c:695
 page_cache_sync_readahead include/linux/pagemap.h:1215 [inline]
 filemap_get_pages mm/filemap.c:2566 [inline]
 filemap_read+0x3ef/0x1430 mm/filemap.c:2660
 blkdev_read_iter+0x2c6/0x370 block/fops.c:598
 call_read_iter include/linux/fs.h:2181 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x3a5/0x560 fs/read_write.c:470
 ksys_read+0xe8/0x1a0 fs/read_write.c:607
 __do_sys_read fs/read_write.c:617 [inline]
 __se_sys_read fs/read_write.c:615 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:615
 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: 0x00000000003b8d70 -> 0x000000000044ef28

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 32273 Comm: udevd Not tainted 6.0.0-rc6-syzkaller-00309-g1a61b828566f-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
==================================================================
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop1p2, logical block 0, async page read
udevd[32273]: inotify_add_watch(7, /dev/loop1p2, 10) failed: No such file or directory
udevd[32273]: inotify_add_watch(7, /dev/loop1p2, 10) failed: No such file or directory

Crashes (510):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/09/25 08:33 upstream 1a61b828566f 0042f2b4 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/23 13:39 upstream dc164f4fb00a 0042f2b4 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/22 08:00 upstream 06f7db949993 60af5050 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/21 14:02 upstream 60891ec99e14 380f82fb .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/21 07:10 upstream 60891ec99e14 c4b8ccfd .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/19 16:40 upstream 521a547ced64 dd9a85ff .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/17 13:51 upstream a335366bad13 dd9a85ff .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/17 00:27 upstream 6879c2d3b960 dd9a85ff .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/16 13:55 upstream 3245cb65fd91 dd9a85ff .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/13 23:19 upstream d1221cea11fc b884348d .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/11 06:14 upstream b96fbd602d35 356d8217 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/08 19:07 upstream 26b1224903b3 f3027468 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/07 18:01 upstream 0066f1b0e275 c5b7bc57 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/07 10:44 upstream d2ec799d1c1b 5fc30c37 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/06 15:49 upstream 53e99dcff61e 65aea2b9 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/09/03 12:14 upstream d895ec7938c4 49e94a20 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/30 16:58 upstream dcf8e5633e2e 4a380809 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/29 02:55 upstream 8379c0b31fbc 07177916 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/28 04:47 upstream 89b749d8552d 07177916 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/27 10:21 upstream e022620b5d05 07177916 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/24 15:30 upstream c40e8341e3b3 514514f6 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/23 06:32 upstream 072e51356cd5 26a13b38 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/22 14:24 upstream 1c23f9e627a7 26a13b38 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/22 08:21 upstream e3f259d33c0e 26a13b38 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/21 07:10 upstream f31c32efd57c 26a13b38 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/20 16:44 upstream 50cd95ac4654 26a13b38 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/18 14:20 upstream 3b06a2755758 d58e263f .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/18 03:56 upstream 274a2eebf80c a9409d47 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/16 06:24 upstream 7ebfc85e2cd7 7a7cb304 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/13 21:23 upstream 7ebfc85e2cd7 8dfcaa3d .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/10 07:51 upstream 426b4ca2d6a5 c2a623d6 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/07 12:24 upstream 1612c382ffbd 88e3a122 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/04 22:58 upstream b44f2fd87919 1c9013ac .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/04 07:09 upstream ff89dd08c0f0 1c9013ac .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/03 04:22 upstream 7d0d3fa7339e 1c9013ac .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/08/02 02:14 upstream 9de1f9c8ca51 fef302b1 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/31 10:17 upstream 6a010258447d fef302b1 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/31 00:54 upstream 620725263f42 fef302b1 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/29 01:18 upstream 33ea1340bafe fb95c74d .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/27 18:17 upstream 39c3c396f813 da9d0366 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/26 21:36 upstream 5de64d44968e ae971e66 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/26 15:36 upstream e0dccc3b76fb 279b89c2 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/24 09:02 upstream 515f71412bb7 22343af4 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/22 05:21 upstream 68e77ffbfd06 5e6028b9 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/21 03:47 upstream 353f7988dd84 88cb1383 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/20 11:19 upstream ca85855bdcae 775344bc .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/19 17:41 upstream ca85855bdcae 72a3cc0c .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/18 04:46 upstream ff6992735ade 95cb00d1 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/17 16:25 upstream 972a278fe60c 95cb00d1 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/17 03:18 upstream c658cabbfd32 95cb00d1 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2022/07/14 03:22 upstream 4a57a8400075 5d921b08 .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2021/03/23 05:33 upstream 0d02ec6b3136 8092f30d .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2021/03/21 21:14 upstream 812da4d39463 4c9a64da .config log report info KCSAN: data-race in data_alloc / prb_reserve
ci2-upstream-kcsan-gce 2021/01/11 05:54 upstream 0653161f0fac 2c1f2513 .config log report info
ci2-upstream-kcsan-gce 2020/12/17 20:32 upstream accefff5b547 04201c06 .config log report info
* Struck through repros no longer work on HEAD.