aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/shm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 6d16bb6de7d2..f8e10a25ad7d 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -279,7 +279,7 @@ static int newseg (struct ipc_namespace *ns, key_t key, int shmflg, size_t size)
279 if (size < SHMMIN || size > ns->shm_ctlmax) 279 if (size < SHMMIN || size > ns->shm_ctlmax)
280 return -EINVAL; 280 return -EINVAL;
281 281
282 if (ns->shm_tot + numpages >= ns->shm_ctlall) 282 if (ns->shm_tot + numpages > ns->shm_ctlall)
283 return -ENOSPC; 283 return -ENOSPC;
284 284
285 shp = ipc_rcu_alloc(sizeof(*shp)); 285 shp = ipc_rcu_alloc(sizeof(*shp));