From: Simon Marchi Date: Thu, 8 Nov 2012 20:17:54 +0000 (-0500) Subject: Check if interrupt action name is not null in statedump X-Git-Tag: v2.1.0~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=cc4f887d47f83de6cdfd4fc0f93fffc81427cb36;p=lttng-modules.git Check if interrupt action name is not null in statedump Protection against poorly written drivers who give a null name to their irq handlers. Signed-off-by: Simon Marchi Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/lttng-statedump.h b/instrumentation/events/lttng-module/lttng-statedump.h index d350cad3..e4c86d65 100644 --- a/instrumentation/events/lttng-module/lttng-statedump.h +++ b/instrumentation/events/lttng-module/lttng-statedump.h @@ -150,12 +150,12 @@ TRACE_EVENT(lttng_statedump_interrupt, TP_STRUCT__entry( __field(unsigned int, irq) __string(name, chip_name) - __string(action, action->name) + __string(action, action->name ? : "") ), TP_fast_assign( tp_assign(irq, irq) tp_strcpy(name, chip_name) - tp_strcpy(action, action->name) + tp_strcpy(action, action->name ? : "") ), TP_printk("") )