Date: Sat, 4 Jun 2011 16:26:02 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/netinet ip_divert.c Message-ID: <201106041626.p54GQPTc057855@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
rwatson 2011-06-04 16:26:02 UTC
FreeBSD src repository
Modified files:
sys/netinet ip_divert.c
Log:
SVN rev 222690 on 2011-06-04 16:26:02Z by rwatson
IP divert sockets use their inpcbinfo for port reservation, although not
for lookup. I missed its call to in_pcbbind() when preparing previous
patches, which would lead to a lock assertion failure (although problem
not an actual race condition due to global pcbinfo locks providing
required synchronisation -- in this particular case only). This change
adds the missing locking of the pcbhash lock.
(Existing comments in the ipdivert code question the need for using the
global hash to manage the namespace, as really it's a simple port
namespace and not an address/port namespace. Also, although in_pcbbind
is used to manage reservations, the hash tables aren't used for lookup.
It might be a good idea to make them use hashed lookup, or to use a
different reservation scheme.)
Reviewed by: bz
Reported by: Kristof Provost <kristof at sigsegv.be>
Sponsored by: Juniper Networks
Revision Changes Path
1.170 +2 -0 src/sys/netinet/ip_divert.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106041626.p54GQPTc057855>
