From: Dominik Dingel Date: Wed, 15 Oct 2014 13:29:01 +0000 (+0200) Subject: s390/mm: missing pte for gmap_ipte_notify should trigger a VM_BUG X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6972cae523de728ad5e8dae01da4a631d98b874c;p=linux-beck.git s390/mm: missing pte for gmap_ipte_notify should trigger a VM_BUG After fixup_user_fault does not fail we have a writeable pte. That pte might transform but it should not vanish. Signed-off-by: Dominik Dingel Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index b1871d39e46e..9c8a6dd8a49c 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -752,8 +752,7 @@ int gmap_ipte_notify(struct gmap *gmap, unsigned long gaddr, unsigned long len) break; /* Walk the process page table, lock and get pte pointer */ ptep = get_locked_pte(gmap->mm, addr, &ptl); - if (unlikely(!ptep)) - continue; + VM_BUG_ON(!ptep); /* Set notification bit in the pgste of the pte */ entry = *ptep; if ((pte_val(entry) & (_PAGE_INVALID | _PAGE_PROTECT)) == 0) {