Date: Fri, 8 Sep 2000 14:23:23 -0700 From: Alfred Perlstein <bright@wintelcom.net> To: wollman@freebsd.org Cc: net@freebsd.org Subject: Your comment re so_gencnt Message-ID: <20000908142322.I12231@fw.wintelcom.net>
next in thread | raw e-mail | index | archive | help
this is from uipc_socket.c:
if (so) {
/* XXX race condition for reentrant kernel */
bzero(so, sizeof *so);
so->so_gencnt = ++so_gencnt;
so->so_zone = socket_zone;
TAILQ_INIT(&so->so_aiojobq);
}
Is the race condition on the ++so_gencnt? I'm not sure I follow
what's wrong here, so_gencnt doesn't seem to be used anywhere but
during allocation and freeing of sockets (and when copied to
xsockets)
I think the only fix it needs is an atomic_inc of the so_gencnt,
correct?
Can you explain?
--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000908142322.I12231>
