[lttng-dev] [PATCH] Check if interrupt action name is not null in statedump.

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Nov 8 15:18:47 EST 2012


* Simon Marchi (simon.marchi at polymtl.ca) wrote:
> Protection against poorly written drivers who give a null name to their
> irq handlers.
> 
> Signed-off-by: Simon Marchi <simon.marchi at polymtl.ca>

merged, thanks!

Mathieu

> ---
>  .../events/lttng-module/lttng-statedump.h          |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/instrumentation/events/lttng-module/lttng-statedump.h b/instrumentation/events/lttng-module/lttng-statedump.h
> index d350cad..e4c86d6 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("")
>  )
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list