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: <20190815125116.GG30356@krava>
Date:   Thu, 15 Aug 2019 14:51:16 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Mamatha Inamdar <mamatha4@...ux.vnet.ibm.com>
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        namhyung@...nel.org, kstewart@...uxfoundation.org,
        gregkh@...uxfoundation.org, jeremie.galarneau@...icios.com,
        shawn@....icu, tstoyanov@...are.com, tglx@...utronix.de,
        alexey.budankov@...ux.intel.com, adrian.hunter@...el.com,
        songliubraving@...com, ravi.bangoria@...ux.ibm.com
Subject: Re: [PATCH]Perf: Return error code for perf_session__new function on
 failure

On Wed, Aug 14, 2019 at 03:02:18PM +0530, Mamatha Inamdar wrote:

SNIP

>  		symbol_conf.pid_list_str = strdup(trace->opts.target.pid);
> diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
> index ddbcd59..dbc6dc2 100644
> --- a/tools/perf/util/data-convert-bt.c
> +++ b/tools/perf/util/data-convert-bt.c
> @@ -1619,8 +1619,10 @@ int bt_convert__perf2ctf(const char *input, const char *path,
>  	err = -1;
>  	/* perf.data session */
>  	session = perf_session__new(&data, 0, &c.tool);
> -	if (!session)
> +	if (IS_ERR(session)) {
> +		err = PTR_ERR(session);
>  		goto free_writer;
> +	}
>  
>  	if (c.queue_size) {
>  		ordered_events__set_alloc_size(&session->ordered_events,

I'm getting:

  CC       util/data-convert-bt.o
util/data-convert-bt.c: In function ‘bt_convert__perf2ctf’:
util/data-convert-bt.c:1622:6: error: implicit declaration of function ‘IS_ERR’; did you mean ‘SIG_ERR’? [-Werror=implicit-function-declaration]
 1622 |  if (IS_ERR(session)) {
      |      ^~~~~~
      |      SIG_ERR
util/data-convert-bt.c:1622:6: error: nested extern declaration of ‘IS_ERR’ [-Werror=nested-externs]
util/data-convert-bt.c:1623:9: error: implicit declaration of function ‘PTR_ERR’ [-Werror=implicit-function-declaration]
 1623 |   err = PTR_ERR(session);


jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ