Commit c11760c6 authored by Linus Torvalds's avatar Linus Torvalds

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: default avatar김원석 <stanley.will.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a6c0a392
...@@ -974,7 +974,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent) ...@@ -974,7 +974,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
out_no_read: out_no_read:
printk(KERN_WARNING "%s: bread failed, dev=%s, iso_blknum=%d, block=%d\n", printk(KERN_WARNING "%s: bread failed, dev=%s, iso_blknum=%d, block=%d\n",
__func__, s->s_id, iso_blknum, block); __func__, s->s_id, iso_blknum, block);
goto out_freesbi; goto out_freebh;
out_bad_zone_size: out_bad_zone_size:
printk(KERN_WARNING "ISOFS: Bad logical zone size %ld\n", printk(KERN_WARNING "ISOFS: Bad logical zone size %ld\n",
sbi->s_log_zone_size); sbi->s_log_zone_size);
...@@ -989,6 +989,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent) ...@@ -989,6 +989,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
out_freebh: out_freebh:
brelse(bh); brelse(bh);
brelse(pri_bh);
out_freesbi: out_freesbi:
kfree(opt.iocharset); kfree(opt.iocharset);
kfree(sbi); kfree(sbi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment