svn commit: r190369 - stable/6/sys/netinet

David E. O'Brien obrien at FreeBSD.org
Tue Mar 24 03:15:38 PDT 2009


Author: obrien
Date: Tue Mar 24 10:15:35 2009
New Revision: 190369
URL: http://svn.freebsd.org/changeset/base/190369

Log:
  Follow the lead of r164728 and grab the pcbinfo lock for some additional
  dereferences of so_pcb.
  
  Reviewed by:	rwatson

Modified:
  stable/6/sys/netinet/ip_output.c

Modified: stable/6/sys/netinet/ip_output.c
==============================================================================
--- stable/6/sys/netinet/ip_output.c	Tue Mar 24 05:05:53 2009	(r190368)
+++ stable/6/sys/netinet/ip_output.c	Tue Mar 24 10:15:35 2009	(r190369)
@@ -1322,6 +1322,7 @@ ip_ctloutput_pcbinfo(so, sopt, pcbinfo)
 
 			INP_INFO_WLOCK(pcbinfo);
 			if (so->so_pcb == NULL) {
+				INP_INFO_WUNLOCK(pcbinfo);
 				error = EINVAL;
 				break;
 			}
@@ -1368,7 +1369,9 @@ ip_ctloutput_pcbinfo(so, sopt, pcbinfo)
 			req = mtod(m, caddr_t);
 			len = m->m_len;
 			optname = sopt->sopt_name;
+			INP_INFO_WLOCK(pcbinfo);
 			if (so->so_pcb == NULL) {
+				INP_INFO_WUNLOCK(pcbinfo);
 				m_free(m);
 				error = EINVAL;
 				break;


More information about the svn-src-all mailing list