diff options
author | Dave Kleikamp <dave.kleikamp@oracle.com> | 2024-10-22 17:40:37 +0300 |
---|---|---|
committer | Dave Kleikamp <dave.kleikamp@oracle.com> | 2024-10-22 17:40:37 +0300 |
commit | 67373ca8404fe57eb1bb4b57f314cff77ce54932 (patch) | |
tree | dcae42233b338bb713ec8d9c56a5d0ef5e1a7c25 /fs | |
parent | c2ee9f594da826bea183ed14f2cc029c719bf4da (diff) | |
download | linux-67373ca8404fe57eb1bb4b57f314cff77ce54932.tar.xz |
jfs: Fix sanity check in dbMount
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 <dave.kleikamp@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jfs/jfs_dmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index 974ecf5e0d95..3ab410059dc2 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -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; } |