Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.198 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796213149; b=PoYk3ENU0v9AnEjBqWpZfCReCefctOSlyf6azARVpJKCYWn0qOsBcd7NF+P+QQzqm2zA gkUqSWCy6gn00QuIuYqTIQ/qh3u7Kbw6hMENLouFg0B666NmOWKDkGm9adt9mbngiI/Gp TaMO/d9QxyHaaDxQSj2PNp2DFtv6RWBMRynBByUDNVgJAZeRdBMEcmCkziiE+MXvFeJXl DR5juna8p/+pXi05cHxmV4TI1Q8C4xNth1y7aMcTenqCN93dBTXrPhAnnjn+sWW6qhsZ3 OP0zBYF4YYU0R4M7hqlhkZFsc955GYC5ybFooMtSmWdDk5UDPhlVbVE5A1661LKQgIw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796213149; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:MIME-Version:X-Received:Date: X-Google-Appengine-App-Id:X-Google-Appengine-App-Id-Alias:Message-ID: Subject:From:To:Content-Type; bh=Vk4IQCdR/Lx3gyifKiLmEBiuy8uZE+FqV62o94tp5mQ=; b=T++IGuHgx9BOQ0WQr7ODxkdiZVL5ZTUbk1PDiiGg7+sOhCRp1xzHBtSB7u+ayRxALR6e e34mc5IoRMMSgzYBInWrEzFoBRU7067yhicBVH5I4xJQKuzYr8/FB9XZeXEdmieS6vXPL B8Zl+Bw4W+dr+A8YWaMxOuoS1xpbqogi4bFFkG25Z6WqgqM+0ve1o+n90pgR0qWruGIIC aF48VSqd8jwiE72bnaaoBD2nFr4h4TkcRYoQprfp8TPORd6eXic98sa86F09TlLYNBbSU 2/ij/tyuPYjKXgekTSW3tSgeEaG3/+aoiERgmGg6/xPUqqOcok61R/Oudu6FBAr4clg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.remote-ip=209.85.167.198 Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9072606A689 for ; Wed, 2 Dec 2026 12:05:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D9072606A689 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oi1-f198.google.com with SMTP id 5614622812f47-57e3f40cc16so6544555b6e.3 for ; Wed, 02 Dec 2026 04:05:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796213148; x=1796817948; h=content-type:to:from:subject:message-id:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Vk4IQCdR/Lx3gyifKiLmEBiuy8uZE+FqV62o94tp5mQ=; b=GN3PVFadNqRK8MBFYgcQqooVZiZk93v8HDZImA2RzHJSLYHaZbKiSKRzqEFMMc5gb8 Mvwdul7aMqcb0O4WEuYO5L0Xehu9u1IFSfVwQGQvId3wvTA2uE2jHsh54/odlTMmeq8C lbPC9luBCLl77y4SpbFJHJeu6i8h+M54z3ZnEO05wnxlDsiTHSZuoNsTenUMSud4eA2p 7n9PGfp3q/t31umzS9uGYs45arsnyklhXapkEjvRScCHd1c5ML7oYKg1GwrXtGSAlkCi G4e2Dw46554Fnf7D8DFS9bmRwAN/6+osNJnMtLBvSYL5rHic8sWBFg6LpaZL80aIbPI3 3pAg== X-Forwarded-Encrypted: i=1; AL+hErFdO+S4Ektv9rOoj3xt8fpNI1iY/Sv8LRFQ8YZjyuR8w38/1T+OKKcRnqEgbA0cQytueS79mOTCNX9IPQ==@vger.kernel.org X-Gm-Message-State: APuU4Z+uwLBgbcZ+pBfbg06D67XvwVunL0RIsypxA+xzpUGop6LZ+FKY bjiBQrhbYUJ3e6UjqRnlF+W1C9yT67ZFsND20BE3xFIBIlRHNGw24q8gvIzFyz44KBMxE8g9AoL p20uMWPSuF/aJ+G2fQlg4zIrLiW9Bb1uPQUt248Aj70m+NcjAWrwFwKzHJy8= X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Received: by 2002:a05:6808:bd4:b0:572:f8ec:533a with SMTP id 5614622812f47-57a0ba5db4fmr39691668b6e.48.1796213148119; Wed, 02 Dec 2026 04:05:48 -0800 (PST) Date: Wed, 02 Dec 2026 04:05:48 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6b10099c.3ba11d86.1c9c77.0033.GAE@google.com> Subject: [syzbot] [nbd?] [btrfs?] possible deadlock in btrfs_search_slot (4) From: syzbot To: axboe@kernel.dk, dsterba@suse.com, edumazet@google.com, josef@toxicpanda.com, kartikey406@gmail.com, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, mason@kernel.org, nbd@other.debian.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: 19cc08c1a6a6 Merge tag 'clk-fixes-for-linus-v7.4' of git:/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1537bed5580000 kernel config: https://syzkaller.appspot.com/x/.config?x=d07b2352498f5906 dashboard link: https://syzkaller.appspot.com/bug?extid=38cb8629e443a9be91ff compiler: Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/65750e0780e0/disk-19cc08c1.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/7910ac637ef0/vmlinux-19cc08c1.xz kernel image: https://storage.googleapis.com/syzbot-assets/d6b8d3ab3024/bzImage-19cc08c1.xz The issue was bisected by AI to: commit 9280e6edf65662b6aafc8b704ad065b54c08b519 Author: Deepanshu Kartikey Date: Sun Jun 21 23:52:55 2026 +0000 nbd: don't warn when reclassifying a busy socket lock reasoning: https://syzkaller.appspot.com/ai_job?id=c6a2fb64-5919-4302-a2c5-8443f81f099f AI-generated root cause summary: In drivers/block/nbd.c, nbd_reclassify_socket() is supposed to move attached sockets into NBD's dedicated sk_lock-AF_INET-NBD lockdep class, but because userspace retains the socket fd and can concurrently hold the socket lock (or softirq BH processing can hold sk_lock.slock), sock_allow_reclassification() can return false and cause nbd_reclassify_socket() to silently skip reclassification while still attaching the socket under the generic sk_lock-AF_INET class. Combined with shared global lockdep classes (&q->elevator_lock and set->srcu bridging loop8 and nbd, and sk_lock-AF_INET bridging NBD and regular tcp_sendmsg()) plus read_block_for_search() holding btrfs-tree-00 across btrfs_read_extent_buffer(), lockdep observes an 11-lock cycle back to btrfs-tree-01. Additionally, because NBD allows userspace to retain the socket fd, a CAP_SYS_ADMIN process can also trigger a real self-deadlock on sk_lock if it writes to the attached NBD socket from an mmap()ed buffer backed by that NBD device. full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=38cb8629e443a9be91ff IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+38cb8629e443a9be91ff@syzkaller.appspotmail.com The bisection result may be wrong. If you agree with it, please also add: Fixes: 9280e6edf656 ("nbd: don't warn when reclassifying a busy socket lock") BTRFS info (device loop8): enabling ssd optimizations BTRFS info (device loop8): turning on async discard BTRFS info (device loop8): enabling free space tree BTRFS info (device loop8): use zstd compression, level 3 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.8.6633/27696 is trying to acquire lock: ffff8880847940f0 (btrfs-tree-00){++++}-{4:4}, at: btrfs_tree_read_lock_nested+0x45/0x250 fs/btrfs/locking.c:146 but task is already holding lock: ffff888084795360 (btrfs-tree-01){++++}-{4:4}, at: btrfs_tree_read_lock_nested+0x45/0x250 fs/btrfs/locking.c:146 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #10 (btrfs-tree-01){++++}-{4:4}: down_read_nested+0x47/0x320 kernel/locking/rwsem.c:1709 btrfs_tree_read_lock_nested+0x45/0x250 fs/btrfs/locking.c:146 btrfs_tree_read_lock fs/btrfs/locking.h:188 [inline] btrfs_read_lock_root_node+0x3f/0xd0 fs/btrfs/locking.c:267 btrfs_search_slot_get_root fs/btrfs/ctree.c:1740 [inline] btrfs_search_slot+0x66c/0x2d20 fs/btrfs/ctree.c:2070 btrfs_lookup_file_extent+0xe6/0x140 fs/btrfs/file-item.c:265 btrfs_drop_extents+0x444/0x29b0 fs/btrfs/file.c:170 __cow_file_range_inline+0x270/0x1000 fs/btrfs/inode.c:638 run_delalloc_inline fs/btrfs/inode.c:2354 [inline] btrfs_run_delalloc_range+0x1932/0x1e80 fs/btrfs/inode.c:2410 writepage_delalloc+0x10a4/0x1c60 fs/btrfs/extent_io.c:1685 extent_writepage fs/btrfs/extent_io.c:2081 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2834 [inline] btrfs_writepages+0x15df/0x2830 fs/btrfs/extent_io.c:2965 do_writepages+0x338/0x560 mm/page-writeback.c:2562 filemap_writeback mm/filemap.c:386 [inline] filemap_fdatawrite_range+0x1ef/0x2f0 mm/filemap.c:411 btrfs_fdatawrite_range+0x54/0xf0 fs/btrfs/file.c:3872 btrfs_wait_ordered_range+0x59/0x260 fs/btrfs/ordered-data.c:910 btrfs_fallocate+0xbc8/0x1df0 fs/btrfs/file.c:3162 vfs_fallocate+0x65a/0x7e0 fs/open.c:338 ksys_fallocate fs/open.c:362 [inline] __do_sys_fallocate fs/open.c:367 [inline] __se_sys_fallocate fs/open.c:365 [inline] __x64_sys_fallocate+0xbf/0x110 fs/open.c:365 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #9 (btrfs_trans_num_extwriters){++++}-{0:0}: join_transaction+0x180/0x1030 fs/btrfs/transaction.c:346 start_transaction+0x731/0x1830 fs/btrfs/transaction.c:753 btrfs_dirty_inode+0x9f/0x190 fs/btrfs/inode.c:6386 file_update_time_flags+0x285/0x440 fs/inode.c:2502 btrfs_fallocate+0x79a/0x1df0 fs/btrfs/file.c:3126 vfs_fallocate+0x65a/0x7e0 fs/open.c:338 ksys_fallocate fs/open.c:362 [inline] __do_sys_fallocate fs/open.c:367 [inline] __se_sys_fallocate fs/open.c:365 [inline] __x64_sys_fallocate+0xbf/0x110 fs/open.c:365 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #8 (btrfs_trans_num_writers){++++}-{0:0}: __lock_release kernel/locking/lockdep.c:5627 [inline] lock_release+0x1a3/0x3c0 kernel/locking/lockdep.c:5964 percpu_up_read include/linux/percpu-rwsem.h:114 [inline] __sb_end_write include/linux/fs/super.h:14 [inline] sb_end_intwrite+0x26/0x190 include/linux/fs/super.h:101 __btrfs_end_transaction+0x237/0x640 fs/btrfs/transaction.c:1124 btrfs_dirty_inode+0x14c/0x190 fs/btrfs/inode.c:6400 touch_atime+0x2f8/0x670 fs/inode.c:2347 file_accessed include/linux/fs.h:2286 [inline] btrfs_file_mmap_prepare+0x172/0x1f0 fs/btrfs/file.c:2010 vfs_mmap_prepare include/linux/fs.h:2076 [inline] call_mmap_prepare mm/vma.c:2986 [inline] __mmap_region mm/vma.c:3103 [inline] mmap_region+0x1191/0x2820 mm/vma.c:3201 do_mmap+0xe0a/0x1300 mm/mmap.c:573 vm_mmap_pgoff+0x27a/0x520 mm/util.c:581 ksys_mmap_pgoff+0x4dc/0x760 mm/mmap.c:619 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #7 (&mm->mmap_lock){++++}-{4:4}: __might_fault+0xcb/0x130 mm/memory.c:7607 _copy_from_iter+0x100/0x1680 lib/iov_iter.c:271 copy_from_iter include/linux/uio.h:236 [inline] copy_from_iter_full include/linux/uio.h:253 [inline] skb_do_copy_data_nocache include/net/sock.h:2345 [inline] skb_copy_to_page_nocache include/net/sock.h:2371 [inline] tcp_sendmsg_locked+0x244e/0x57c0 net/ipv4/tcp.c:1324 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1467 sock_sendmsg_nosec+0x10f/0x190 net/socket.c:801 __sock_sendmsg net/socket.c:818 [inline] sock_write_iter+0x2de/0x3e0 net/socket.c:1269 new_sync_write fs/read_write.c:575 [inline] vfs_write+0x612/0xba0 fs/read_write.c:667 ksys_write+0x150/0x270 fs/read_write.c:719 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #6 (sk_lock-AF_INET){+.+.}-{0:0}: lock_sock_nested+0x41/0x100 net/core/sock.c:3909 lock_sock include/net/sock.h:1717 [inline] inet_shutdown+0x6a/0x390 net/ipv4/af_inet.c:913 nbd_mark_nsock_dead+0x2cb/0x550 drivers/block/nbd.c:319 recv_work+0x1d14/0x1e30 drivers/block/nbd.c:1030 process_one_work kernel/workqueue.c:3497 [inline] process_scheduled_works+0xc5d/0x1650 kernel/workqueue.c:3580 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3661 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #5 (&nsock->tx_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 nbd_handle_cmd drivers/block/nbd.c:1143 [inline] nbd_queue_rq+0x373/0xff0 drivers/block/nbd.c:1207 blk_mq_dispatch_rq_list+0x499/0x1990 block/blk-mq.c:2141 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:168 [inline] blk_mq_do_dispatch_sched block/blk-mq-sched.c:182 [inline] __blk_mq_sched_dispatch_requests+0xd36/0x1580 block/blk-mq-sched.c:307 blk_mq_sched_dispatch_requests+0xd7/0x190 block/blk-mq-sched.c:329 blk_mq_run_work_fn+0x167/0x2f0 block/blk-mq.c:2556 process_one_work kernel/workqueue.c:3497 [inline] process_scheduled_works+0xc5d/0x1650 kernel/workqueue.c:3580 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3661 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #4 (&cmd->lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 nbd_queue_rq+0xc1/0xff0 drivers/block/nbd.c:1199 blk_mq_dispatch_rq_list+0x499/0x1990 block/blk-mq.c:2141 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:168 [inline] blk_mq_do_dispatch_sched block/blk-mq-sched.c:182 [inline] __blk_mq_sched_dispatch_requests+0xd36/0x1580 block/blk-mq-sched.c:307 blk_mq_sched_dispatch_requests+0xd7/0x190 block/blk-mq-sched.c:329 blk_mq_run_work_fn+0x167/0x2f0 block/blk-mq.c:2556 process_one_work kernel/workqueue.c:3497 [inline] process_scheduled_works+0xc5d/0x1650 kernel/workqueue.c:3580 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3661 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #3 (set->srcu){.+.+}-{0:0}: srcu_lock_sync include/linux/srcu.h:261 [inline] __synchronize_srcu+0xca/0x2f0 kernel/rcu/srcutree.c:1662 elevator_switch+0x1e8/0x7b0 block/elevator.c:576 elevator_change+0x2fa/0x480 block/elevator.c:681 elevator_set_default+0x375/0x440 block/elevator.c:754 blk_register_queue+0x404/0x4f0 block/blk-sysfs.c:992 __add_disk+0x6b8/0xdb0 block/genhd.c:531 add_disk_fwnode+0x100/0x3a0 block/genhd.c:600 add_disk include/linux/blkdev.h:799 [inline] nbd_dev_add+0x733/0xb60 drivers/block/nbd.c:2027 nbd_init+0x168/0x1f0 drivers/block/nbd.c:2744 do_one_initcall+0x250/0x870 init/main.c:1432 do_initcall_level+0x10a/0x1a0 init/main.c:1494 do_initcalls+0x59/0xa0 init/main.c:1510 kernel_init_freeable+0x29d/0x3e0 init/main.c:1745 kernel_init+0x22/0x1d0 init/main.c:1635 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #2 (&q->elevator_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 elevator_change+0x1af/0x480 block/elevator.c:679 elv_iosched_store+0x50e/0x630 block/elevator.c:831 queue_attr_store+0x207/0x2b0 block/blk-sysfs.c:906 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345 iter_file_splice_write+0x9f9/0x11c0 fs/splice.c:660 do_splice_from fs/splice.c:863 [inline] direct_splice_actor+0x101/0x160 fs/splice.c:1114 splice_direct_to_actor+0x57b/0xcb0 fs/splice.c:1023 do_splice_direct_actor fs/splice.c:1157 [inline] do_splice_direct+0x195/0x290 fs/splice.c:1183 do_sendfile+0x52e/0x7c0 fs/read_write.c:1351 __do_sys_sendfile64 fs/read_write.c:1412 [inline] __se_sys_sendfile64+0x144/0x1a0 fs/read_write.c:1398 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&q->q_usage_counter(io)#17){++++}-{0:0}: bio_queue_enter block/blk.h:95 [inline] blk_mq_submit_bio+0x7c6/0x2eb0 block/blk-mq.c:3149 __submit_bio_noacct_mq block/blk-core.c:755 [inline] submit_bio_noacct_nocheck+0x2fe/0xb80 block/blk-core.c:789 btrfs_submit_chunk fs/btrfs/bio.c:823 [inline] btrfs_submit_bbio+0x132d/0x1ee0 fs/btrfs/bio.c:882 read_extent_buffer_pages_nowait+0x747/0x860 fs/btrfs/extent_io.c:4381 read_extent_buffer_pages+0x22/0x100 fs/btrfs/extent_io.c:4390 btrfs_read_extent_buffer+0x9d/0x730 fs/btrfs/disk-io.c:236 read_block_for_search+0x67e/0xa40 fs/btrfs/ctree.c:1569 btrfs_search_slot+0x147a/0x2d20 fs/btrfs/ctree.c:2198 btrfs_init_root_free_objectid+0xf5/0x290 fs/btrfs/disk-io.c:5058 btrfs_init_fs_root+0x204/0x3b0 fs/btrfs/disk-io.c:1114 btrfs_get_root_ref+0x3c8/0x890 fs/btrfs/disk-io.c:1365 btrfs_get_fs_root fs/btrfs/disk-io.c:1417 [inline] open_ctree+0x2d07/0x4140 fs/btrfs/disk-io.c:3805 btrfs_fill_super fs/btrfs/super.c:971 [inline] btrfs_get_tree_super fs/btrfs/super.c:1956 [inline] btrfs_get_tree_subvol fs/btrfs/super.c:2099 [inline] btrfs_get_tree+0x10cf/0x1a00 fs/btrfs/super.c:2133 vfs_get_tree+0x92/0x2a0 fs/super.c:1881 fc_mount fs/namespace.c:1282 [inline] do_new_mount_fc fs/namespace.c:3910 [inline] do_new_mount+0x325/0xb00 fs/namespace.c:3986 do_mount fs/namespace.c:4350 [inline] __do_sys_mount fs/namespace.c:4563 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4540 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (btrfs-tree-00){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 down_read_nested+0x47/0x320 kernel/locking/rwsem.c:1709 btrfs_tree_read_lock_nested+0x45/0x250 fs/btrfs/locking.c:146 btrfs_tree_read_lock fs/btrfs/locking.h:188 [inline] btrfs_search_slot+0x15e1/0x2d20 fs/btrfs/ctree.c:2224 btrfs_lookup_match_dir fs/btrfs/dir-item.c:196 [inline] btrfs_lookup_dir_item+0x154/0x280 fs/btrfs/dir-item.c:234 btrfs_inode_by_name fs/btrfs/inode.c:5726 [inline] btrfs_lookup_dentry+0x269/0x1390 fs/btrfs/inode.c:6018 btrfs_lookup+0x1d/0x40 fs/btrfs/inode.c:6091 lookup_open+0xa54/0x1ae0 fs/namei.c:4536 open_last_lookups fs/namei.c:4774 [inline] path_openat+0x70c/0x20f0 fs/namei.c:5013 do_file_open+0x23e/0x4a0 fs/namei.c:5045 do_sys_openat2+0x115/0x200 fs/open.c:1443 do_sys_open fs/open.c:1449 [inline] __do_sys_openat fs/open.c:1465 [inline] __se_sys_openat fs/open.c:1460 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1460 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: btrfs-tree-00 --> btrfs_trans_num_extwriters --> btrfs-tree-01 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(btrfs-tree-01); lock(btrfs_trans_num_extwriters); lock(btrfs-tree-01); rlock(btrfs-tree-00); *** DEADLOCK *** locks held by syz.8.6633/27696: 4, on CPU#1: #0: ffff8880845de478 (sb_writers#14){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:531 #1: ffff888053a7a610 (&type->i_mutex_dir_key#11){++++}-{4:4}, at: inode_lock_shared include/linux/fs.h:1042 [inline] #1: ffff888053a7a610 (&type->i_mutex_dir_key#11){++++}-{4:4}, at: lookup_open+0x221/0x1ae0 fs/namei.c:4466 #2: ffff888077541ca0 (DCACHE_PAR_LOOKUP#17){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #2: ffff888077541ca0 (DCACHE_PAR_LOOKUP#17){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #2: ffff888077541ca0 (DCACHE_PAR_LOOKUP#17){+.+.}-{0:0}, at: __d_alloc_parallel+0x39e/0x1700 fs/dcache.c:2919 #3: ffff888084795360 (btrfs-tree-01){++++}-{4:4}, at: btrfs_tree_read_lock_nested+0x45/0x250 fs/btrfs/locking.c:146 stack backtrace: CPU: 1 UID: 0 PID: 27696 Comm: syz.8.6633 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219 check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 down_read_nested+0x47/0x320 kernel/locking/rwsem.c:1709 btrfs_tree_read_lock_nested+0x45/0x250 fs/btrfs/locking.c:146 btrfs_tree_read_lock fs/btrfs/locking.h:188 [inline] btrfs_search_slot+0x15e1/0x2d20 fs/btrfs/ctree.c:2224 btrfs_lookup_match_dir fs/btrfs/dir-item.c:196 [inline] btrfs_lookup_dir_item+0x154/0x280 fs/btrfs/dir-item.c:234 btrfs_inode_by_name fs/btrfs/inode.c:5726 [inline] btrfs_lookup_dentry+0x269/0x1390 fs/btrfs/inode.c:6018 btrfs_lookup+0x1d/0x40 fs/btrfs/inode.c:6091 lookup_open+0xa54/0x1ae0 fs/namei.c:4536 open_last_lookups fs/namei.c:4774 [inline] path_openat+0x70c/0x20f0 fs/namei.c:5013 do_file_open+0x23e/0x4a0 fs/namei.c:5045 do_sys_openat2+0x115/0x200 fs/open.c:1443 do_sys_open fs/open.c:1449 [inline] __do_sys_openat fs/open.c:1465 [inline] __se_sys_openat fs/open.c:1460 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1460 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2fae9a9c99 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2faf7d3028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f2faec35fa0 RCX: 00007f2fae9a9c99 RDX: 0000000000000002 RSI: 000020000000de80 RDI: ffffffffffffff9c RBP: 00007f2faea3b18b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2faec36038 R14: 00007f2faec35fa0 R15: 00007ffdd78f3be8 --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#ai-bisection If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup