summaryrefslogtreecommitdiff
path: root/ipc/sem.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2022-03-23 09:59:26 +0100
committerJiri Kosina <jkosina@suse.cz>2022-03-23 09:59:26 +0100
commit412370414c3c7cfe504e2af1d8c98d7a912e6c9a (patch)
tree0387b3a65ee385f18a0705f6db59f9768d413336 /ipc/sem.c
parentb690490d6d466972ade172ee2e7f6ffa49e7e910 (diff)
parented9f4f961260de51ed76d903e86b35ee8ce8eeb3 (diff)
Merge branch 'for-5.18/apple' into for-linus
- Apple magic keyboard support improvements for newer models (José Expósito) - Apple T2 Macs support improvements (Aun-Ali Zaidi, Paul Pawlowski)
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 6693daf4fe11..0dbdb98fdf2d 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1964,6 +1964,7 @@ static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)
*/
un = lookup_undo(ulp, semid);
if (un) {
+ spin_unlock(&ulp->lock);
kvfree(new);
goto success;
}
@@ -1976,9 +1977,8 @@ static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)
ipc_assert_locked_object(&sma->sem_perm);
list_add(&new->list_id, &sma->list_id);
un = new;
-
-success:
spin_unlock(&ulp->lock);
+success:
sem_unlock(sma, -1);
out:
return un;