aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/sem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index a37aaeb02561..178f303deea5 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -2123,9 +2123,11 @@ void exit_sem(struct task_struct *tsk)
2123 ipc_assert_locked_object(&sma->sem_perm); 2123 ipc_assert_locked_object(&sma->sem_perm);
2124 list_del(&un->list_id); 2124 list_del(&un->list_id);
2125 2125
2126 spin_lock(&ulp->lock); 2126 /* we are the last process using this ulp, acquiring ulp->lock
2127 * isn't required. Besides that, we are also protected against
2128 * IPC_RMID as we hold sma->sem_perm lock now
2129 */
2127 list_del_rcu(&un->list_proc); 2130 list_del_rcu(&un->list_proc);
2128 spin_unlock(&ulp->lock);
2129 2131
2130 /* perform adjustments registered in un */ 2132 /* perform adjustments registered in un */
2131 for (i = 0; i < sma->sem_nsems; i++) { 2133 for (i = 0; i < sma->sem_nsems; i++) {