summaryrefslogtreecommitdiff
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorVitaliy Makkoveev <mvs@cvs.openbsd.org>2023-04-27 14:41:10 +0000
committerVitaliy Makkoveev <mvs@cvs.openbsd.org>2023-04-27 14:41:10 +0000
commit66f2c6a39f44f53d485f332c03863abab10adc71 (patch)
treeb17f89a024cd66dffe5619cc2ad3287dfdeeb82e /sys/net/route.c
parent62ee544a9ae8accf67584d58c49444a89a71ab8a (diff)
Remove kernel lock from rtfree(9).
Route timers and route labels protected by corresponding mutexes. `ifa' uses references counting for protection. rt_mpls_clear() could be called lockless because this is the last reference of `rt'. ok bluhm@ kn@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 44d661fc949..d9f59e9a4a1 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.420 2023/04/27 11:11:04 mvs Exp $ */
+/* $OpenBSD: route.c,v 1.421 2023/04/27 14:41:09 mvs Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -507,7 +507,6 @@ rtfree(struct rtentry *rt)
KASSERT(!RT_ROOT(rt));
atomic_dec_int(&rttrash);
- KERNEL_LOCK();
rt_timer_remove_all(rt);
ifafree(rt->rt_ifa);
rtlabel_unref(rt->rt_labelid);
@@ -516,7 +515,6 @@ rtfree(struct rtentry *rt)
#endif
free(rt->rt_gateway, M_RTABLE, ROUNDUP(rt->rt_gateway->sa_len));
free(rt_key(rt), M_RTABLE, rt_key(rt)->sa_len);
- KERNEL_UNLOCK();
pool_put(&rtentry_pool, rt);
}