summaryrefslogtreecommitdiffstats
path: root/sys/net/route.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2009-11-17 12:57:10 +0000
committertuexen <tuexen@FreeBSD.org>2009-11-17 12:57:10 +0000
commit7b17948ff81f32804060344b86346468f2216538 (patch)
tree6e5ef1dcc1c9feaab96b0987518b8cbb140ff821 /sys/net/route.c
parent2d08f816e13d4eca3a96eb24f578541791a335e7 (diff)
downloadFreeBSD-src-7b17948ff81f32804060344b86346468f2216538.zip
FreeBSD-src-7b17948ff81f32804060344b86346468f2216538.tar.gz
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
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 2fc53af..2087538 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1497,7 +1497,11 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum)
((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,
OpenPOWER on IntegriCloud