kernel - Improve uidinfo
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 2 Nov 2017 00:47:48 +0000 (17:47 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 2 Nov 2017 00:50:07 +0000 (17:50 -0700)
commitb3c6f0e59d1bfeab398d54dba4b85d576523ce8d
tree2b42b32dc3508726b63067dcc50cf23eda0c4c07
parent641f3b0ac8f54c6715024ca7b8dd7eb3ebbf651d
kernel - Improve uidinfo

* Improve uifind() to check td_cred for likely uid's, avoiding all
  locking on hits.

* Create proc0 cred's cr_uidinfo and cr_ruidinfo using uicreate().
  All creds should now never have a NULL cr_uidinfo or cr_ruidinfo,
  so also remove conditionals that test for NULL.

Suggested-by: __mjg
sys/kern/init_main.c
sys/kern/kern_lock.c
sys/kern/kern_prot.c
sys/kern/kern_resource.c
sys/sys/resourcevar.h