projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'xtensa-20240117' of https://github.com/jcmvbkbc/linux-xtensa
[linux-block.git]
/
fs
/
jfs
/
jfs_imap.c
diff --git
a/fs/jfs/jfs_imap.c
b/fs/jfs/jfs_imap.c
index a037ee59e39854f662ddfdc03a51d7f0f96a07f6..2ec35889ad24ed03234798bc8fbce1164a0b4a92 100644
(file)
--- a/
fs/jfs/jfs_imap.c
+++ b/
fs/jfs/jfs_imap.c
@@
-2179,6
+2179,9
@@
static int diNewExt(struct inomap * imap, struct iag * iagp, int extno)
/* get the ag and iag numbers for this iag.
*/
agno = BLKTOAG(le64_to_cpu(iagp->agstart), sbi);
+ if (agno >= MAXAG || agno < 0)
+ return -EIO;
+
iagno = le32_to_cpu(iagp->iagnum);
/* check if this is the last free extent within the