]> git.baikalelectronics.ru Git - kernel.git/commit
printk: return -EINVAL if the message len is bigger than the buf size
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Sat, 16 Jun 2012 04:40:55 +0000 (12:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Jun 2012 15:36:03 +0000 (08:36 -0700)
commit8e17c22a8e24fbed10941629a37e777ecb275aaf
tree0dbbe8929783ab347b3d40d4ed79ea87d5b3966d
parent966b51e63dfe7fa79b34e23a0b3db6dcda1879a5
printk: return -EINVAL if the message len is bigger than the buf size

Just like what devkmsg_read() does, return -EINVAL if the message len is
bigger than the buf size, or it will trigger a segfault error.

Acked-by: Kay Sievers <kay@vrfy.org>
Acked-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/printk.c