git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
um
/
sys-i386
/
ldt.c
diff --git
a/arch/um/sys-i386/ldt.c
b/arch/um/sys-i386/ldt.c
index
fe0877b
..
5db7737
100644
(file)
--- a/
arch/um/sys-i386/ldt.c
+++ b/
arch/um/sys-i386/ldt.c
@@
-3,8
+3,6
@@
* Licensed under the GPL
*/
* Licensed under the GPL
*/
-#include "linux/stddef.h"
-#include "linux/config.h"
#include "linux/sched.h"
#include "linux/slab.h"
#include "linux/types.h"
#include "linux/sched.h"
#include "linux/slab.h"
#include "linux/types.h"
@@
-168,7
+166,7
@@
static long read_ldt_from_host(void __user * ptr, unsigned long bytecount)
struct ptrace_ldt ptrace_ldt = (struct ptrace_ldt) {
.func = 0,
.bytecount = bytecount,
struct ptrace_ldt ptrace_ldt = (struct ptrace_ldt) {
.func = 0,
.bytecount = bytecount,
- .ptr =
(void *)
kmalloc(bytecount, GFP_KERNEL)};
+ .ptr = kmalloc(bytecount, GFP_KERNEL)};
u32 cpu;
if(ptrace_ldt.ptr == NULL)
u32 cpu;
if(ptrace_ldt.ptr == NULL)
@@
-424,12
+422,11
@@
void ldt_get_host_info(void)
size++;
}
size++;
}
- if(size <
sizeof(dummy_list)/sizeof(dummy_list[0])) {
+ if(size <
ARRAY_SIZE(dummy_list))
host_ldt_entries = dummy_list;
host_ldt_entries = dummy_list;
- }
else {
size = (size + 1) * sizeof(dummy_list[0]);
else {
size = (size + 1) * sizeof(dummy_list[0]);
- host_ldt_entries =
(short *)
kmalloc(size, GFP_KERNEL);
+ host_ldt_entries = kmalloc(size, GFP_KERNEL);
if(host_ldt_entries == NULL) {
printk("ldt_get_host_info: couldn't allocate host ldt list\n");
goto out_free;
if(host_ldt_entries == NULL) {
printk("ldt_get_host_info: couldn't allocate host ldt list\n");
goto out_free;