summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-10-27 16:47:28 +0000
committerjhb <jhb@FreeBSD.org>2005-10-27 16:47:28 +0000
commit31b39202701bc7c349b94a958647fc504a1ad9a6 (patch)
tree08321a9078dbb63fde3d1973b413732023614b72 /share
parent5e727d7ba41e2e05df29273aeacbbb74564c57fa (diff)
downloadFreeBSD-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
OpenPOWER on IntegriCloud