aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/sem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index f2151babd26a..899b598b63be 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -948,8 +948,8 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,
948 948
949 memset(&tbuf, 0, sizeof(tbuf)); 949 memset(&tbuf, 0, sizeof(tbuf));
950 950
951 rcu_read_lock();
951 if (cmd == SEM_STAT) { 952 if (cmd == SEM_STAT) {
952 rcu_read_lock();
953 sma = sem_obtain_object(ns, semid); 953 sma = sem_obtain_object(ns, semid);
954 if (IS_ERR(sma)) { 954 if (IS_ERR(sma)) {
955 err = PTR_ERR(sma); 955 err = PTR_ERR(sma);
@@ -957,7 +957,6 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,
957 } 957 }
958 id = sma->sem_perm.id; 958 id = sma->sem_perm.id;
959 } else { 959 } else {
960 rcu_read_lock();
961 sma = sem_obtain_object_check(ns, semid); 960 sma = sem_obtain_object_check(ns, semid);
962 if (IS_ERR(sma)) { 961 if (IS_ERR(sma)) {
963 err = PTR_ERR(sma); 962 err = PTR_ERR(sma);