summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-09-19 16:27:22 +0000
committerglebius <glebius@FreeBSD.org>2005-09-19 16:27:22 +0000
commitc4635301e779fcd396bca3778a7ec13108f56408 (patch)
tree8aaceb0f86a0d54d4f79c2b1b95fb0c1365efa89 /sys/net
parent410dc0fa32f343d3a9e0d54b238eff256e2215a1 (diff)
downloadFreeBSD-src-c4635301e779fcd396bca3778a7ec13108f56408.zip
FreeBSD-src-c4635301e779fcd396bca3778a7ec13108f56408.tar.gz
Drop current rtentry lock before calling rt_getifa(). This fixes a LOR
and a possible recursive use of rtentry mutex. PR: kern/69356 Reviewed by: sam
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/rtsock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index cceeb19..3942561 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -496,10 +496,10 @@ route_output(struct mbuf *m, struct socket *so)
(info.rti_info[RTAX_IFA] != NULL &&
!sa_equal(info.rti_info[RTAX_IFA],
rt->rt_ifa->ifa_addr))) {
- if ((error = rt_getifa(&info)) != 0) {
- RT_UNLOCK(rt);
+ RT_UNLOCK(rt);
+ if ((error = rt_getifa(&info)) != 0)
senderr(error);
- }
+ RT_LOCK(rt);
}
if (info.rti_info[RTAX_GATEWAY] != NULL &&
(error = rt_setgate(rt, rt_key(rt),
OpenPOWER on IntegriCloud