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
vserver 1.9.3
[linux-2.6.git]
/
arch
/
i386
/
kernel
/
ldt.c
diff --git
a/arch/i386/kernel/ldt.c
b/arch/i386/kernel/ldt.c
index
038d300
..
bb50afb
100644
(file)
--- a/
arch/i386/kernel/ldt.c
+++ b/
arch/i386/kernel/ldt.c
@@
-142,12
+142,17
@@
static int read_ldt(void __user * ptr, unsigned long bytecount)
err = -EFAULT;
up(&mm->context.sem);
if (err < 0)
err = -EFAULT;
up(&mm->context.sem);
if (err < 0)
-
return err
;
+
goto error_return
;
if (size != bytecount) {
/* zero-fill the rest */
if (size != bytecount) {
/* zero-fill the rest */
- clear_user(ptr+size, bytecount-size);
+ if (clear_user(ptr+size, bytecount-size) != 0) {
+ err = -EFAULT;
+ goto error_return;
+ }
}
return bytecount;
}
return bytecount;
+error_return:
+ return err;
}
static int read_default_ldt(void __user * ptr, unsigned long bytecount)
}
static int read_default_ldt(void __user * ptr, unsigned long bytecount)