]> Git Repo - linux.git/commitdiff
Revert "printk: return -EINVAL if the message len is bigger than the buf size"
authorGreg Kroah-Hartman <[email protected]>
Tue, 26 Jun 2012 19:35:24 +0000 (12:35 -0700)
committerGreg Kroah-Hartman <[email protected]>
Tue, 26 Jun 2012 19:35:24 +0000 (12:35 -0700)
This reverts commit b56a39ac263e5b8cafedd551a49c2105e68b98c2.

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

Acked-by: Kay Sievers <[email protected]>
Cc: Fengguang Wu <[email protected]>
Cc: Yuanhan Liu <[email protected]>
Cc: Jan Beulich <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
kernel/printk.c

index d6a1412f6b09f3e0a460300c069895e5484202dc..ff05361962e158810e120fe7b7d3cafc39ae5607 100644 (file)
@@ -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);
This page took 0.055118 seconds and 4 git commands to generate.