s390/mm: use VM_BUG_ON in crst_table_[upgrade|downgrade]
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 31 Aug 2017 11:18:22 +0000 (13:18 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 6 Sep 2017 07:24:41 +0000 (09:24 +0200)
The BUG_ON in crst_table_[upgrade|downgrade] is a debugging aid,
replace it with VM_BUG_ON.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/pgalloc.c

index c5b74dd61197998be7ee1e80a0a4de6d35a2fca7..05b5b1b0a8d99f62b10439f7744a95e085a80956 100644 (file)
@@ -83,7 +83,7 @@ int crst_table_upgrade(struct mm_struct *mm, unsigned long end)
        int rc, notify;
 
        /* upgrade should only happen from 3 to 4, 3 to 5, or 4 to 5 levels */
-       BUG_ON(mm->context.asce_limit < _REGION2_SIZE);
+       VM_BUG_ON(mm->context.asce_limit < _REGION2_SIZE);
        if (end >= TASK_SIZE_MAX)
                return -ENOMEM;
        rc = 0;
@@ -124,7 +124,7 @@ void crst_table_downgrade(struct mm_struct *mm)
        pgd_t *pgd;
 
        /* downgrade should only happen from 3 to 2 levels (compat only) */
-       BUG_ON(mm->context.asce_limit != _REGION2_SIZE);
+       VM_BUG_ON(mm->context.asce_limit != _REGION2_SIZE);
 
        if (current->active_mm == mm) {
                clear_user_asce();