projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5353cf0
)
kmsg: /dev/kmsg - properly return possible copy_from_user() failure
author
Kay Sievers
<kay@vrfy.org>
Mon, 30 Jul 2012 21:40:08 +0000
(14:40 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Tue, 31 Jul 2012 00:25:13 +0000
(17:25 -0700)
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/printk.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/printk.c
b/kernel/printk.c
index 50c96b5651b696766c915b57dec92b5629a78866..852269adad25afc878c3f10e7a3bf059d086cca9 100644
(file)
--- a/
kernel/printk.c
+++ b/
kernel/printk.c
@@
-389,8
+389,10
@@
static ssize_t devkmsg_writev(struct kiocb *iocb, const struct iovec *iv,
line = buf;
for (i = 0; i < count; i++) {
- if (copy_from_user(line, iv[i].iov_base, iv[i].iov_len))
+ if (copy_from_user(line, iv[i].iov_base, iv[i].iov_len)) {
+ ret = -EFAULT;
goto out;
+ }
line += iv[i].iov_len;
}