summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet6/udp6_usrreq.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index 0e523c5..9c6517d 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -498,12 +498,17 @@ udp6_abort(struct socket *so)
struct inpcb *inp;
int s;
+ INP_INFO_WLOCK(&udbinfo);
inp = sotoinpcb(so);
- if (inp == 0)
+ if (inp == 0) {
+ INP_INFO_WUNLOCK(&udbinfo);
return EINVAL; /* ??? possible? panic instead? */
+ }
soisdisconnected(so);
s = splnet();
+ INP_LOCK(inp);
in6_pcbdetach(inp);
+ INP_INFO_WUNLOCK(&udbinfo);
splx(s);
return 0;
}
OpenPOWER on IntegriCloud