Reentrant problem with inet_ntoa in the kernel
VANHULLEBUS Yvan
vanhu_bsd at zeninc.net
Thu Nov 2 10:28:10 UTC 2006
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
More information about the freebsd-net
mailing list