svn commit: r208766 - stable/8/sys/netinet

Robert Watson rwatson at FreeBSD.org
Thu Jun 3 08:55:46 UTC 2010


Author: rwatson
Date: Thu Jun  3 08:55:45 2010
New Revision: 208766
URL: http://svn.freebsd.org/changeset/base/208766

Log:
  Merge r204810 from head to stable/8:
  
    Remove unnecessary locking of divcbinfo lock from div_output(): this has
    not been required since FreeBSD 7.0 when the so_pcb pointer leading to inp
    was guaranteed to be stable when a valid socket reference is held (as it
    is in the output path).
  
    Reviewed by:	bz
    Sponsored by:	Juniper Networks
  
  Approved by:	re (kib)

Modified:
  stable/8/sys/netinet/ip_divert.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/netinet/ip_divert.c
==============================================================================
--- stable/8/sys/netinet/ip_divert.c	Thu Jun  3 03:55:22 2010	(r208765)
+++ stable/8/sys/netinet/ip_divert.c	Thu Jun  3 08:55:45 2010	(r208766)
@@ -392,7 +392,6 @@ div_output(struct socket *so, struct mbu
 		struct inpcb *inp;
 
 		dt->info |= IPFW_IS_DIVERT | IPFW_INFO_OUT;
-		INP_INFO_WLOCK(&V_divcbinfo);
 		inp = sotoinpcb(so);
 		INP_RLOCK(inp);
 		/*
@@ -403,7 +402,6 @@ div_output(struct socket *so, struct mbu
 		     ((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) {
 			error = EINVAL;
 			INP_RUNLOCK(inp);
-			INP_INFO_WUNLOCK(&V_divcbinfo);
 			m_freem(m);
 		} else {
 			/* Convert fields to host order for ip_output() */
@@ -444,7 +442,6 @@ div_output(struct socket *so, struct mbu
 					error = ENOBUFS;
 			}
 			INP_RUNLOCK(inp);
-			INP_INFO_WUNLOCK(&V_divcbinfo);
 			if (error == ENOBUFS) {
 				m_freem(m);
 				return (error);


More information about the svn-src-stable-8 mailing list