提交 d5feaea3 编写于 作者: G Gerald Schaefer 提交者: Martin Schwidefsky

s390/mm: fix deadlock in unmap_hugepage_range()

git commit cd2934a3 moved the flush_tlb_range() within
__unmap_hugepage_range() inside the mm->page_table_lock, which
triggered a deadlock in s390 tlb flushing code. __tlb_flush_mm_cond()
also tries to acquire the mm->page_table_lock, but that is not needed
because all callers already have mm->mmap_sem or mm->page_table_lock,
so it can be safely removed to fix the deadlock.
Signed-off-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 5b716ac7
...@@ -90,12 +90,10 @@ static inline void __tlb_flush_mm(struct mm_struct * mm) ...@@ -90,12 +90,10 @@ static inline void __tlb_flush_mm(struct mm_struct * mm)
static inline void __tlb_flush_mm_cond(struct mm_struct * mm) static inline void __tlb_flush_mm_cond(struct mm_struct * mm)
{ {
spin_lock(&mm->page_table_lock);
if (mm->context.flush_mm) { if (mm->context.flush_mm) {
__tlb_flush_mm(mm); __tlb_flush_mm(mm);
mm->context.flush_mm = 0; mm->context.flush_mm = 0;
} }
spin_unlock(&mm->page_table_lock);
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册