summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/ldt.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/ldt.c')
-rw-r--r--arch/i386/kernel/ldt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/i386/kernel/ldt.c b/arch/i386/kernel/ldt.c
index 445211e..b410e5f 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)
{
int err;
unsigned long size;
- void *address;
err = 0;
- address = &default_ldt[0];
size = 5*sizeof(struct desc_struct);
if (size > bytecount)
size = bytecount;
err = size;
- if (copy_to_user(ptr, address, size))
+ if (clear_user(ptr, size))
err = -EFAULT;
return err;
OpenPOWER on IntegriCloud