summaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index df98de290475..e803abec2b08 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -913,10 +913,7 @@ static int semctl_down(struct ipc_namespace *ns, int semid,
freeary(ns, ipcp);
goto out_up;
case IPC_SET:
- ipcp->uid = semid64.sem_perm.uid;
- ipcp->gid = semid64.sem_perm.gid;
- ipcp->mode = (ipcp->mode & ~S_IRWXUGO)
- | (semid64.sem_perm.mode & S_IRWXUGO);
+ ipc_update_perm(&semid64.sem_perm, ipcp);
sma->sem_ctime = get_seconds();
break;
default: