svn commit: r229714 - head/sys/netinet

Navdeep Parhar np at FreeBSD.org
Fri Jan 6 18:29:41 UTC 2012


Author: np
Date: Fri Jan  6 18:29:40 2012
New Revision: 229714
URL: http://svn.freebsd.org/changeset/base/229714

Log:
  Always release the inp lock before returning from tcp_detach.
  
  MFC after:	5 days

Modified:
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/netinet/tcp_usrreq.c
==============================================================================
--- head/sys/netinet/tcp_usrreq.c	Fri Jan  6 18:18:25 2012	(r229713)
+++ head/sys/netinet/tcp_usrreq.c	Fri Jan  6 18:29:40 2012	(r229714)
@@ -204,8 +204,10 @@ tcp_detach(struct socket *so, struct inp
 			tcp_discardcb(tp);
 			in_pcbdetach(inp);
 			in_pcbfree(inp);
-		} else
+		} else {
 			in_pcbdetach(inp);
+			INP_WUNLOCK(inp);
+		}
 	}
 }
 


More information about the svn-src-all mailing list