[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450741676-5865-65-git-send-email-viro@ZenIV.linux.org.uk>
Date: Mon, 21 Dec 2015 23:47:38 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: linux-kernel@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [POC][PATCH 65/83] um: switch to get_free_page()
From: Al Viro <viro@...iv.linux.org.uk>
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists