Date: Thu, 3 Mar 2005 11:16:22 -0500 From: John Baldwin <jhb@FreeBSD.org> To: Daniel Eischen <deischen@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_sig.c Message-ID: <200503031116.22840.jhb@FreeBSD.org> In-Reply-To: <Pine.GSO.4.43.0503031020180.2058-100000@sea.ntplx.net> References: <Pine.GSO.4.43.0503031020180.2058-100000@sea.ntplx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 03 March 2005 10:21 am, Daniel Eischen wrote: > On Thu, 3 Mar 2005, Scott Long wrote: > > It's not about convenience or taking the easy way out. Let's fix > > sigwait() to have the proper assumptions and go from there. I'm > > inclined to agree with John that the problem is not widespread or > > impossible to track down. Fixing it is not hard either, we already have > > the PHOLD()/PRELE() functions for doing exactly what is needed here. > > Can you add assertions in msleep(), cv_wait(), etc, to > panic if the object is on the kernel stack and the > stack is swappable? Just because you sleep on a stack address doesn't mean that you are going to write to that object when doing a wakeup. However, it might not be a bad idea as stack address can be indicative of bugs like this: foo(void *bar, ...) { msleep(&bar); } rather than doing foo(void *bar, ...) { msleep(bar); } -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503031116.22840.jhb>