[PATCH 03/18] log: Add new category names to log_cat_name

Sean Anderson seanga2 at gmail.com
Tue Oct 6 21:15:55 CEST 2020


Without every category between LOGC_NONE and LOGC_COUNT present in
log_cat_name, log_get_cat_by_name will dereference NULL pointers if it
doesn't find a name early enough.

Fixes: c3aed5db59 ("sandbox: spi: Add more logging")
Fixes: a5c13b68e7 ("sandbox: log: Add a category for sandbox")
Fixes: 9f407d4ef0 ("Add core support for a bloblist to convey data from SPL")
Fixes: cce61fc428 ("dm: devres: Convert to use logging")
Fixes: 7ca2850cbc ("dm: core: Add basic ACPI support")

Signed-off-by: Sean Anderson <seanga2 at gmail.com>
---

 common/log.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/log.c b/common/log.c
index 3f6f4bdc2a..09e39b0eca 100644
--- a/common/log.c
+++ b/common/log.c
@@ -21,6 +21,11 @@ static const char *log_cat_name[LOGC_COUNT - LOGC_NONE] = {
 	"driver-model",
 	"device-tree",
 	"efi",
+	"alloc",
+	"sandbox",
+	"bloblist",
+	"devres",
+	"acpi",
 };
 
 static const char *log_level_name[LOGL_COUNT] = {
-- 
2.28.0



More information about the U-Boot mailing list