diff options
Diffstat (limited to 'arch/i386/kernel/ldt.c')
-rw-r--r-- | arch/i386/kernel/ldt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/i386/kernel/ldt.c b/arch/i386/kernel/ldt.c index 445211eb2d57..b410e5fb034f 100644 --- a/arch/i386/kernel/ldt.c +++ b/arch/i386/kernel/ldt.c | |||
@@ -160,16 +160,14 @@ static int read_default_ldt(void __user * ptr, unsigned long bytecount) | |||
160 | { | 160 | { |
161 | int err; | 161 | int err; |
162 | unsigned long size; | 162 | unsigned long size; |
163 | void *address; | ||
164 | 163 | ||
165 | err = 0; | 164 | err = 0; |
166 | address = &default_ldt[0]; | ||
167 | size = 5*sizeof(struct desc_struct); | 165 | size = 5*sizeof(struct desc_struct); |
168 | if (size > bytecount) | 166 | if (size > bytecount) |
169 | size = bytecount; | 167 | size = bytecount; |
170 | 168 | ||
171 | err = size; | 169 | err = size; |
172 | if (copy_to_user(ptr, address, size)) | 170 | if (clear_user(ptr, size)) |
173 | err = -EFAULT; | 171 | err = -EFAULT; |
174 | 172 | ||
175 | return err; | 173 | return err; |