kernel - Fix token ordering in sysctl_kern_proc_args(), sysctl_kern_proc_cwd()
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Nov 2011 16:40:40 +0000 (08:40 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Nov 2011 16:44:26 +0000 (08:44 -0800)
commit46fb7ae4e63e5ef9bf64ef424632fc2b2875db6d
tree4b309062f027809dfcfcb71d8f3497af9c48a230
parent8db21154309d56527dcc822c2cba5ccc2cb28166
kernel - Fix token ordering in sysctl_kern_proc_args(), sysctl_kern_proc_cwd()

* We have to PHOLD() first, then get p->p_token, not the other way around.
  Use pfind() instead of pfindn().

* Extract and ref the the ncdir from p->p_fd before calling cache_fullpath()
  on it to ensure stability.
sys/kern/kern_proc.c