aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-i386/ldt.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/sys-i386/ldt.c')
-rw-r--r--arch/um/sys-i386/ldt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c
index 2683d302395d..906c2a4e7279 100644
--- a/arch/um/sys-i386/ldt.c
+++ b/arch/um/sys-i386/ldt.c
@@ -13,7 +13,6 @@
13#include "asm/ldt.h" 13#include "asm/ldt.h"
14#include "asm/unistd.h" 14#include "asm/unistd.h"
15#include "kern.h" 15#include "kern.h"
16#include "mode_kern.h"
17#include "os.h" 16#include "os.h"
18 17
19extern int modify_ldt(int func, void *ptr, unsigned long bytecount); 18extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
@@ -33,7 +32,7 @@ long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc,
33 * modify isn't current->active_mm. 32 * modify isn't current->active_mm.
34 * If this is called directly by modify_ldt, 33 * If this is called directly by modify_ldt,
35 * (current->active_mm->context.skas.u == mm_idp) 34 * (current->active_mm->context.skas.u == mm_idp)
36 * will be true. So no call to switch_mm_skas(mm_idp) is done. 35 * will be true. So no call to __switch_mm(mm_idp) is done.
37 * If this is called in case of init_new_ldt or PTRACE_LDT, 36 * If this is called in case of init_new_ldt or PTRACE_LDT,
38 * mm_idp won't belong to current->active_mm, but child->mm. 37 * mm_idp won't belong to current->active_mm, but child->mm.
39 * So we need to switch child's mm into our userspace, then 38 * So we need to switch child's mm into our userspace, then
@@ -43,7 +42,7 @@ long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc,
43 */ 42 */
44 if(!current->active_mm || current->active_mm == &init_mm || 43 if(!current->active_mm || current->active_mm == &init_mm ||
45 mm_idp != &current->active_mm->context.skas.id) 44 mm_idp != &current->active_mm->context.skas.id)
46 switch_mm_skas(mm_idp); 45 __switch_mm(mm_idp);
47 } 46 }
48 47
49 if(ptrace_ldt) { 48 if(ptrace_ldt) {
@@ -88,7 +87,7 @@ long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc,
88 */ 87 */
89 if(current->active_mm && current->active_mm != &init_mm && 88 if(current->active_mm && current->active_mm != &init_mm &&
90 mm_idp != &current->active_mm->context.skas.id) 89 mm_idp != &current->active_mm->context.skas.id)
91 switch_mm_skas(&current->active_mm->context.skas.id); 90 __switch_mm(&current->active_mm->context.skas.id);
92 } 91 }
93 92
94 return res; 93 return res;