[PATCH 0/3] fix up some recent proc fallout and more

Mateusz Guzik mjguzik at gmail.com
Sat Mar 21 01:00:45 UTC 2015

From: Mateusz Guzik <mjg at freebsd.org>

Patches in this series fix a bug introduced in r280130 and deal with
additional issues.

I'm not happy with how sutff is being done at the moment. In particular
we zero out various fields on process exit, which puts it into a state
state which is not guaranteed when we deal when it is first allocated.
But I guess we can leave it as it is for now.

I don't believe we have a good solution at the moment which would poison
memory returned by uma_zalloc, that would definitely make the issue
apparent right of the bat. Adding such a feature sould be reasonably
simple but fallout may take some time to deal with, I'll make a follow
up thread.

Mateusz Guzik (3):
  fork: assign refed credentials earlier
  cred: add proc_set_cred_init helper
  proc: use MTX_NEW flag in proc_init

 sys/kern/init_main.c |  2 +-
 sys/kern/kern_fork.c | 15 +++++++--------
 sys/kern/kern_proc.c | 11 +++++------
 sys/kern/kern_prot.c | 16 ++++++++++++++--
 sys/sys/ucred.h      |  1 +
 5 files changed, 28 insertions(+), 17 deletions(-)


More information about the freebsd-current mailing list