Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a2fb38
)
- handle copy_from_user() error
author
alex
<alex>
Tue, 5 Jul 2005 09:59:56 +0000
(09:59 +0000)
committer
alex
<alex>
Tue, 5 Jul 2005 09:59:56 +0000
(09:59 +0000)
lustre/ldlm/ldlm_resource.c
patch
|
blob
|
history
diff --git
a/lustre/ldlm/ldlm_resource.c
b/lustre/ldlm/ldlm_resource.c
index
9a88971
..
9cd393a
100644
(file)
--- a/
lustre/ldlm/ldlm_resource.c
+++ b/
lustre/ldlm/ldlm_resource.c
@@
-140,7
+140,8
@@
static int lprocfs_write_lru_size(struct file *file, const char *buffer,
unsigned long tmp;
dummy[MAX_STRING_SIZE] = '\0';
- copy_from_user(dummy, buffer, MAX_STRING_SIZE);
+ if (copy_from_user(dummy, buffer, MAX_STRING_SIZE))
+ return -EFAULT;
if (count == 6 && memcmp(dummy, "clear", 5) == 0) {
CDEBUG(D_DLMTRACE,