Message ID | 20220204175706.AA326C340E9@smtp.kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | None | expand |
--- a/ipc/sem.c~ipc-sem-do-not-sleep-with-a-spin-lock-held +++ a/ipc/sem.c @@ -1964,6 +1964,7 @@ static struct sem_undo *find_alloc_undo( */ 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( 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;