diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-02-09 11:17:20 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-02-09 11:17:20 +0000 |
commit | 1980a967fe3944f05fb4ca4aaa60da212f5890d3 (patch) | |
tree | c1fb66459ea9baf551948762f92d0e8b23fc1fc7 /sys/kern/kern_acct.c | |
parent | 307f671e8706fc3004c9e481d613672d61e5655f (diff) |
Fix the lock order reversal problem in the code that stops traced
multi-threaded processes when they receive a signal:
1. Make the parent of the process (the tracer) wait for all threads to be
stopped (in wait4(2)) instead of the thread that received the signal.
This prevents us from calling tsleep(9) recursively.
2. Assume that we already hold the kernel lock if the P_SINTR flag is set
(just like we already assumed we were holding the scheduler lock) and
don't try to grab it again.
This should fix the panic that many people reported when debugging
multi-threaded programs with gdb(1).
ok & lots of help from guenther@
Diffstat (limited to 'sys/kern/kern_acct.c')
0 files changed, 0 insertions, 0 deletions