diff options
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r-- | arch/x86/mm/pageattr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index fc6a4c8f6e2a..2440814b0069 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -33,7 +33,7 @@ struct cpa_data { | |||
33 | pgd_t *pgd; | 33 | pgd_t *pgd; |
34 | pgprot_t mask_set; | 34 | pgprot_t mask_set; |
35 | pgprot_t mask_clr; | 35 | pgprot_t mask_clr; |
36 | int numpages; | 36 | unsigned long numpages; |
37 | int flags; | 37 | int flags; |
38 | unsigned long pfn; | 38 | unsigned long pfn; |
39 | unsigned force_split : 1; | 39 | unsigned force_split : 1; |
@@ -1350,7 +1350,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) | |||
1350 | * CPA operation. Either a large page has been | 1350 | * CPA operation. Either a large page has been |
1351 | * preserved or a single page update happened. | 1351 | * preserved or a single page update happened. |
1352 | */ | 1352 | */ |
1353 | BUG_ON(cpa->numpages > numpages); | 1353 | BUG_ON(cpa->numpages > numpages || !cpa->numpages); |
1354 | numpages -= cpa->numpages; | 1354 | numpages -= cpa->numpages; |
1355 | if (cpa->flags & (CPA_PAGES_ARRAY | CPA_ARRAY)) | 1355 | if (cpa->flags & (CPA_PAGES_ARRAY | CPA_ARRAY)) |
1356 | cpa->curpage++; | 1356 | cpa->curpage++; |