Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Sep 2010 13:10:46 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r212291 - stable/8/sys/netinet
Message-ID:  <201009071310.o87DAk66099619@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Tue Sep  7 13:10:46 2010
New Revision: 212291
URL: http://svn.freebsd.org/changeset/base/212291

Log:
  MFC r212209:
  
    In case of RADIX_MPATH do not leak the IN_IFADDR read lock on
    early return.

Modified:
  stable/8/sys/netinet/in.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)

Modified: stable/8/sys/netinet/in.c
==============================================================================
--- stable/8/sys/netinet/in.c	Tue Sep  7 12:06:41 2010	(r212290)
+++ stable/8/sys/netinet/in.c	Tue Sep  7 13:10:46 2010	(r212291)
@@ -1042,9 +1042,10 @@ in_addprefix(struct in_ifaddr *target, i
 		if (ia->ia_flags & IFA_ROUTE) {
 #ifdef RADIX_MPATH
 			if (ia->ia_addr.sin_addr.s_addr == 
-			    target->ia_addr.sin_addr.s_addr)
+			    target->ia_addr.sin_addr.s_addr) {
+				IN_IFADDR_RUNLOCK();
 				return (EEXIST);
-			else
+			} else
 				break;
 #endif
 			if (V_sameprefixcarponly &&



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