提交 66e9bbdb 编写于 作者: D Dominik Dingel 提交者: Martin Schwidefsky

s390/mm: fixing calls of pte_unmap_unlock

pte_unmap works on page table entry pointers, derefencing should be avoided.
As on s390 pte_unmap is a NOP, this is more a cleanup if we want to supply
later such function.
Signed-off-by: NDominik Dingel <dingel@linux.vnet.ibm.com>
Reviewed-by: NThomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 c9eeb7b8
...@@ -656,7 +656,7 @@ void __gmap_zap(struct gmap *gmap, unsigned long gaddr) ...@@ -656,7 +656,7 @@ void __gmap_zap(struct gmap *gmap, unsigned long gaddr)
} }
pgste_set_unlock(ptep, pgste); pgste_set_unlock(ptep, pgste);
out_pte: out_pte:
pte_unmap_unlock(*ptep, ptl); pte_unmap_unlock(ptep, ptl);
} }
EXPORT_SYMBOL_GPL(__gmap_zap); EXPORT_SYMBOL_GPL(__gmap_zap);
...@@ -943,7 +943,7 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, ...@@ -943,7 +943,7 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
} }
if (!(pte_val(*ptep) & _PAGE_INVALID) && if (!(pte_val(*ptep) & _PAGE_INVALID) &&
(pte_val(*ptep) & _PAGE_PROTECT)) { (pte_val(*ptep) & _PAGE_PROTECT)) {
pte_unmap_unlock(*ptep, ptl); pte_unmap_unlock(ptep, ptl);
if (fixup_user_fault(current, mm, addr, FAULT_FLAG_WRITE)) { if (fixup_user_fault(current, mm, addr, FAULT_FLAG_WRITE)) {
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
return -EFAULT; return -EFAULT;
...@@ -974,7 +974,7 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, ...@@ -974,7 +974,7 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
pgste_val(new) |= PGSTE_UC_BIT; pgste_val(new) |= PGSTE_UC_BIT;
pgste_set_unlock(ptep, new); pgste_set_unlock(ptep, new);
pte_unmap_unlock(*ptep, ptl); pte_unmap_unlock(ptep, ptl);
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册