syzbot


KCSAN: data-race in data_push_tail / string

Status: moderation: reported on 2021/07/22 19:23
Reported-by: syzbot+b3b8d0f2cecce376adeb@syzkaller.appspotmail.com
First crash: 474d, last: 2d18h

Sample crash report:
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
==================================================================
BUG: KCSAN: data-race in data_push_tail / string

write to 0xffffffff86e7e262 of 1 bytes by task 11288 on cpu 1:
 string_nocheck lib/vsprintf.c:647 [inline]
 string+0x17b/0x220 lib/vsprintf.c:725
 vsnprintf+0xb57/0xe80 lib/vsprintf.c:2782
 va_format lib/vsprintf.c:1680 [inline]
 pointer+0x685/0x910 lib/vsprintf.c:2419
 vsnprintf+0x905/0xe80 lib/vsprintf.c:2786
 vscnprintf+0x3e/0x80 lib/vsprintf.c:2888
 printk_sprint kernel/printk/printk.c:2092 [inline]
 vprintk_store+0x5f2/0xb50 kernel/printk/printk.c:2206
 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
 logfc+0x2bb/0x2d0
 vfs_parse_fs_param+0x1cf/0x290 fs/fs_context.c:158
 vfs_parse_fs_string+0x95/0xd0 fs/fs_context.c:184
 shmem_parse_options+0x112/0x160 mm/shmem.c:3492
 parse_monolithic_mount_data+0x3e/0x50 fs/fs_context.c:667
 do_new_mount+0x1d3/0x650 fs/namespace.c:3036
 path_mount+0x4b1/0xb60 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x281/0x2d0 fs/namespace.c:3568
 __x64_sys_mount+0x63/0x70 fs/namespace.c:3568
 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

read to 0xffffffff86e7e260 of 8 bytes by task 1442 on cpu 0:
 data_make_reusable kernel/printk/printk_ringbuffer.c:590 [inline]
 data_push_tail+0x10f/0x440 kernel/printk/printk_ringbuffer.c:675
 data_alloc+0xbc/0x2b0 kernel/printk/printk_ringbuffer.c:1046
 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
 blk_print_req_error+0x117/0x120 block/blk-mq.c:705
 blk_update_request+0x776/0x840 block/blk-mq.c:802
 blk_mq_end_request block/blk-mq.c:944 [inline]
 blk_mq_try_issue_directly block/blk-mq.c:2539 [inline]
 blk_mq_submit_bio+0xc29/0xe50 block/blk-mq.c:2850
 __submit_bio block/blk-core.c:648 [inline]
 __submit_bio_noacct_mq block/blk-core.c:725 [inline]
 submit_bio_noacct_nocheck+0x83d/0xaa0 block/blk-core.c:742
 submit_bio_noacct+0x690/0x7f0 block/blk-core.c:849
 submit_bio+0xfb/0x110
 submit_bh_wbc+0x2a8/0x2f0 fs/buffer.c:3039
 submit_bh fs/buffer.c:3045 [inline]
 block_read_full_folio+0x4d6/0x560 fs/buffer.c:2337
 blkdev_read_folio+0x18/0x20 block/fops.c:377
 do_read_cache_folio+0x20f/0x3a0 mm/filemap.c:3524
 do_read_cache_page mm/filemap.c:3602 [inline]
 read_cache_page+0x37/0x170 mm/filemap.c:3611
 read_mapping_page include/linux/pagemap.h:759 [inline]
 read_part_sector+0x78/0x2f0 block/partitions/core.c:715
 read_lba block/partitions/efi.c:248 [inline]
 find_valid_gpt+0x1e7/0xcb0 block/partitions/efi.c:603
 efi_partition+0xba/0x6e0 block/partitions/efi.c:720
 check_partition block/partitions/core.c:147 [inline]
 blk_add_partitions block/partitions/core.c:600 [inline]
 bdev_disk_changed+0x3c5/0xc30 block/partitions/core.c:686
 blkdev_get_whole block/bdev.c:686 [inline]
 blkdev_get_by_dev+0x3c0/0x9c0 block/bdev.c:823
 blkdev_open+0xac/0x140 block/fops.c:481
 do_dentry_open+0x521/0x850 fs/open.c:848
 vfs_open+0x43/0x50 fs/open.c:981
 do_open fs/namei.c:3520 [inline]
 path_openat+0x16cf/0x1b30 fs/namei.c:3653
 do_filp_open+0x105/0x220 fs/namei.c:3680
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1278
 do_sys_open fs/open.c:1294 [inline]
 __do_sys_openat fs/open.c:1310 [inline]
 __se_sys_openat fs/open.c:1305 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1305
 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: 0x000000010000d200 -> 0x0000000100003301

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1442 Comm: udevd Not tainted 5.19.0-rc4-syzkaller-00036-gd9b2ba67917c-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
Buffer I/O error on dev loop2, logical block 0, async page read
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop4, logical block 0, async page read
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop4, logical block 0, async page read
 loop4: unable to read partition table
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop2, logical block 0, async page read
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
 loop3: unable to read partition table
loop3: partition table beyond EOD, truncated
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
 loop3: unable to read partition table
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
 loop3: unable to read partition table
 loop3: unable to read partition table
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
 loop2: unable to read partition table
blk_print_req_error: 10 callbacks suppressed
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
buffer_io_error: 10 callbacks suppressed
Buffer I/O error on dev loop3, logical block 0, async page read
 loop3: unable to read partition table
loop3: partition table beyond EOD, truncated
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
 loop3: unable to read partition table
loop3: partition table beyond EOD, truncated
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
 loop3: unable to read partition table
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
 loop3: unable to read partition table
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
 loop3: unable to read partition table
loop3: partition table beyond EOD, truncated
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev loop3, logical block 0, async page read
 loop3: unable to read partition table

Crashes (157):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/06/30 12:04 upstream d9b2ba67917c 1434eec0 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/24 09:01 upstream 92f20ff72066 a5dbd430 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/24 02:19 upstream 92f20ff72066 912f5df7 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/19 10:20 upstream 354c6e071be9 8f633d84 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/16 06:33 upstream 30306f6194ca 1719ee24 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/11 21:16 upstream 0885eacdc81f 0d5abf15 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/07 19:02 upstream e71e60cd74df b2706118 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/05 21:08 upstream 952923ddc011 c8857892 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/01 16:54 upstream 700170bf6b4d b4bc6a3d .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/28 15:16 upstream 9d004b2f4fea a46af346 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/18 09:26 upstream 210e04ff7681 744a39e2 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/16 10:41 upstream 42226c989789 744a39e2 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/13 05:19 upstream 0ac824f379fb 9ad6612a .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/11 09:30 upstream feb9c5e19e91 8d7b3b67 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/10 22:33 upstream 9be9ed2612b5 8b277b8e .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/29 02:39 upstream 259b897e5a79 e9076525 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/27 07:10 upstream cf424ef014ac 1fa34c1b .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/24 22:53 upstream 42740a2ff5d3 131df97d .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/17 06:31 upstream 90ea17a9e27b 8bcc32a6 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/13 09:36 upstream a19944809fe9 faabdb86 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/10 08:09 upstream e1f700ebd6be e22c3da3 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/07 16:03 upstream 3e732ebf7316 53c67432 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/05 15:10 upstream 312310928417 5915c2cb .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/03 19:36 upstream be2d3ecedd99 79a2a8fc .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/03/23 13:02 upstream 3bf03b9a0839 5ff41e94 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/03/21 17:24 upstream f443e374ae13 e2d91b1d .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/03/06 18:48 upstream dcde98da9970 7bdd8b2c .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/02/28 07:57 upstream 52a025546731 45a13a73 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/02/24 10:55 upstream 23d04328444a 6e821dbf .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/02/21 17:32 upstream cfb92440ee71 3cd800e4 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/02/18 11:37 upstream a3580ac9b7a3 3cd800e4 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/02/13 11:55 upstream b81b1829e7e3 8b9ca619 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/02/10 11:11 upstream f4bc5bbb5fef 0b33604d .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/02/04 23:56 upstream 86286e486cbd e13a05ed .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/29 07:55 upstream 169387e2aa29 495e00c5 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/26 13:45 upstream 0280e3c58f92 2cbffd88 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/22 09:58 upstream 0809edbae347 214351e1 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/17 23:55 upstream 0c947b893d69 731a2d23 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/13 16:39 upstream 455e73a07f6e b8d780ab .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/13 06:29 upstream f079ab01b560 44d1319a .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/12 02:18 upstream 6f38be8f2ccd 44d1319a .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/11 17:43 upstream fe8152b38d3a 1884f55a .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/09 18:48 upstream 4634129ad9fd 2ca0d385 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/09 04:16 upstream 21f35d2ca83e 2ca0d385 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/08 11:16 upstream d1587f7bfe9a 2ca0d385 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/01/02 03:29 upstream 278218f6778b e1768e9c .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2021/12/31 01:50 upstream 9bad743e8d22 36bd2e48 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2021/12/28 19:31 upstream a8ad9a2434dc 76c8cf06 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2021/07/20 18:18 upstream 8cae8cd89f05 1b201b48 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2021/07/19 13:52 upstream 2734d6c1b1a0 e6a17580 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2021/03/15 21:32 upstream 1e28eed17697 fdb2bb2c .config log report info KCSAN: data-race in data_push_tail / string