]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/x86/mm/pageattr.c
x86/mm: Avoid premature success when changing page attributes
[linux-beck.git] / arch / x86 / mm / pageattr.c
index 2440814b00699e33809ce061d6f86a48437f7a10..3dd6afd2c0e5769588a170c0317782f4b23611a8 100644 (file)
@@ -1122,8 +1122,10 @@ static int __cpa_process_fault(struct cpa_data *cpa, unsigned long vaddr,
        /*
         * Ignore all non primary paths.
         */
-       if (!primary)
+       if (!primary) {
+               cpa->numpages = 1;
                return 0;
+       }
 
        /*
         * Ignore the NULL PTE for kernel identity mapping, as it is expected