Re: [PATCH] x86: create array based interface to chagne page attribute

Dave Airlie
2008-04-26T22:36:04Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 554 bytes --]

>
> [ 0.120007] CPU: Processor Core ID: 0
> [ 0.124007] ACPI: Core revision 20070126
> [ 0.128008] BUG: unable to handle kernel paging request at fffffffb80d6fe30
> [ 0.128008] IP: [<ffffffff802200a3>] __change_page_attr_set_clr+0x6c/0xaf7
> [ 0.128008] PGD 203067 PUD 0
> [ 0.128008] Thread overran stack or stack corrupted
>
> http://redhat.com/~mingo/misc/log-Sat_Apr_26_15_47_59_CEST_2008.bad
> http://redhat.com/~mingo/misc/config-Sat_Apr_26_15_47_59_CEST_2008.bad
>
> Ingo

Doh.... BPB time...

one-liner attached.

Dave.

[-- Attachment #2: Type: TEXT/x-diff, Size: 415 bytes --]

diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index ee16b1b..c7fe876 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -730,7 +730,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
if (cpa->array)
cpa->curaddr++;
else
- cpa->vaddr += cpa->numpages * PAGE_SIZE;
+ *cpa->vaddr += cpa->numpages * PAGE_SIZE;
}
return 0;
}