Date: Mon, 13 Jan 2003 15:12:11 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: hackers@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: RE: possible cpu_wait() / vm_waitproc() / MAC problem Message-ID: <XFMail.20030113151211.jhb@FreeBSD.org> In-Reply-To: <200301132010.h0DKAawp030883@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 13-Jan-2003 Matthew Dillon wrote: > >: >: >:On 12-Jan-2003 Matthew Dillon wrote: >:> While working on an MFC I noticed that sys/compat/svr4/svr4_misc.c >:> (in CURRENT) is calling cpu_wait() in svr4_sys_waitsys() instead of >:> vm_waitproc(). I believe it needs to call vm_waitproc(). Can anyone >:> say for sure? >:> >:> Also, in kern/kern_exit.c the wait code has this: >:> >:>#ifdef MAC >:> mac_destroy_proc(p) >:>#endif >:> >:> This appears to be missing from svr4_sys_waitsys() as well, also >:> in -current. Could someone confirm that? >: >:The svr4() wait code is just gross. We need to make it just pass a flag >:into wait1() IMO and have the svr4() implementation be a wrapper function. >: >:-- >: >:John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ >:"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ > > Well, I would prefer to just fix the bug(s) for now, unless someone else > wants to have a go at merging it. I have major work on vmapbuf() and > friends that I need to do that I don't want to delay it too much longer. *nod* I've been meaning to merge the darn thing for a while now. > Does this patch look good? Sure. > -Matt > Matthew Dillon > <dillon@backplane.com> > > Index: compat/svr4/svr4_misc.c > =================================================================== > RCS file: /home/ncvs/src/sys/compat/svr4/svr4_misc.c,v > retrieving revision 1.56 > diff -u -r1.56 svr4_misc.c > --- compat/svr4/svr4_misc.c 13 Jan 2003 00:28:57 -0000 1.56 > +++ compat/svr4/svr4_misc.c 13 Jan 2003 20:09:38 -0000 > @@ -1377,12 +1377,15 @@ > * to free anything that cpu_exit couldn't > * release while still running in process context. > */ > - cpu_wait(q); > + vm_waitproc(q); > #if defined(__NetBSD__) > pool_put(&proc_pool, q); > #endif > #ifdef __FreeBSD__ > mtx_destroy(&q->p_mtx); > +#ifdef MAC > + mac_destroy_proc(q); > +#endif > uma_zfree(proc_zone, q); > #endif > nprocs--; -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030113151211.jhb>