Commit 6fda135c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Revert "printk: return -EINVAL if the message len is bigger than the buf size"

This reverts commit b56a39ac.

A better patch from Jan will follow this to resolve the issue.
Acked-by: default avatarKay 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4661e356
...@@ -880,9 +880,7 @@ static int syslog_print(char __user *buf, int size) ...@@ -880,9 +880,7 @@ static int syslog_print(char __user *buf, int size)
syslog_seq++; syslog_seq++;
raw_spin_unlock_irq(&logbuf_lock); raw_spin_unlock_irq(&logbuf_lock);
if (len > size) if (len > 0 && copy_to_user(buf, text, len))
len = -EINVAL;
else if (len > 0 && copy_to_user(buf, text, len))
len = -EFAULT; len = -EFAULT;
kfree(text); kfree(text);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment