mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
thread_signal_add now is called with ps_mtx held, unlock it before
calling copyin.
This commit is contained in:
parent
8f16d45326
commit
b0bd5f38a6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115884
@ -1397,11 +1397,12 @@ thread_signal_add(struct thread *td, int sig)
|
||||
sigset_t ss;
|
||||
int error;
|
||||
|
||||
PROC_LOCK_ASSERT(td->td_proc, MA_OWNED);
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
mtx_assert(&p->p_sigacts->ps_mtx, MA_OWNED);
|
||||
td = curthread;
|
||||
ku = td->td_upcall;
|
||||
p = td->td_proc;
|
||||
|
||||
mtx_unlock(&p->p_sigacts->ps_mtx);
|
||||
PROC_UNLOCK(p);
|
||||
error = copyin(&ku->ku_mailbox->km_sigscaught, &ss, sizeof(sigset_t));
|
||||
if (error)
|
||||
@ -1414,6 +1415,7 @@ thread_signal_add(struct thread *td, int sig)
|
||||
goto error;
|
||||
|
||||
PROC_LOCK(p);
|
||||
mtx_lock(&p->p_sigacts->ps_mtx);
|
||||
return;
|
||||
error:
|
||||
PROC_LOCK(p);
|
||||
|
@ -1397,11 +1397,12 @@ thread_signal_add(struct thread *td, int sig)
|
||||
sigset_t ss;
|
||||
int error;
|
||||
|
||||
PROC_LOCK_ASSERT(td->td_proc, MA_OWNED);
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
mtx_assert(&p->p_sigacts->ps_mtx, MA_OWNED);
|
||||
td = curthread;
|
||||
ku = td->td_upcall;
|
||||
p = td->td_proc;
|
||||
|
||||
mtx_unlock(&p->p_sigacts->ps_mtx);
|
||||
PROC_UNLOCK(p);
|
||||
error = copyin(&ku->ku_mailbox->km_sigscaught, &ss, sizeof(sigset_t));
|
||||
if (error)
|
||||
@ -1414,6 +1415,7 @@ thread_signal_add(struct thread *td, int sig)
|
||||
goto error;
|
||||
|
||||
PROC_LOCK(p);
|
||||
mtx_lock(&p->p_sigacts->ps_mtx);
|
||||
return;
|
||||
error:
|
||||
PROC_LOCK(p);
|
||||
|
Loading…
Reference in New Issue
Block a user