CVE-2026-74572
The deadlock in CVE-2026-74572 occurs because zoned_meta_io_lock is held across a blocking wait on transaction state in the tree-log block group path within check_bg_is_active(). The lock protects fs_info->active_meta_bg and fs_info->active_system_bg, but this code path doesn't actually touch those fields—it uses ctx->zoned_bg as its synchronization boundary instead. The lock was being held unnecessarily, and worse, across a call (btrfs_zone_finish_one_bg()) that can wait for transaction commit, creating a classic lock-induced deadlock. The fix drops the lock before the blocking operation and re-acquires after. What makes this analytically significant is that the sibling branch in check_bg_is_active() already implements this pattern correctly. That means the invariant was already understood and implemented in one code path but wasn't applied to another—likely when the tree-log path was added or refactored after the sibling pattern existed. The lock's scope was determined by call-site convention (held at function entry) rather than by what the lock actually protects at each point in the function. This is a structural pattern in kernel lock bugs: the fix is mechanically simple, but the existence of the bug reveals that lock scope decisions weren't intentional—they were inherited from the call site. For defenders, the implication is that zoned btrfs deployments with heavy metadata writeback and concurrent transaction commits are vulnerable, but the triggering conditions are narrow. The deeper lesson is that wherever zoned_meta_io_lock is held across a call that might indirectly wait on transaction state, the pattern needs review—and the invariant (what fields the lock actually protects) should be documented, because the code itself doesn't make that clear.
Reviewed through automated stages and approved by a human before publication.