Commit 9b94cf97 authored by Hugh Dickins's avatar Hugh Dickins Committed by Greg Kroah-Hartman

kaiser: fix build and FIXME in alloc_ldt_struct()


Include linux/kaiser.h instead of asm/kaiser.h to build ldt.c without
CONFIG_KAISER.  kaiser_add_mapping() does already return an error code,
so fix the FIXME.
Signed-off-by: default avatarHugh Dickins <hughd@google.com>
Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 003e4767
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/kaiser.h>
#include <asm/ldt.h> #include <asm/ldt.h>
#include <asm/kaiser.h>
#include <asm/desc.h> #include <asm/desc.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/syscalls.h> #include <asm/syscalls.h>
...@@ -49,7 +49,7 @@ static struct ldt_struct *alloc_ldt_struct(int size) ...@@ -49,7 +49,7 @@ static struct ldt_struct *alloc_ldt_struct(int size)
{ {
struct ldt_struct *new_ldt; struct ldt_struct *new_ldt;
int alloc_size; int alloc_size;
int ret = 0; int ret;
if (size > LDT_ENTRIES) if (size > LDT_ENTRIES)
return NULL; return NULL;
...@@ -77,9 +77,7 @@ static struct ldt_struct *alloc_ldt_struct(int size) ...@@ -77,9 +77,7 @@ static struct ldt_struct *alloc_ldt_struct(int size)
return NULL; return NULL;
} }
// FIXME: make kaiser_add_mapping() return an error code ret = kaiser_add_mapping((unsigned long)new_ldt->entries, alloc_size,
// when it fails
kaiser_add_mapping((unsigned long)new_ldt->entries, alloc_size,
__PAGE_KERNEL); __PAGE_KERNEL);
if (ret) { if (ret) {
__free_ldt_struct(new_ldt); __free_ldt_struct(new_ldt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment