diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-03-01 17:47:19 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-03-01 17:47:19 +0100 |
commit | 6e110580bc1ab84d02509750ce09277914174c6a (patch) | |
tree | 087a50424b051ac9c2077a9e1b3b242324e89b03 | |
parent | Merge tag 'exfat-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | fs/jfs: fix shift exponent db_agl2size negative (diff) | |
download | linux-6e110580bc1ab84d02509750ce09277914174c6a.tar.xz linux-6e110580bc1ab84d02509750ce09277914174c6a.zip |
Merge tag 'jfs-6.3' of https://github.com/kleikamp/linux-shaggy
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
-rw-r--r-- | fs/jfs/jfs_dmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index 765838578a72..a3eb1e826947 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -193,7 +193,8 @@ int dbMount(struct inode *ipbmap) bmp->db_agwidth = le32_to_cpu(dbmp_le->dn_agwidth); bmp->db_agstart = le32_to_cpu(dbmp_le->dn_agstart); bmp->db_agl2size = le32_to_cpu(dbmp_le->dn_agl2size); - if (bmp->db_agl2size > L2MAXL2SIZE - L2MAXAG) { + if (bmp->db_agl2size > L2MAXL2SIZE - L2MAXAG || + bmp->db_agl2size < 0) { err = -EINVAL; goto err_release_metapage; } |