/[pkg-src]/trunk/kernel26-xen/patches-2.6.25-r1/1150-2.6.25-xen-Mark-init-pages-read-write-again-on-free_init_pages.patch |
Annotation of /trunk/kernel26-xen/patches-2.6.25-r1/1150-2.6.25-xen-Mark-init-pages-read-write-again-on-free_init_pages.patch
Parent Directory | Revision Log
Revision 606 -
(hide annotations)
(download)
Thu May 22 23:13:13 2008 UTC (16 years, 1 month ago) by niro
File size: 1042 byte(s)
Thu May 22 23:13:13 2008 UTC (16 years, 1 month ago) by niro
File size: 1042 byte(s)
-ver bump to 2.6.25-magellan-r1: - linux-2.6.25.4 - fbcondecor-0.9.4 - squashfs-3.3 - unionfs-2.3.3 - tuxonice-3.0-rc7 - linux-phc-0.3.0 - acpi-dstd-0.9a - reiser4 - xen-3.2.0 . ipw3945-1.2.2
1 | niro | 606 | From 82cb9b4c9046ece7ad6a1f6d4cb03f4cbab982b4 Mon Sep 17 00:00:00 2001 |
2 | From: Eduardo Habkost <ehabkost@redhat.com> | ||
3 | Date: Thu, 3 Apr 2008 19:09:09 -0300 | ||
4 | Subject: [PATCH] Mark init pages read-write again on free_init_pages() | ||
5 | |||
6 | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> | ||
7 | --- | ||
8 | arch/x86/mm/init_64.c | 7 +++++++ | ||
9 | 1 files changed, 7 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c | ||
12 | index e21c9a4..763914c 100644 | ||
13 | --- a/arch/x86/mm/init_64.c | ||
14 | +++ b/arch/x86/mm/init_64.c | ||
15 | @@ -1073,6 +1073,13 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | ||
16 | begin, PAGE_ALIGN(end)); | ||
17 | set_memory_np(begin, (end - begin) >> PAGE_SHIFT); | ||
18 | #else | ||
19 | + /* | ||
20 | + * We just marked the kernel text read only above, now that | ||
21 | + * we are going to free part of that, we need to make that | ||
22 | + * writeable first. | ||
23 | + */ | ||
24 | + set_memory_rw(begin, (end - begin) >> PAGE_SHIFT); | ||
25 | + | ||
26 | printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10); | ||
27 | |||
28 | for (; addr < end; addr += PAGE_SIZE) { | ||
29 | -- | ||
30 | 1.5.4.1 | ||
31 |