Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2009 10:15:36 +0000 (UTC)
From:      "David E. O'Brien" <obrien@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
Subject:   svn commit: r190369 - stable/6/sys/netinet
Message-ID:  <200903241015.n2OAFaWu039704@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903241015.n2OAFaWu039704>