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, 14 Jul 2014 18:15:25 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Tom Zanussi <tom.zanussi@...ux.intel.com>,
	"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/7] tracing: instance_rmdir() leaks
	ftrace_event_file->filter

On 07/14, Namhyung Kim wrote:
>
> > And could someone explain me why apply_subsystem_event_filter("0") clears
> > ->filter_string first, then the whole ->filter? It seems that the only
> > thing filter_free_subsystem_preds() should do is filter_disable(), no?
> > IOW, why the patch below (on top of this series) is wrong?
>
> I also think that the original code is bit strange.  I agree with your
> change and name of the function should be changed to something like
> 'filter_disable_subsystem_filters' IMHO (it does nothing with preds).
> With this change, the apply_subsystem_event_filter can simply do below:
>
> 	if (!strcmp(strstrip(filter_string), "0")) {
> 		filter_disable_subsystem_filters(system, tr);
> 		/* Ensure all filters are no longer used */
> 		synchronize_sched();
> 		filter_free_subsystem_filters(system, tr);
> 		__free_filter(system->filter);
> 		system->filter = NULL;
> 		goto out_unlock;
> 	}

Yes, thanks, this was my point.

And I thought that I saw the same pattern somewhere else, but can't recall
where... Will try to recheck.

Oleg.

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