From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Anderson Date: Tue, 6 Oct 2020 15:15:55 -0400 Subject: [PATCH 03/18] log: Add new category names to log_cat_name In-Reply-To: <20201006191610.761899-1-seanga2@gmail.com> References: <20201006191610.761899-1-seanga2@gmail.com> Message-ID: <20201006191610.761899-4-seanga2@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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