aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-10-09 11:52:18 +0200
committerLukas Larsson <[email protected]>2017-10-12 09:51:27 +0200
commit5204e619ecc8394f399c6e40f15639dd379a9b91 (patch)
tree62beb17c0f8161def0a41d8221351fed5f84c6a5 /erts/emulator/beam
parentb4b81a3342af35308e87e34380d870c2464be697 (diff)
downloadotp-5204e619ecc8394f399c6e40f15639dd379a9b91.tar.gz
otp-5204e619ecc8394f399c6e40f15639dd379a9b91.tar.bz2
otp-5204e619ecc8394f399c6e40f15639dd379a9b91.zip
erts: Fix lock order when recv tracing trapped exit signal
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index b72bac00c1..1ce2b5071c 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -13307,9 +13307,9 @@ send_exit_signal(Process *c_p, /* current process if and only
if ((state & ERTS_PSFLG_TRAP_EXIT)
&& (reason != am_kill || (flags & ERTS_XSIG_FLG_IGN_KILL))) {
- /* have to release the status lock in order to send the exit message */
- erts_smp_proc_unlock(rp, *rp_locks & ERTS_PROC_LOCKS_XSIG_SEND);
- *rp_locks &= ~ERTS_PROC_LOCKS_XSIG_SEND;
+ /* have to release the status and trace lock in order to send the exit message */
+ erts_smp_proc_unlock(rp, *rp_locks & (ERTS_PROC_LOCKS_XSIG_SEND|ERTS_PROC_LOCK_TRACE));
+ *rp_locks &= ~(ERTS_PROC_LOCKS_XSIG_SEND|ERTS_PROC_LOCK_TRACE);
if (have_seqtrace(token) && token_update)
seq_trace_update_send(token_update);
if (is_value(exit_tuple))