aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-26 19:35:24 (GMT)
committerAntti Palosaari <crope@iki.fi>2012-07-03 19:57:25 (GMT)
commit4a4e01e5474395536c46d83d10918890f0f7f075 (patch)
treeaec61994f16d79e25f62d73824dd8b36d304e175
parent3c567be19115387899a9e756a3cf2d3d8341885d (diff)
Revert "printk: return -EINVAL if the message len is bigger than the buf size"
This reverts commit b56a39ac263e5b8cafedd551a49c2105e68b98c2. 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>
-rw-r--r--kernel/printk.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index d6a1412..ff05361 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -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);

Privacy Policy