process 'syz.0.0' launched './file3' with NULL argv: empty string added BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:321 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5326, name: syz.0.0 preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 5 locks held by syz.0.0/5326: #0: ffff8880007bb488 (&sig->cred_guard_mutex){+.+.}-{4:4}, at: prepare_bprm_creds fs/exec.c:1470 [inline] #0: ffff8880007bb488 (&sig->cred_guard_mutex){+.+.}-{4:4}, at: bprm_execve+0xd1/0x1440 fs/exec.c:1837 #1: ffff888055960a80 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:922 [inline] #1: ffff888055960a80 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_order+0x45e/0xca0 mm/readahead.c:491 #2: ffff888053d84210 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline] #2: ffff888053d84210 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline] #2: ffff888053d84210 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7ed/0xd40 fs/bcachefs/btree_iter.c:3386 #3: ffff888053ce0140 (bcachefs_btree){+.+.}-{0:0}, at: trans_set_locked fs/bcachefs/btree_locking.h:198 [inline] #3: ffff888053ce0140 (bcachefs_btree){+.+.}-{0:0}, at: __bch2_trans_relock+0x386/0x600 fs/bcachefs/btree_locking.c:786 #4: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] #4: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] #4: ffffffff8ed3dfe0 (rcu_read_lock){....}-{1:3}, at: bch2_bkey_pick_read_device+0x29c/0x19b0 fs/bcachefs/extents.c:144 CPU: 0 UID: 0 PID: 5326 Comm: syz.0.0 Not tainted 6.14.0-syzkaller-12245-g91e5bfe317d8 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 __might_resched+0x558/0x6c0 kernel/sched/core.c:8818 might_alloc include/linux/sched/mm.h:321 [inline] slab_pre_alloc_hook mm/slub.c:4102 [inline] slab_alloc_node mm/slub.c:4180 [inline] __do_kmalloc_node mm/slub.c:4330 [inline] __kmalloc_node_track_caller_noprof+0xd3/0x4d0 mm/slub.c:4350 __do_krealloc mm/slub.c:4908 [inline] krealloc_noprof+0x10f/0x300 mm/slub.c:4961 bch2_printbuf_make_room+0x1f1/0x350 fs/bcachefs/printbuf.c:59 bch2_prt_printf+0x269/0x6d0 fs/bcachefs/printbuf.c:186 bch2_log_msg_start fs/bcachefs/error.c:19 [inline] bch2_fs_trans_inconsistent fs/bcachefs/error.c:63 [inline] bch2_fs_inconsistent+0x143/0x220 fs/bcachefs/error.c:81 bch2_dev_rcu fs/bcachefs/sb-members.h:226 [inline] bch2_bkey_pick_read_device+0x95e/0x19b0 fs/bcachefs/extents.c:165 __bch2_read_extent+0x3ab/0x4400 fs/bcachefs/io_read.c:963 bch2_read_extent fs/bcachefs/io_read.h:140 [inline] bchfs_read+0x251a/0x3350 fs/bcachefs/fs-io-buffered.c:226 bch2_readahead+0xe7a/0x12d0 fs/bcachefs/fs-io-buffered.c:301 read_pages+0x193/0x590 mm/readahead.c:160 page_cache_ra_order+0xa37/0xca0 mm/readahead.c:515 filemap_get_pages+0x59f/0x1fc0 mm/filemap.c:2590 filemap_read+0x466/0x1260 mm/filemap.c:2701 bch2_read_iter+0x1179/0x14b0 fs/bcachefs/fs-io-direct.c:221 __kernel_read+0x532/0xa10 fs/read_write.c:528 prepare_binprm fs/exec.c:1712 [inline] search_binary_handler fs/exec.c:1759 [inline] exec_binprm fs/exec.c:1805 [inline] bprm_execve+0x8ac/0x1440 fs/exec.c:1857 do_execveat_common+0x57c/0x710 fs/exec.c:1964 do_execveat fs/exec.c:2049 [inline] __do_sys_execveat fs/exec.c:2123 [inline] __se_sys_execveat fs/exec.c:2117 [inline] __x64_sys_execveat+0xc4/0xe0 fs/exec.c:2117 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4a4bb8d169 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4a4c9e1038 EFLAGS: 00000246 ORIG_RAX: 0000000000000142 RAX: ffffffffffffffda RBX: 00007f4a4bda5fa0 RCX: 00007f4a4bb8d169 RDX: 0000000000000000 RSI: 0000200000000040 RDI: ffffffffffffff9c RBP: 00007f4a4bc0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4a4bda5fa0 R15: 00007ffc60f488f8 bcachefs (loop0): pointer to nonexistent device 237 bcachefs (loop0): /file3 offset 0: no_devices_valid u64s 7 type extent 536870913:24:U32_MAX len 24 ver 0: durability: 0 crc: c_size 8 size 24 offset 0 nonce 0 csum none 0:0 compress lz4 ptr: 237:893353206280 gen 0 syz.0.0 (5326) used greatest stack depth: 19264 bytes left