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 <grover@ceribus.net>
This commit is contained in:
Robert Watson 2004-06-18 20:22:21 +00:00
parent 8e1b797456
commit 4e397bc524
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130701

View file

@ -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);
}