]> Git Repo - J-linux.git/commitdiff
jfs: Fix sanity check in dbMount
authorDave Kleikamp <[email protected]>
Tue, 22 Oct 2024 14:40:37 +0000 (09:40 -0500)
committerDave Kleikamp <[email protected]>
Tue, 22 Oct 2024 14:40:37 +0000 (09:40 -0500)
MAXAG is a legitimate value for bmp->db_numag

Fixes: e63866a47556 ("jfs: fix out-of-bounds in dbNextAG() and diAlloc()")
Signed-off-by: Dave Kleikamp <[email protected]>
fs/jfs/jfs_dmap.c

index 974ecf5e0d9522cce2d889c2304afce2e2fbc534..3ab410059dc202a3e50bdbf505b690093ed18631 100644 (file)
@@ -187,7 +187,7 @@ int dbMount(struct inode *ipbmap)
        }
 
        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;
                goto err_release_metapage;
        }
This page took 0.057632 seconds and 4 git commands to generate.