aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 5215a81420df..58d31f1c1eb5 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1104,7 +1104,9 @@ static int semctl_down(struct ipc_namespace *ns, int semid,
1104 freeary(ns, ipcp); 1104 freeary(ns, ipcp);
1105 goto out_up; 1105 goto out_up;
1106 case IPC_SET: 1106 case IPC_SET:
1107 ipc_update_perm(&semid64.sem_perm, ipcp); 1107 err = ipc_update_perm(&semid64.sem_perm, ipcp);
1108 if (err)
1109 goto out_unlock;
1108 sma->sem_ctime = get_seconds(); 1110 sma->sem_ctime = get_seconds();
1109 break; 1111 break;
1110 default: 1112 default:
@@ -1677,6 +1679,7 @@ void exit_sem(struct task_struct *tsk)
1677#ifdef CONFIG_PROC_FS 1679#ifdef CONFIG_PROC_FS
1678static int sysvipc_sem_proc_show(struct seq_file *s, void *it) 1680static int sysvipc_sem_proc_show(struct seq_file *s, void *it)
1679{ 1681{
1682 struct user_namespace *user_ns = seq_user_ns(s);
1680 struct sem_array *sma = it; 1683 struct sem_array *sma = it;
1681 1684
1682 return seq_printf(s, 1685 return seq_printf(s,
@@ -1685,10 +1688,10 @@ static int sysvipc_sem_proc_show(struct seq_file *s, void *it)
1685 sma->sem_perm.id, 1688 sma->sem_perm.id,
1686 sma->sem_perm.mode, 1689 sma->sem_perm.mode,
1687 sma->sem_nsems, 1690 sma->sem_nsems,
1688 sma->sem_perm.uid, 1691 from_kuid_munged(user_ns, sma->sem_perm.uid),
1689 sma->sem_perm.gid, 1692 from_kgid_munged(user_ns, sma->sem_perm.gid),
1690 sma->sem_perm.cuid, 1693 from_kuid_munged(user_ns, sma->sem_perm.cuid),
1691 sma->sem_perm.cgid, 1694 from_kgid_munged(user_ns, sma->sem_perm.cgid),
1692 sma->sem_otime, 1695 sma->sem_otime,
1693 sma->sem_ctime); 1696 sma->sem_ctime);
1694} 1697}