mirror of
https://github.com/torvalds/linux.git
synced 2025-11-30 23:16:01 +07:00
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: 1b17a46c92 ("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>
This commit is contained in:
committed by
Christian Brauner
parent
f2c1f63163
commit
e106e269c5
@@ -610,6 +610,11 @@ static int isofs_fill_super(struct super_block *s, struct fs_context *fc)
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user