summaryrefslogtreecommitdiff
path: root/ipc/shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 5e296b04bd6..20e03dfc6ad 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -656,10 +656,7 @@ static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd,
do_shm_rmid(ns, ipcp);
goto out_up;
case IPC_SET:
- ipcp->uid = shmid64.shm_perm.uid;
- ipcp->gid = shmid64.shm_perm.gid;
- ipcp->mode = (ipcp->mode & ~S_IRWXUGO)
- | (shmid64.shm_perm.mode & S_IRWXUGO);
+ ipc_update_perm(&shmid64.shm_perm, ipcp);
shp->shm_ctim = get_seconds();
break;
default: