We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 314c459 commit 520ba72Copy full SHA for 520ba72
ipc/sem.c
@@ -1964,6 +1964,7 @@ static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)
1964
*/
1965
un = lookup_undo(ulp, semid);
1966
if (un) {
1967
+ spin_unlock(&ulp->lock);
1968
kvfree(new);
1969
goto success;
1970
}
@@ -1976,9 +1977,8 @@ static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)
1976
1977
ipc_assert_locked_object(&sma->sem_perm);
1978
list_add(&new->list_id, &sma->list_id);
1979
un = new;
-
1980
-success:
1981
spin_unlock(&ulp->lock);
+success:
1982
sem_unlock(sma, -1);
1983
out:
1984
return un;
0 commit comments