summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-04-21 12:08:40 +0000
committerrwatson <rwatson@FreeBSD.org>2008-04-21 12:08:40 +0000
commita1fcc01258518380b51309402dd662079b3b88c6 (patch)
tree4cdda44311bf912b855c453ffae3e058ee0edb9d /sys
parent9ee84cddef0af6abc4d9dfc1cd142a36175a4e6a (diff)
downloadFreeBSD-src-a1fcc01258518380b51309402dd662079b3b88c6.zip
FreeBSD-src-a1fcc01258518380b51309402dd662079b3b88c6.tar.gz
In ICMPv6, read lock rather than write lock the inpcb on receive.
MFC after: 3 months
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/icmp6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 7039edd..d3c8315 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1891,10 +1891,10 @@ icmp6_rip6_input(struct mbuf **mp, int off)
INP_INFO_RLOCK(&ripcbinfo);
LIST_FOREACH(in6p, &ripcb, inp_list) {
- INP_WLOCK(in6p);
+ INP_RLOCK(in6p);
if ((in6p->inp_vflag & INP_IPV6) == 0) {
docontinue:
- INP_WUNLOCK(in6p);
+ INP_RUNLOCK(in6p);
continue;
}
if (in6p->in6p_ip6_nxt != IPPROTO_ICMPV6)
@@ -1965,7 +1965,7 @@ icmp6_rip6_input(struct mbuf **mp, int off)
sorwakeup_locked(last->in6p_socket);
opts = NULL;
}
- INP_WUNLOCK(last);
+ INP_RUNLOCK(last);
}
last = in6p;
}
@@ -2003,7 +2003,7 @@ icmp6_rip6_input(struct mbuf **mp, int off)
SOCKBUF_UNLOCK(&last->in6p_socket->so_rcv);
} else
sorwakeup_locked(last->in6p_socket);
- INP_WUNLOCK(last);
+ INP_RUNLOCK(last);
} else {
m_freem(m);
ip6stat.ip6s_delivered--;
OpenPOWER on IntegriCloud