Skip to content

Commit 5da779c

Browse files
mstsirkindavem330
authored andcommitted
mm: export use_mm/unuse_mm to modules
vhost net module wants to do copy to/from user from a kernel thread, which needs use_mm. Export it to modules. Acked-by: Andrea Arcangeli <[email protected]> Acked-by: Andrew Morton <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 05c2828 commit 5da779c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mm/mmu_context.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <linux/mm.h>
77
#include <linux/mmu_context.h>
8+
#include <linux/module.h>
89
#include <linux/sched.h>
910

1011
#include <asm/mmu_context.h>
@@ -37,6 +38,7 @@ void use_mm(struct mm_struct *mm)
3738
if (active_mm != mm)
3839
mmdrop(active_mm);
3940
}
41+
EXPORT_SYMBOL_GPL(use_mm);
4042

4143
/*
4244
* unuse_mm
@@ -56,3 +58,4 @@ void unuse_mm(struct mm_struct *mm)
5658
enter_lazy_tlb(mm, tsk);
5759
task_unlock(tsk);
5860
}
61+
EXPORT_SYMBOL_GPL(unuse_mm);

0 commit comments

Comments
 (0)