summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_divert.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-06-11 04:06:51 +0000
committerrwatson <rwatson@FreeBSD.org>2004-06-11 04:06:51 +0000
commite7bc2202da72b1779072cfe101cbbed29280a78c (patch)
treed9fb99e58198d9453ebefa5ebed1371b151908ab /sys/netinet/ip_divert.c
parent54cb112a38a1a061e29f91e15d708741944ce969 (diff)
downloadFreeBSD-src-e7bc2202da72b1779072cfe101cbbed29280a78c.zip
FreeBSD-src-e7bc2202da72b1779072cfe101cbbed29280a78c.tar.gz
Remove unneeded Giant acquisition in divert_packet(), which is
left over from debug.mpsafenet affecting only the forwarding plane. Giant is now acquired in the ithread/netisr or in the system call code.
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r--sys/netinet/ip_divert.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 1baf68d..ccf0d96 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -219,20 +219,6 @@ divert_packet(struct mbuf *m, int incoming)
sizeof(divsrc.sin_zero));
}
- /*
- * XXX sbappendaddr must be protected by Giant until
- * we have locking at the socket layer. When entered
- * from below we come in w/o Giant and must take it
- * here. Unfortunately we cannot tell whether we're
- * entering from above (already holding Giant),
- * below (potentially without Giant), or otherwise
- * (e.g. from tcp_syncache through a timeout) so we
- * have to grab it regardless. This causes a LOR with
- * the tcp lock, at least, and possibly others. For
- * the moment we're ignoring this. Once sockets are
- * locked this cruft can be removed.
- */
- mtx_lock(&Giant);
/* Put packet on socket queue, if any */
sa = NULL;
nport = htons((u_int16_t)divert_info(mtag));
@@ -254,7 +240,6 @@ divert_packet(struct mbuf *m, int incoming)
INP_UNLOCK(inp);
}
INP_INFO_RUNLOCK(&divcbinfo);
- mtx_unlock(&Giant);
if (sa == NULL) {
m_freem(m);
ipstat.ips_noproto++;
OpenPOWER on IntegriCloud