From 3ac5936ae2d8a943a85870924dded1c08cbf2aed Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 29 Oct 2003 23:01:37 +0000 Subject: avoid recursive lock panic by unlocking before calling rtrequest; this is consistent with other places but will be replaced shortly by a "proper fix" Supported by: FreeBSD Foundation Pain felt by: Jiri Mikulas --- sys/net/route.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/net/route.c b/sys/net/route.c index 46e811d..ea98172 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -684,11 +684,12 @@ rtrequest1(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt) */ rt2 = rtalloc1(dst, 0, RTF_PRCLONING); if (rt2 && rt2->rt_parent) { + RT_UNLOCK(rt2); /* XXX recursive lock */ rtrequest(RTM_DELETE, rt_key(rt2), rt2->rt_gateway, rt_mask(rt2), rt2->rt_flags, 0); - RTFREE_LOCKED(rt2); + RTFREE(rt2); rn = rnh->rnh_addaddr(ndst, netmask, rnh, rt->rt_nodes); } else if (rt2) { -- cgit v1.1