mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
jfs: Fix sanity check in dbMount
MAXAG is a legitimate value for bmp->db_numag
Fixes: e63866a475
("jfs: fix out-of-bounds in dbNextAG() and diAlloc()")
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
This commit is contained in:
parent
c2ee9f594d
commit
67373ca840
@ -187,7 +187,7 @@ int dbMount(struct inode *ipbmap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bmp->db_numag = le32_to_cpu(dbmp_le->dn_numag);
|
bmp->db_numag = le32_to_cpu(dbmp_le->dn_numag);
|
||||||
if (!bmp->db_numag || bmp->db_numag >= MAXAG) {
|
if (!bmp->db_numag || bmp->db_numag > MAXAG) {
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto err_release_metapage;
|
goto err_release_metapage;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user