aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/init_64.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 2362b646178e..794233587287 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -862,18 +862,18 @@ static struct vm_area_struct gate_vma = {
862 .vm_flags = VM_READ | VM_EXEC 862 .vm_flags = VM_READ | VM_EXEC
863}; 863};
864 864
865struct vm_area_struct *get_gate_vma(struct task_struct *tsk) 865struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
866{ 866{
867#ifdef CONFIG_IA32_EMULATION 867#ifdef CONFIG_IA32_EMULATION
868 if (test_tsk_thread_flag(tsk, TIF_IA32)) 868 if (!mm || mm->context.ia32_compat)
869 return NULL; 869 return NULL;
870#endif 870#endif
871 return &gate_vma; 871 return &gate_vma;
872} 872}
873 873
874int in_gate_area(struct task_struct *task, unsigned long addr) 874int in_gate_area(struct mm_struct *mm, unsigned long addr)
875{ 875{
876 struct vm_area_struct *vma = get_gate_vma(task); 876 struct vm_area_struct *vma = get_gate_vma(mm);
877 877
878 if (!vma) 878 if (!vma)
879 return 0; 879 return 0;
@@ -882,11 +882,11 @@ int in_gate_area(struct task_struct *task, unsigned long addr)
882} 882}
883 883
884/* 884/*
885 * Use this when you have no reliable task/vma, typically from interrupt 885 * Use this when you have no reliable mm, typically from interrupt
886 * context. It is less reliable than using the task's vma and may give 886 * context. It is less reliable than using a task's mm and may give
887 * false positives: 887 * false positives.
888 */ 888 */
889int in_gate_area_no_task(unsigned long addr) 889int in_gate_area_no_mm(unsigned long addr)
890{ 890{
891 return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END); 891 return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END);
892} 892}