]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: check the return value of sb_min_blocksize() in xfs_fs_fill_super
authorYongpeng Yang <yangyongpeng@xiaomi.com>
Tue, 4 Nov 2025 12:50:09 +0000 (20:50 +0800)
committerChristian Brauner <brauner@kernel.org>
Wed, 5 Nov 2025 13:00:16 +0000 (14:00 +0100)
commit124af0868ec6929ba838fb76d25f00c06ba8fc0d
treeca298d5760c752f0d7ec1c18bd49ce9d63342560
parente106e269c5cb38315eb0a0e7e38f71e9b20c8c66
xfs: check the return value of sb_min_blocksize() in xfs_fs_fill_super

sb_min_blocksize() may return 0. Check its return value to avoid the
filesystem super block when sb->s_blocksize is 0.

Cc: stable@vger.kernel.org # v6.15
Fixes: a64e5a596067bd ("bdev: add back PAGE_SIZE block size validation for sb_set_blocksize()")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com>
Link: https://patch.msgid.link/20251104125009.2111925-5-yangyongpeng.storage@gmail.com
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/xfs/xfs_super.c