Skip to content

Commit 66e9bbd

Browse files
Dominik DingelMartin Schwidefsky
authored andcommitted
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: Dominik Dingel <dingel@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent c9eeb7b commit 66e9bbd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/s390/mm/pgtable.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ void __gmap_zap(struct gmap *gmap, unsigned long gaddr)
656656
}
657657
pgste_set_unlock(ptep, pgste);
658658
out_pte:
659-
pte_unmap_unlock(*ptep, ptl);
659+
pte_unmap_unlock(ptep, ptl);
660660
}
661661
EXPORT_SYMBOL_GPL(__gmap_zap);
662662

@@ -943,7 +943,7 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
943943
}
944944
if (!(pte_val(*ptep) & _PAGE_INVALID) &&
945945
(pte_val(*ptep) & _PAGE_PROTECT)) {
946-
pte_unmap_unlock(*ptep, ptl);
946+
pte_unmap_unlock(ptep, ptl);
947947
if (fixup_user_fault(current, mm, addr, FAULT_FLAG_WRITE)) {
948948
up_read(&mm->mmap_sem);
949949
return -EFAULT;
@@ -974,7 +974,7 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
974974
pgste_val(new) |= PGSTE_UC_BIT;
975975

976976
pgste_set_unlock(ptep, new);
977-
pte_unmap_unlock(*ptep, ptl);
977+
pte_unmap_unlock(ptep, ptl);
978978
up_read(&mm->mmap_sem);
979979
return 0;
980980
}

0 commit comments

Comments
 (0)