]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
printk: fix bounds checking for log_prefix
authorWilliam Douglas <william.r.douglas@gmail.com>
Wed, 28 Sep 2011 00:50:39 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 4 Oct 2011 07:41:34 +0000 (18:41 +1100)
commit4d9eb6cf7af88036ab144972c25fa066b1833598
tree8c5743a29969ec3075932f5b0ef4b5fd3086ca8f
parent67c812248958e6f6a310c40f66e16c0e23dee2aa
printk: fix bounds checking for log_prefix

Currently log_prefix is testing that the first character of the log level
and facility is less than '0' and greater than '9' (which is always
false).  It should be testing to see if the character less than '0' or
greater than '9' instead.  This patch makes that change.

The code being changed worked because strtoul bombs out (endp isn't
updated) and 0 is returned anyway.

Signed-off-by: William Douglas <william.douglas@intel.com>
Signed-off-by: Andrew Morton <>
kernel/printk.c