Date: Thu, 02 Nov 2006 18:32:26 +0800 From: LI Xin <delphij@delphij.net> To: VANHULLEBUS Yvan <vanhu_bsd@zeninc.net> Cc: freebsd-net@freebsd.org Subject: Re: Reentrant problem with inet_ntoa in the kernel Message-ID: <4549C93A.9080308@delphij.net> In-Reply-To: <20061102102807.GA23553@zen.inc> References: <be0088ce0611020026y4fe07749pd5a984f8744769b@mail.gmail.com> <200611021045.09774.max@love2party.net> <4549C63F.20308@delphij.net> <20061102102807.GA23553@zen.inc>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8498446EDAD3F020C0F58570 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable VANHULLEBUS Yvan wrote: > 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. >=20 > Hi. >=20 > 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 don= e. True. That's exactly what I concern about, it just reduced the chance we lose a race, not to eliminate it. Note that the code is similar with what was found in ip6_sprintf, so it got same issue I think. Cheers, --=20 Xin LI <delphij@delphij.net> http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig8498446EDAD3F020C0F58570 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFSck6OfuToMruuMARA3VhAJwPzW/a88m2MS6iNcxM66j4lImNgwCeMn6n d8cqgLBJRJ1gMHFjuYozyQE= =FTA2 -----END PGP SIGNATURE----- --------------enig8498446EDAD3F020C0F58570--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4549C93A.9080308>