syzbot


KCSAN: data-race in __dd_dispatch_request / ll_back_merge_fn

Status: auto-obsoleted due to no activity on 2024/01/14 11:29
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+71239ed0900c34222fc0@syzkaller.appspotmail.com
First crash: 629d, last: 629d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __dd_dispatch_request / ll_back_merge_fn (2) block 6 1 202d 202d 0/29 auto-obsoleted due to no activity on 2025/04/07 02:56

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __dd_dispatch_request / ll_back_merge_fn

write to 0xffff88810181dc80 of 8 bytes by task 11033 on cpu 0:
 deadline_remove_request block/mq-deadline.c:224 [inline]
 deadline_move_request block/mq-deadline.c:286 [inline]
 __dd_dispatch_request+0x606/0x6c0 block/mq-deadline.c:546
 dd_dispatch_request+0x1d4/0x2c0 block/mq-deadline.c:613
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:118 [inline]
 blk_mq_do_dispatch_sched block/blk-mq-sched.c:184 [inline]
 __blk_mq_sched_dispatch_requests+0x3ed/0xd20 block/blk-mq-sched.c:309
 blk_mq_sched_dispatch_requests+0x99/0x100 block/blk-mq-sched.c:333
 blk_mq_run_hw_queue+0x2a4/0x4c0 block/blk-mq.c:2264
 blk_mq_flush_plug_list+0x7b6/0xdc0 block/blk-mq.c:2812
 __blk_flush_plug+0x210/0x260 block/blk-core.c:1150
 blk_finish_plug+0x47/0x60 block/blk-core.c:1174
 __iomap_dio_rw+0xc69/0x1090 fs/iomap/direct-io.c:667
 iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:748
 ext4_dio_read_iter fs/ext4/file.c:94 [inline]
 ext4_file_read_iter+0x21c/0x2a0 fs/ext4/file.c:145
 call_read_iter include/linux/fs.h:2014 [inline]
 copy_splice_read+0x26b/0x4b0 fs/splice.c:364
 vfs_splice_read fs/splice.c:992 [inline]
 splice_direct_to_actor+0x2aa/0x690 fs/splice.c:1069
 do_splice_direct+0x10d/0x190 fs/splice.c:1194
 do_sendfile+0x3c4/0x980 fs/read_write.c:1254
 __do_sys_sendfile64 fs/read_write.c:1322 [inline]
 __se_sys_sendfile64 fs/read_write.c:1308 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88810181dc80 of 8 bytes by task 11031 on cpu 1:
 req_set_nomerge block/blk.h:351 [inline]
 ll_back_merge_fn+0x29c/0x4a0 block/blk-merge.c:647
 bio_attempt_back_merge+0x58/0x500 block/blk-merge.c:982
 blk_attempt_bio_merge+0x43d/0x480 block/blk-merge.c:1068
 blk_attempt_plug_merge+0xb4/0xf0 block/blk-merge.c:1115
 blk_mq_attempt_bio_merge block/blk-mq.c:2853 [inline]
 blk_mq_get_new_requests block/blk-mq.c:2873 [inline]
 blk_mq_submit_bio+0x3ab/0xd90 block/blk-mq.c:2982
 __submit_bio+0x11c/0x350 block/blk-core.c:607
 __submit_bio_noacct_mq block/blk-core.c:686 [inline]
 submit_bio_noacct_nocheck+0x449/0x5e0 block/blk-core.c:715
 submit_bio_noacct+0x70c/0x8c0 block/blk-core.c:809
 submit_bio+0xb7/0xc0 block/blk-core.c:842
 swap_writepage_bdev_async mm/page_io.c:368 [inline]
 __swap_writepage+0x69d/0xdb0 mm/page_io.c:386
 swap_writepage+0x6e/0x120 mm/page_io.c:204
 shmem_writepage+0x7a6/0x970 mm/shmem.c:1500
 pageout mm/vmscan.c:654 [inline]
 shrink_folio_list+0x1952/0x2540 mm/vmscan.c:1315
 shrink_inactive_list mm/vmscan.c:1913 [inline]
 shrink_list mm/vmscan.c:2154 [inline]
 shrink_lruvec+0xd80/0x17a0 mm/vmscan.c:5626
 shrink_node_memcgs mm/vmscan.c:5812 [inline]
 shrink_node+0xab3/0x15c0 mm/vmscan.c:5847
 shrink_zones mm/vmscan.c:6086 [inline]
 do_try_to_free_pages+0x43d/0xce0 mm/vmscan.c:6148
 try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:6463
 try_charge_memcg+0x280/0xd30 mm/memcontrol.c:2742
 obj_cgroup_charge_pages+0xab/0x130 mm/memcontrol.c:3255
 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3281
 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4585
 alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133
 alloc_pages+0xe0/0x100 mm/mempolicy.c:2204
 vm_area_alloc_pages mm/vmalloc.c:3063 [inline]
 __vmalloc_area_node mm/vmalloc.c:3139 [inline]
 __vmalloc_node_range+0x6d2/0xea0 mm/vmalloc.c:3320
 kvmalloc_node+0x121/0x160 mm/util.c:642
 kvmalloc include/linux/slab.h:738 [inline]
 xt_alloc_table_info+0x3d/0x80 net/netfilter/x_tables.c:1192
 do_replace net/ipv4/netfilter/arp_tables.c:970 [inline]
 do_arpt_set_ctl+0x634/0x13b0 net/ipv4/netfilter/arp_tables.c:1421
 nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101
 ip_setsockopt+0xe6/0x100 net/ipv4/ip_sockglue.c:1426
 tcp_setsockopt+0x90/0xa0 net/ipv4/tcp.c:3724
 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3711
 do_sock_setsockopt net/socket.c:2311 [inline]
 __sys_setsockopt+0x1d4/0x240 net/socket.c:2334
 __do_sys_setsockopt net/socket.c:2343 [inline]
 __se_sys_setsockopt net/socket.c:2340 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2340
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0xffff888101888340 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11031 Comm: syz-executor.1 Not tainted 6.7.0-rc4-syzkaller-00424-gc527f5606aa5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================
syz-executor.1 (11031) used greatest stack depth: 8056 bytes left

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/10 11:28 upstream c527f5606aa5 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __dd_dispatch_request / ll_back_merge_fn
* Struck through repros no longer work on HEAD.