summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-08-31 13:16:45 +0000
committerrwatson <rwatson@FreeBSD.org>2008-08-31 13:16:45 +0000
commit2d23f13f7f4cdaadb7247c2f0597e503d6035508 (patch)
tree31d76d037333cdadfae01cf366386c8640ac42c2 /sys/netinet6
parent59f71b4d7123118072e12e5a4d01a26cb50738a7 (diff)
downloadFreeBSD-src-2d23f13f7f4cdaadb7247c2f0597e503d6035508.zip
FreeBSD-src-2d23f13f7f4cdaadb7247c2f0597e503d6035508.tar.gz
In UDPv6, reduce scope of global udbinfo lock during append to last
matching socket by dropping it before udp6_append(), and remove duplicate unlocks of udbinfo and inpcb in sysctl return path. MFC after: 3 days
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/udp6_usrreq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index f593e6f..fa943d5 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -308,9 +308,9 @@ udp6_input(struct mbuf **mp, int *offp, int proto)
goto badheadlocked;
}
INP_RLOCK(last);
+ INP_INFO_RUNLOCK(&V_udbinfo);
udp6_append(last, m, off, &fromsa);
INP_RUNLOCK(last);
- INP_INFO_RUNLOCK(&V_udbinfo);
return (IPPROTO_DONE);
}
/*
@@ -465,8 +465,6 @@ udp6_getcred(SYSCTL_HANDLER_ARGS)
INP_INFO_RUNLOCK(&V_udbinfo);
error = ENOENT;
}
- INP_RUNLOCK(inp);
- INP_INFO_RUNLOCK(&V_udbinfo);
if (error == 0)
error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
return (error);
OpenPOWER on IntegriCloud