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]
Message-ID: <20150422135657.GC1622@danjae.kornet>
Date:	Wed, 22 Apr 2015 22:56:57 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...hat.com>,
	Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH perf/core 5/8] perf probe: Allow to use filter on --del
 command

On Tue, Apr 21, 2015 at 08:42:06PM +0900, Masami Hiramatsu wrote:
> -int del_perf_probe_events(struct strlist *dellist)
> +int del_perf_probe_events(struct strfilter *filter)
>  {
> -	int ret = -1, ret2, ufd = -1, kfd = -1;
> -	char buf[128];
> -	const char *group, *event;
> -	char *p, *str;
> -	struct str_node *ent;
> +	int ret = 0, ufd = -1, kfd = -1;
>  	struct strlist *namelist = NULL, *unamelist = NULL;
> +	char *str = strfilter__string(filter);

You may want to check the return value here - or in the
strfilter__string() ?

Thanks,
Namhyung


> +
> +	pr_debug("Filter: \'%s\'\n", str);

[SNIP]
> +char *strfilter__string(struct strfilter *filter)
> +{
> +	int len;
> +	char *ret = NULL;
> +
> +	len = strfilter_node__sprint(filter->root, NULL);
> +	if (len < 0)
> +		return NULL;
> +
> +	ret = malloc(len + 1);

Here?

> +	strfilter_node__sprint(filter->root, ret);
> +
> +	return ret;
> +}
--
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