Date: Sat, 17 Jan 2009 22:38:12 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 156305 for review Message-ID: <200901172238.n0HMcCmG046393@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=156305 Change 156305 by rwatson@rwatson_freebsd_capabilities on 2009/01/17 22:38:00 When creating a process descriptor for a process, hook it up so that it can be found later. Assert that a process descriptor is closed before freeing it. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_procdesc.c#2 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_procdesc.c#2 (text+ko) ==== @@ -208,6 +208,7 @@ pd = uma_zalloc(procdesc_zone, M_WAITOK | M_ZERO); pd->pd_proc = p; pd->pd_pid = p->p_pid; + p->p_procdesc = pd; /* * Process descriptors start out with two references: one from their @@ -226,6 +227,8 @@ if (refcount_release(&pd->pd_refcount)) { KASSERT(pd->pd_proc == NULL, ("procdesc_free: pd_proc != NULL")); + KASSERT((pd->pd_flags & PD_CLOSED), + ("procdesc_free: !PD_CLOSED")); uma_zfree(procdesc_zone, pd); }help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901172238.n0HMcCmG046393>
