From: Mikulas Patocka Date: Mon, 25 May 2026 12:48:58 +0000 (+0200) Subject: hpfs: fix a crash if hpfs_map_dnode_bitmap fails X-Git-Tag: v7.1-rc6~33^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=974820a59efde7c1a7e1260bcfe9bb81f833cc9f;p=thirdparty%2Fkernel%2Flinux.git 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 Reported-by: Farhad Alemi Cc: stable@vger.kernel.org --- diff --git a/fs/hpfs/alloc.c b/fs/hpfs/alloc.c index 66617b1557c64..f5150372618ed 100644 --- a/fs/hpfs/alloc.c +++ b/fs/hpfs/alloc.c @@ -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");