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:	Sat, 08 Aug 2009 11:04:07 -0500
From:	Tom Zanussi <tzanussi@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Li Zefan <lizf@...fujitsu.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [2.6.31 PATCH] tracing/filters: always free pred on
 filter_add_subsystem_pred() failure

On Sat, 2009-08-08 at 18:02 +0200, Ingo Molnar wrote:
> * Tom Zanussi <tzanussi@...il.com> wrote:
> 
> > If filter_add_subsystem_pred() fails due to ENOSPC or ENOMEM, the 
> > pred doesn't get freed, while as a side effect it does for other 
> > errors. Make it so the caller always frees the pred for any error.
> 
> thanks, i've queued this up for .31.
> 
> Just to make sure: tracing/core has the filter code changed 
> substantially, and this issue seems to be moot there - correct?
> 

Right, the subsystem preds are gone in tip, so nothing to fix there.

> So the total impact from both patches on -tip is the patch below - 
> right?
> 

Right.

Tom

> 	Ingo
> 
> diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
> index 27c2dbe..490337a 100644
> --- a/kernel/trace/trace_events_filter.c
> +++ b/kernel/trace/trace_events_filter.c
> @@ -1050,6 +1050,8 @@ static int replace_preds(struct event_subsystem *system,
>  
>  		pred = create_pred(elt->op, operand1, operand2);
>  add_pred:
> +		if (!pred)
> +			return -ENOMEM;
>  		if (call)
>  			err = filter_add_pred(ps, call, pred, false);
>  		else

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