Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311144
b: refs/heads/master
c: b56a39a
h: refs/heads/master
v: v3
  • Loading branch information
Yuanhan Liu authored and Greg Kroah-Hartman committed Jun 16, 2012
1 parent 0890379 commit 087fb16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a77a5a06ec66ed05199b301e7c25f42f979afdc
refs/heads/master: b56a39ac263e5b8cafedd551a49c2105e68b98c2
4 changes: 3 additions & 1 deletion trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,9 @@ static int syslog_print(char __user *buf, int size)
syslog_seq++;
raw_spin_unlock_irq(&logbuf_lock);

if (len > 0 && copy_to_user(buf, text, len))
if (len > size)
len = -EINVAL;
else if (len > 0 && copy_to_user(buf, text, len))
len = -EFAULT;

kfree(text);
Expand Down

0 comments on commit 087fb16

Please sign in to comment.