Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2009 12:57:10 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r199365 - head/sys/net
Message-ID:  <200911171257.nAHCvAEH007588@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Tue Nov 17 12:57:10 2009
New Revision: 199365
URL: http://svn.freebsd.org/changeset/base/199365

Log:
  Fix a LOR showing up with sctp_bsd_addr(): Do not hold a rt lock
  when calling rt_newaddrmsg().
  
  Reviewed by: qingli
  Approved by: rrs (mentor)
  MFC after: 1 month

Modified:
  head/sys/net/route.c

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c	Tue Nov 17 12:42:27 2009	(r199364)
+++ head/sys/net/route.c	Tue Nov 17 12:57:10 2009	(r199365)
@@ -1497,7 +1497,11 @@ rtinit1(struct ifaddr *ifa, int cmd, int
 			    ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index =
 				rt->rt_ifp->if_index;
 			}
+			RT_ADDREF(rt);
+			RT_UNLOCK(rt);
 			rt_newaddrmsg(cmd, ifa, error, rt);
+			RT_LOCK(rt);
+			RT_REMREF(rt);
 			if (cmd == RTM_DELETE) {
 				/*
 				 * If we are deleting, and we found an entry,



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