mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-27 03:35:51 -04:00
hpfs: fix a crash if hpfs_map_dnode_bitmap fails
If hpfs_map_dnode_bitmap fails, the code would call hpfs_brelse4 on uninitialized quad buffer head, causing a crash. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reported-by: Farhad Alemi <farhad.alemi@berkeley.edu> Cc: stable@vger.kernel.org
This commit is contained in:
@@ -372,8 +372,8 @@ int hpfs_check_free_dnodes(struct super_block *s, int n)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
hpfs_brelse4(&qbh);
|
||||
}
|
||||
hpfs_brelse4(&qbh);
|
||||
i = 0;
|
||||
if (hpfs_sb(s)->sb_c_bitmap != -1) {
|
||||
bmp = hpfs_map_bitmap(s, b, &qbh, "chkdn1");
|
||||
|
||||
Reference in New Issue
Block a user