]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: don't clobber ret in btrfs_validate_super()
authorMark Harmstone <maharmstone@fb.com>
Tue, 11 Mar 2025 16:39:25 +0000 (16:39 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:54 +0000 (20:35 +0100)
commit9db9c7dd5b4e1d3205137a094805980082c37716
tree84925175a478acb504b0cc09bb743f853e0cce77
parent49990d8fa27d75f8ecf4ad013b13de3c4b1ff433
btrfs: don't clobber ret in btrfs_validate_super()

Commit 2a9bb78cfd36 ("btrfs: validate system chunk array at
btrfs_validate_super()") introduces a call to validate_sys_chunk_array()
in btrfs_validate_super(), which clobbers the value of ret set earlier.
This has the effect of negating the validity checks done earlier, making
it so btrfs could potentially try to mount invalid filesystems.

Fixes: 2a9bb78cfd36 ("btrfs: validate system chunk array at btrfs_validate_super()")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Mark Harmstone <maharmstone@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c