fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / i386 / kernel / ldt-xen.c
index d2cceff..a6c6c09 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/kernel/ldt.c
+ * linux/arch/i386/kernel/ldt.c
  *
  * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
  * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
@@ -177,16 +177,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;