X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fkernel%2Fldt-xen.c;h=a6c6c09ef73aabe72bd569dca51f040249ce3281;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=d2cceffbb1c379c8513b9b8bdecc7334bea3cd58;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/arch/i386/kernel/ldt-xen.c b/arch/i386/kernel/ldt-xen.c index d2cceffbb..a6c6c09ef 100644 --- a/arch/i386/kernel/ldt-xen.c +++ b/arch/i386/kernel/ldt-xen.c @@ -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 @@ -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;