diff options
Diffstat (limited to 'ipc/shm.c')
-rw-r--r-- | ipc/shm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipc/shm.c b/ipc/shm.c index bd652755d32c..7acda23430aa 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -601,6 +601,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) shp->shm_file = file; shp->shm_creator = current; + /* ipc_addid() locks shp upon success. */ error = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni); if (error < 0) goto no_id; @@ -1194,10 +1195,10 @@ static int copy_compat_shmid_from_user(struct shmid64_ds *out, void __user *buf, { memset(out, 0, sizeof(*out)); if (version == IPC_64) { - struct compat_shmid64_ds *p = buf; + struct compat_shmid64_ds __user *p = buf; return get_compat_ipc64_perm(&out->shm_perm, &p->shm_perm); } else { - struct compat_shmid_ds *p = buf; + struct compat_shmid_ds __user *p = buf; return get_compat_ipc_perm(&out->shm_perm, &p->shm_perm); } } |