isofs: check the return value of sb_min_blocksize() in isofs_fill_super

JIRA: https://issues.redhat.com/browse/RHEL-154215
Conflicts: context difference

commit e106e269c5cb38315eb0a0e7e38f71e9b20c8c66
Author: Yongpeng Yang <yangyongpeng@xiaomi.com>
Date:   Tue Nov 4 20:50:08 2025 +0800

    isofs: check the return value of sb_min_blocksize() in isofs_fill_super

    sb_min_blocksize() may return 0. Check its return value to avoid
    opt->blocksize and sb->s_blocksize is 0.

    Cc: stable@vger.kernel.org # v6.15
    Fixes: 1b17a46c9243e9 ("isofs: convert isofs to use the new mount API")
    Reviewed-by: Jan Kara <jack@suse.cz>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com>
    Link: https://patch.msgid.link/20251104125009.2111925-4-yangyongpeng.storage@gmail.com
    Signed-off-by: Christian Brauner <brauner@kernel.org>

Signed-off-by: Ming Lei <ming.lei@redhat.com>
This commit is contained in:
Ming Lei
2026-03-19 16:06:00 +08:00
parent f549bfe884
commit 0eae996046
+5
View File
@@ -655,6 +655,11 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
goto out_freesbi;
}
opt.blocksize = sb_min_blocksize(s, opt.blocksize);
if (!opt.blocksize) {
printk(KERN_ERR
"ISOFS: unable to set blocksize\n");
goto out_freesbi;
}
sbi->s_high_sierra = 0; /* default is iso9660 */
sbi->s_session = opt.session;