mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-03 11:43:03 +09:00
PD#SWPL-4900 Problem: printk_prefix() passes NULL buf to print_time() to get the length of the time prefix; when printk times are enable, the current code just return "snprint(NULL, 0, "[%5lu.000000]", (unsigned long)ts)" but in the SMP case, we add cpu core id at the end of time prefix, the format is "[%5lu, %06lu@%d]", this gives a wrong size(shorter). this will make buf get out of boundary, when run dmesg. Solution: replace [%5lu.000000] with [%5lu.000000@0] Verify: g12a-u200 Change-Id: Ic74b9f466b5af5aac7e6569a1afc7a46d9594050 Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>