summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_error.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2016-06-21 11:55:13 +1000
committerDave Chinner <david@fromorbit.com>2016-06-21 11:55:13 +1000
commitf477cedc4e79a3233847106a18bf67be9bdf20e9 (patch)
treec7d0a000c9c2a865bf15322e99db9697f0aa53d7 /fs/xfs/xfs_error.c
parent9b7fad20760b8f47730f0353459dd39a89c415b9 (diff)
parent19b54ee66c4c5de8f8db74d5914d9a97161460bf (diff)
Merge branch 'xfs-4.8-misc-fixes-2' into for-next
Diffstat (limited to 'fs/xfs/xfs_error.c')
-rw-r--r--fs/xfs/xfs_error.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
index 88693a98fac5..355619ae5e3e 100644
--- a/fs/xfs/xfs_error.c
+++ b/fs/xfs/xfs_error.c
@@ -61,6 +61,9 @@ xfs_errortag_add(int error_tag, xfs_mount_t *mp)
int len;
int64_t fsid;
+ if (error_tag >= XFS_ERRTAG_MAX)
+ return -EINVAL;
+
memcpy(&fsid, mp->m_fixedfsid, sizeof(xfs_fsid_t));
for (i = 0; i < XFS_NUM_INJECT_ERROR; i++) {