kernel - Fix panic in sysctl_kern_proc()
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Oct 2013 22:10:50 +0000 (15:10 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Oct 2013 22:10:50 +0000 (15:10 -0700)
commit849425f7e706be67a8ab9b970375d0a9896476bd
treedae5e6515b0e441387ff8929ee95f9bc91d3d684
parentcd6c5b903243a3bd8f99fea391e6ff320f8536b5
kernel - Fix panic in sysctl_kern_proc()

* sysctl_kern_proc() loops through ncpus and moves the thread to each cpu
  in turn in order to access its local thread list.

* Fix a panic where the function does not return on the same cpu it was
  called on.  The userland scheduler expects threads to return to usermode
  on the same cpu they left usermode on and is responsible for moving the
  thread to another cpu (for userland scheduling purposes) itself.
sys/kern/kern_proc.c