summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobin Holt <holt@sgi.com>2013-04-18 09:49:11 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-04-19 17:33:16 +1000
commit3cbec77addfdd0f09bd0effcb3e97fba8448456b (patch)
tree036b832398cf16e6ad4b2291f2058a894923e856 /include
parent418b00eb2a998ad5ea859dff93a600bfb747b989 (diff)
ipc: sysv shared memory limited to 8TiB
Trying to run an application which was trying to put data into half of memory using shmget(), we found that having a shmall value below 8EiB-8TiB would prevent us from using anything more than 8TiB. By setting kernel.shmall greater than 8EiB-8TiB would make the job work. In the newseg() function, ns->shm_tot which, at 8TiB is INT_MAX. ipc/shm.c: 458 static int newseg(struct ipc_namespace *ns, struct ipc_params *params) 459 { ... 465 int numpages = (size + PAGE_SIZE -1) >> PAGE_SHIFT; ... 474 if (ns->shm_tot + numpages > ns->shm_ctlall) 475 return -ENOSPC; Signed-off-by: Robin Holt <holt@sgi.com> Reported-by: Alex Thorlton <athorlton@sgi.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ipc_namespace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index ae221a7b5092..c4d870b0d5e6 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -43,8 +43,8 @@ struct ipc_namespace {
size_t shm_ctlmax;
size_t shm_ctlall;
+ unsigned long shm_tot;
int shm_ctlmni;
- int shm_tot;
/*
* Defines whether IPC_RMID is forced for _all_ shm segments regardless
* of shmctl()