Date: Thu, 2 Nov 2006 11:28:07 +0100 From: VANHULLEBUS Yvan <vanhu_bsd@zeninc.net> To: freebsd-net@freebsd.org Subject: Re: Reentrant problem with inet_ntoa in the kernel Message-ID: <20061102102807.GA23553@zen.inc> In-Reply-To: <4549C63F.20308@delphij.net> References: <be0088ce0611020026y4fe07749pd5a984f8744769b@mail.gmail.com> <200611021045.09774.max@love2party.net> <4549C63F.20308@delphij.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 02, 2006 at 06:19:43PM +0800, LI Xin wrote: [.....] > Sounds like a workaround to me and in theory that is insufficient for a > MPSAFE protection. Here is a patch which reduces the chance where we > get a race. Hi. This patch will allow multiple calls to inet_ntoa int the same function (like printf(....., inet_ntoa(a), inet_ntoa(b))), but won't really solve the race condition if inet_ntoa is called from 2 differents functions at the same time: at least the round should be locked to reduce potential problems, and you're still not sure that no more than 8 "simultaneous" (or at least close enough) calls will be done. Yvan. -- NETASQ http://www.netasq.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061102102807.GA23553>