aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_taskqueue.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2013-10-16 05:02:01 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2013-10-16 05:02:01 +0000
commit348298b1a38f4a71d7d3d9de8e19d6324cff29bc (patch)
treefbbea8eb3af05dcdd0beb998335f35a53676a752 /sys/kern/subr_taskqueue.c
parent994409375b0f4d1357e84537f5dc11f31101645c (diff)
Notes
Diffstat (limited to 'sys/kern/subr_taskqueue.c')
-rw-r--r--sys/kern/subr_taskqueue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c
index 9c7bf411aebc..b8d30a10c120 100644
--- a/sys/kern/subr_taskqueue.c
+++ b/sys/kern/subr_taskqueue.c
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
#include <sys/taskqueue.h>
#include <sys/unistd.h>
#include <machine/stdarg.h>
+#include <net/vnet.h>
static MALLOC_DEFINE(M_TASKQUEUE, "taskqueue", "Task Queues");
static void *taskqueue_giant_ih;
@@ -330,7 +331,9 @@ taskqueue_run_locked(struct taskqueue *queue)
tb.tb_running = task;
TQ_UNLOCK(queue);
+ CURVNET_SET(task->ta_vnet);
task->ta_func(task->ta_context, pending);
+ CURVNET_RESTORE();
TQ_LOCK(queue);
tb.tb_running = NULL;