Skip to content

Commit 6e11058

Browse files
committed
Pull jfs update from Dave Kleikamp: "Just one simple sanity check" * tag 'jfs-6.3' of https://github.com/kleikamp/linux-shaggy: fs/jfs: fix shift exponent db_agl2size negative
2 parents e103ece + fad376f commit 6e11058

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/jfs/jfs_dmap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ int dbMount(struct inode *ipbmap)
193193
bmp->db_agwidth = le32_to_cpu(dbmp_le->dn_agwidth);
194194
bmp->db_agstart = le32_to_cpu(dbmp_le->dn_agstart);
195195
bmp->db_agl2size = le32_to_cpu(dbmp_le->dn_agl2size);
196-
if (bmp->db_agl2size > L2MAXL2SIZE - L2MAXAG) {
196+
if (bmp->db_agl2size > L2MAXL2SIZE - L2MAXAG ||
197+
bmp->db_agl2size < 0) {
197198
err = -EINVAL;
198199
goto err_release_metapage;
199200
}

0 commit comments

Comments
 (0)