This reverts commit
8e17c22a8e24fbed10941629a37e777ecb275aaf.
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>
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);