diff options
author | jhb <jhb@FreeBSD.org> | 2005-10-27 16:47:28 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-10-27 16:47:28 +0000 |
commit | 31b39202701bc7c349b94a958647fc504a1ad9a6 (patch) | |
tree | 08321a9078dbb63fde3d1973b413732023614b72 /share | |
parent | 5e727d7ba41e2e05df29273aeacbbb74564c57fa (diff) | |
download | FreeBSD-src-31b39202701bc7c349b94a958647fc504a1ad9a6.zip FreeBSD-src-31b39202701bc7c349b94a958647fc504a1ad9a6.tar.gz |
Revert most of revision 1.235 and fix the problem a different way. We
can't acquire an sx lock in ttyinfo() because ttyinfo() can be called
from interrupt handlers (such as atkbd_intr()). Instead, go back to
locking the process group while we pick a thread to display information for
and hold that lock until after we drop sched_lock to make sure the
process doesn't exit out from under us. sched_lock ensures that the
specific thread from that process doesn't go away. To protect against
the process exiting after we drop the proc lock but before we dereference
it to lookup the pid and p_comm in the call to ttyprintf(), we now copy
the pid and p_comm to local variables while holding the proc lock.
This problem was found by the recently added TD_NO_SLEEPING assertions for
interrupt handlers.
Tested by: emaste
MFC after: 1 week
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions