aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorRobin Holt2013-04-30 21:15:54 -0500
committerGreg Kroah-Hartman2013-05-07 22:08:23 -0500
commit870ef91261887958df8b91a14386bd9fc4485325 (patch)
treee1ef9ba3e75842d7d75d65698b7d28b37dd76d23 /ipc
parent8aba4976abb99ae093cc8d74976164be487a93a5 (diff)
downloadkernel-audio-870ef91261887958df8b91a14386bd9fc4485325.tar.gz
kernel-audio-870ef91261887958df8b91a14386bd9fc4485325.tar.xz
kernel-audio-870ef91261887958df8b91a14386bd9fc4485325.zip
ipc: sysv shared memory limited to 8TiB
commit d69f3bad4675ac519d41ca2b11e1c00ca115cecd upstream. 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; [akpm@linux-foundation.org: make ipc/shm.c:newseg()'s numpages size_t, not int] Signed-off-by: Robin Holt <holt@sgi.com> Reported-by: Alex Thorlton <athorlton@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 4fa6d8fee730..9bab6503b527 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -462,7 +462,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
462 size_t size = params->u.size; 462 size_t size = params->u.size;
463 int error; 463 int error;
464 struct shmid_kernel *shp; 464 struct shmid_kernel *shp;
465 int numpages = (size + PAGE_SIZE -1) >> PAGE_SHIFT; 465 size_t numpages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
466 struct file * file; 466 struct file * file;
467 char name[13]; 467 char name[13];
468 int id; 468 int id;