Skip to content

Commit

Permalink
Revert "printk: return -EINVAL if the message len is bigger than the …
Browse files Browse the repository at this point in the history
…buf size"

This reverts commit b56a39a.

A better patch from Jan will follow this to resolve the issue.

Acked-by: Kay Sievers <kay@vrfy.org>
Cc: Fengguang Wu <wfg@linux.intel.com>
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed Jun 26, 2012
1 parent 4661e35 commit 6fda135
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,7 @@ static int syslog_print(char __user *buf, int size)
syslog_seq++;
raw_spin_unlock_irq(&logbuf_lock);

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

kfree(text);
Expand Down

0 comments on commit 6fda135

Please sign in to comment.