From 4e397bc5248408c7fa6aba7431d6c70b58183a7b Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Fri, 18 Jun 2004 20:22:21 +0000 Subject: [PATCH] In tcp_ctloutput(), don't hold the inpcb lock over a call to ip_ctloutput(), as it may need to perform blocking memory allocations. This also improves consistency with locking relative to other points that call into ip_ctloutput(). Bumped into by: Grover Lines --- sys/netinet/tcp_usrreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index fa959202023..e5b57dab066 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1037,13 +1037,13 @@ tcp_ctloutput(so, sopt) INP_LOCK(inp); INP_INFO_RUNLOCK(&tcbinfo); if (sopt->sopt_level != IPPROTO_TCP) { + INP_UNLOCK(inp); #ifdef INET6 if (INP_CHECK_SOCKAF(so, AF_INET6)) error = ip6_ctloutput(so, sopt); else #endif /* INET6 */ error = ip_ctloutput(so, sopt); - INP_UNLOCK(inp); splx(s); return (error); }