Skip to content

Commit c11760c

Browse files
committed
isofs: fix bh leak in isofs_fill_super() error case
In isofs_fill_super(), when an iso_primary_descriptor is found, it is kept in pri_bh. The error cases don't properly release it. Fix it. Reported-and-tested-by: 김원석 <stanley.will.kim@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a6c0a39 commit c11760c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/isofs/inode.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
974974
out_no_read:
975975
printk(KERN_WARNING "%s: bread failed, dev=%s, iso_blknum=%d, block=%d\n",
976976
__func__, s->s_id, iso_blknum, block);
977-
goto out_freesbi;
977+
goto out_freebh;
978978
out_bad_zone_size:
979979
printk(KERN_WARNING "ISOFS: Bad logical zone size %ld\n",
980980
sbi->s_log_zone_size);
@@ -989,6 +989,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
989989

990990
out_freebh:
991991
brelse(bh);
992+
brelse(pri_bh);
992993
out_freesbi:
993994
kfree(opt.iocharset);
994995
kfree(sbi);

0 commit comments

Comments
 (0)