git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
x86, espfix: Make it possible to disable 16-bit support
[pandora-kernel.git]
/
arch
/
x86
/
kernel
/
ldt.c
diff --git
a/arch/x86/kernel/ldt.c
b/arch/x86/kernel/ldt.c
index
ea69726
..
0a8e65e
100644
(file)
--- a/
arch/x86/kernel/ldt.c
+++ b/
arch/x86/kernel/ldt.c
@@
-230,6
+230,11
@@
static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
}
}
+ if (!IS_ENABLED(CONFIG_X86_16BIT) && !ldt_info.seg_32bit) {
+ error = -EINVAL;
+ goto out_unlock;
+ }
+
fill_ldt(&ldt, &ldt_info);
if (oldmode)
ldt.avl = 0;