ipc: sysv shared memory limited to 8TiB
Changes
2 files changed · +2 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| include/linux/ipc_namespace.h | modified | +1 | −1 | View file |
| ipc/shm.c | modified | +1 | −1 | View file |
include/linux/ipc_namespace.h
View filediff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index ae221a7..c4d870b 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()
ipc/shm.c
View filediff --git a/ipc/shm.c b/ipc/shm.c
index cb858df..8247c49 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -462,7 +462,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
size_t size = params->u.size;
int error;
struct shmid_kernel *shp;
- int numpages = (size + PAGE_SIZE -1) >> PAGE_SHIFT;
+ size_t numpages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
struct file * file;
char name[13];
int id;