X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=ipc%2Fshm.c;h=f8e10a25ad7d9ece3f9e409eb3859ba282faed73;hb=579c84a9b225d8b9d0f32818b9959ca63b4fb57d;hp=6d16bb6de7d296889b015b8ab6c8d480d2c14aa4;hpb=9cdf083f981b8d37b3212400a359368661385099;p=linux-2.6-omap-h63xx.git diff --git a/ipc/shm.c b/ipc/shm.c index 6d16bb6de7d..f8e10a25ad7 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) if (size < SHMMIN || size > ns->shm_ctlmax) return -EINVAL; - if (ns->shm_tot + numpages >= ns->shm_ctlall) + if (ns->shm_tot + numpages > ns->shm_ctlall) return -ENOSPC; shp = ipc_rcu_alloc(sizeof(*shp));