summaryrefslogtreecommitdiffstats
path: root/sys/fs/umapfs/umap_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/umapfs/umap_vfsops.c')
-rw-r--r--sys/fs/umapfs/umap_vfsops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c
index 6e01f3d..116ce16 100644
--- a/sys/fs/umapfs/umap_vfsops.c
+++ b/sys/fs/umapfs/umap_vfsops.c
@@ -167,6 +167,12 @@ umapfs_mount(mp, path, data, ndp, p)
/*
* Now copy in the number of entries and maps for umap mapping.
*/
+ if (args.nentries > MAPFILEENTRIES || args.gnentries >
+ GMAPFILEENTRIES) {
+ vput(lowerrootvp);
+ return (error);
+ }
+
amp->info_nentries = args.nentries;
amp->info_gnentries = args.gnentries;
error = copyin(args.mapdata, (caddr_t)amp->info_mapdata,
OpenPOWER on IntegriCloud