Skip to content

Commit e106e26

Browse files
Yongpeng Yangbrauner
authored andcommitted
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: [email protected] # v6.15 Fixes: 1b17a46 ("isofs: convert isofs to use the new mount API") Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Yongpeng Yang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent f2c1f63 commit e106e26

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

fs/isofs/inode.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,11 @@ static int isofs_fill_super(struct super_block *s, struct fs_context *fc)
610610
goto out_freesbi;
611611
}
612612
opt->blocksize = sb_min_blocksize(s, opt->blocksize);
613+
if (!opt->blocksize) {
614+
printk(KERN_ERR
615+
"ISOFS: unable to set blocksize\n");
616+
goto out_freesbi;
617+
}
613618

614619
sbi->s_high_sierra = 0; /* default is iso9660 */
615620
sbi->s_session = opt->session;

0 commit comments

Comments
 (0)