The patch titled From: William Douglas <william.r.douglas@xxxxxxxxx> has been added to the -mm tree. Its filename is printk-remove-bounds-checking-for-log_prefix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: From: William Douglas <william.r.douglas@xxxxxxxxx> 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). Since the code being updated works because strtoul bombs out (endp isn't updated) and 0 is returned anyway just remove the check and don't change the behavior of the function. Signed-off-by: William Douglas <william.douglas@xxxxxxxxx> --- index 37dff34..4a0d2ed 100644 Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/printk.c | 3 --- 1 file changed, 3 deletions(-) diff -puN kernel/printk.c~printk-remove-bounds-checking-for-log_prefix kernel/printk.c --- a/kernel/printk.c~printk-remove-bounds-checking-for-log_prefix +++ a/kernel/printk.c @@ -595,9 +595,6 @@ static size_t log_prefix(const char *p, /* multi digit including the level and facility number */ char *endp = NULL; - if (p[1] < '0' || p[1] > '9') - return 0; - lev = (simple_strtoul(&p[1], &endp, 10) & 7); if (endp == NULL || endp[0] != '>') return 0; _ Patches currently in -mm which might be from william.r.douglas@xxxxxxxxx are printk-fix-bounds-checking-for-log_prefix.patch printk-remove-bounds-checking-for-log_prefix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html