summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/frag6.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/frag6.c')
-rw-r--r--sys/netinet6/frag6.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 3fd8605..ee1f4a2 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -720,8 +720,8 @@ frag6_slowtimo(void)
VNET_ITERATOR_DECL(vnet_iter);
struct ip6q *q6;
+ VNET_LIST_RLOCK_NOSLEEP();
IP6Q_LOCK();
- VNET_LIST_RLOCK();
VNET_FOREACH(vnet_iter) {
CURVNET_SET(vnet_iter);
q6 = V_ip6q.ip6q_next;
@@ -748,8 +748,8 @@ frag6_slowtimo(void)
}
CURVNET_RESTORE();
}
- VNET_LIST_RUNLOCK();
IP6Q_UNLOCK();
+ VNET_LIST_RUNLOCK_NOSLEEP();
}
/*
@@ -760,9 +760,11 @@ frag6_drain(void)
{
VNET_ITERATOR_DECL(vnet_iter);
- if (IP6Q_TRYLOCK() == 0)
+ VNET_LIST_RLOCK_NOSLEEP();
+ if (IP6Q_TRYLOCK() == 0) {
+ VNET_LIST_RUNLOCK_NOSLEEP();
return;
- VNET_LIST_RLOCK();
+ }
VNET_FOREACH(vnet_iter) {
CURVNET_SET(vnet_iter);
while (V_ip6q.ip6q_next != &V_ip6q) {
@@ -772,6 +774,6 @@ frag6_drain(void)
}
CURVNET_RESTORE();
}
- VNET_LIST_RUNLOCK();
IP6Q_UNLOCK();
+ VNET_LIST_RUNLOCK_NOSLEEP();
}
OpenPOWER on IntegriCloud