[POC][PATCH 65/83] um: switch to get_free_page()

From: Al Viro
Date: Mon Dec 21 2015 - 18:56:09 EST


From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
arch/x86/um/ldt.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/x86/um/ldt.c b/arch/x86/um/ldt.c
index 60b4314..a3c5104 100644
--- a/arch/x86/um/ldt.c
+++ b/arch/x86/um/ldt.c
@@ -297,7 +297,7 @@ long init_new_ldt(struct mm_context *new_mm, struct mm_context *from_mm)
struct user_desc desc;
short * num_p;
int i;
- long page, err=0;
+ long err=0;
void *addr = NULL;


@@ -336,13 +336,12 @@ long init_new_ldt(struct mm_context *new_mm, struct mm_context *from_mm)
else {
i = from_mm->arch.ldt.entry_count / LDT_ENTRIES_PER_PAGE;
while (i-->0) {
- page = __get_free_page(GFP_KERNEL|__GFP_ZERO);
+ void *page = get_free_page(GFP_KERNEL|__GFP_ZERO);
if (!page) {
err = -ENOMEM;
break;
}
- new_mm->arch.ldt.u.pages[i] =
- (struct ldt_entry *) page;
+ new_mm->arch.ldt.u.pages[i] = page;
memcpy(new_mm->arch.ldt.u.pages[i],
from_mm->arch.ldt.u.pages[i], PAGE_SIZE);
}
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/