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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 06 Aug 2009 11:11:50 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
	rostedt@...dmis.org, chris.mason@...cle.com, tglx@...utronix.de,
	mingo@...e.hu
Cc:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perfcounters/urgent] ftrace: Fix perf-tracepoint OOPS


> [ v2: fix build error in the !CONFIG_EVENT_PROFILE case ]
> Signed-off-by: Ingo Molnar <mingo@...e.hu>
> 
> 
> ---
>  include/linux/ftrace_event.h       |    8 +++-----
>  kernel/trace/trace_event_profile.c |    2 +-
>  kernel/trace/trace_events.c        |    2 +-
>  3 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
> index 5c093ff..d7cd193 100644
> --- a/include/linux/ftrace_event.h
> +++ b/include/linux/ftrace_event.h
> @@ -119,11 +119,9 @@ struct ftrace_event_call {
>  	void			*filter;
>  	void			*mod;
>  
> -#ifdef CONFIG_EVENT_PROFILE
> -	atomic_t	profile_count;
> -	int		(*profile_enable)(struct ftrace_event_call *);
> -	void		(*profile_disable)(struct ftrace_event_call *);
> -#endif
> +	atomic_t		profile_count;
> +	int			(*profile_enable)(struct ftrace_event_call *);
> +	void			(*profile_disable)(struct ftrace_event_call *);
>  };

Ah, I would have added ifdefs around the below bit.

> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 23d2972..e75276a 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -940,7 +940,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
>  		entry = trace_create_file("enable", 0644, call->dir, call,
>  					  enable);
>  
> -	if (call->id)
#ifdef CONFIG_EVENT_PROFILE
> +	if (call->id && call->profile_enable)
>  		entry = trace_create_file("id", 0444, call->dir, call,
>  					  id);
#endif

Like that, but I guess this works too ;-)

--
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