lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1261505039.25193.1342.camel@gandalf.stny.rr.com>
Date:	Tue, 22 Dec 2009 13:03:59 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Neil Horman <nhorman@...driver.com>
Cc:	linux-kernel@...r.kernel.org, fweisbec@...il.com, mingo@...hat.com,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] Fix tracing infrastructure to support multiple
 includes when defining CREATE_TRACE_POINTS

On Wed, 2009-12-16 at 11:04 -0500, Neil Horman wrote:


> +#if !defined(_TRACE_NAPI_H_) || defined(TRACE_HEADER_MULTI_READ)
>  #define _TRACE_NAPI_H_
>  

Ug, I'm still getting panics because of this. I found out that it's
because napi->dev can be NULL.

Here's what I did to solve it:


>  #include <linux/netdevice.h>
>  #include <linux/tracepoint.h>
> +#include <linux/ftrace.h>
> +

#define NO_DEV		"(no device)"

> +TRACE_EVENT(napi_poll,
>  
> -DECLARE_TRACE(napi_poll,
>  	TP_PROTO(struct napi_struct *napi),
> -	TP_ARGS(napi));
> +
> +	TP_ARGS(napi),
> +
> +	TP_STRUCT__entry(
> +		__field(        struct napi_struct *,	napi)
> +		__string(	dev_name, napi->dev->name)

		__string(	dev_name, napi->dev ? napi->dev->name, NO_DEV )

> +        ),
> +
> +        TP_fast_assign(
> +                __entry->napi = napi;
> +		__assign_str(dev_name, napi->dev->name);

		__assign_str(dev_name, napi->dev ? napi->dev->name, NO_DEV);

> +        ),
> +
> +        TP_printk("napi poll on napi struct %p for device %s",
> +		__entry->napi, __get_str(dev_name))
> +);

#undef NO_DEV

-- Steve


>  
>  #endif
> +
> +#include <trace/define_trace.h>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ