diff options
author | 2016-11-09 09:04:48 +0000 | |
---|---|---|
committer | 2016-11-09 09:04:48 +0000 | |
commit | 7fe73b24c6f886e18eed446f3a7ad6403db57ab8 (patch) | |
tree | 70a0dfa7305813a259deaaf1851030447debcd2b /sys/net/route.c | |
parent | Do not dereference a variable without initializing it beforehand. (diff) | |
download | wireguard-openbsd-7fe73b24c6f886e18eed446f3a7ad6403db57ab8.tar.xz wireguard-openbsd-7fe73b24c6f886e18eed446f3a7ad6403db57ab8.zip |
Do not call splsoftnet() recursively, this won't work with a lock.
Timers configured via rt_timer_add(9) always run at IPL_SOFTNET, so
assert that rather than calling splsoftnet().
ok bluhm@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r-- | sys/net/route.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index b8d44c5a152..5ea2ab94e2c 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.334 2016/11/08 10:39:32 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.335 2016/11/09 09:04:48 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -1503,6 +1503,8 @@ rt_timer_queue_destroy(struct rttimer_queue *rtq) { struct rttimer *r; + splsoftassert(IPL_SOFTNET); + while ((r = TAILQ_FIRST(&rtq->rtq_head)) != NULL) { LIST_REMOVE(r, rtt_link); TAILQ_REMOVE(&rtq->rtq_head, r, rtt_next); |