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:	Mon, 31 Oct 2011 12:14:59 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Ilya Dryomov <idryomov@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing: fix event_subsystem ref counting

On Mon, 2011-10-31 at 11:07 +0200, Ilya Dryomov wrote:
> Fix a bug introduced by e9dbfae5, which prevents event_subsystem from
> ever being released.
> 
> Ref_count was added to keep track of subsystem users, not for counting
> events.  Subsystem is created with ref_count = 1, so there is no need to
> increment it for every event, we have nr_events for that.  Fix this by
> touching ref_count only when we actually have a new user -
> subsystem_open().

Good catch, I'll pull this in.

Thanks!

-- Steve

> 
> Signed-off-by: Ilya Dryomov <idryomov@...il.com>
> ---
>  kernel/trace/trace_events.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 581876f..c212a7f 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -1078,7 +1078,6 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
>  	/* First see if we did not already create this dir */
>  	list_for_each_entry(system, &event_subsystems, list) {
>  		if (strcmp(system->name, name) == 0) {
> -			__get_system(system);
>  			system->nr_events++;
>  			return system->entry;
>  		}


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