Skip to content

Commit

Permalink
x86/tlb: Fix build warning and crash when building for !SMP
Browse files Browse the repository at this point in the history
The incompatible parameter of flush_tlb_mm_range cause build warning.
Fix it by correct parameter.

Ingo Molnar found that this could also cause a user space crash.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Alex Shi <alex.shi@intel.com>
Link: http://lkml.kernel.org/r/1342747103-19765-1-git-send-email-alex.shi@intel.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
Alex Shi authored and H. Peter Anvin committed Jul 20, 2012
1 parent effee4b commit 7efa1c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
__flush_tlb();
}

static inline void flush_tlb_mm_range(struct vm_area_struct *vma,
static inline void flush_tlb_mm_range(struct mm_struct *mm,
unsigned long start, unsigned long end, unsigned long vmflag)
{
if (vma->vm_mm == current->active_mm)
if (mm == current->active_mm)
__flush_tlb();
}

Expand Down

0 comments on commit 7efa1c8

Please sign in to comment.