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: <YPCR3idcrZV0Zifh@kernel.org>
Date:   Thu, 15 Jul 2021 16:51:58 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Riccardo Mancini <rickyman7@...il.com>
Cc:     Kan Liang <kan.liang@...el.com>, Ian Rogers <irogers@...gle.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Jiri Olsa <jolsa@...hat.com>, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 03/20] perf test: session_topology: delete session->evlist

Em Thu, Jul 15, 2021 at 06:07:08PM +0200, Riccardo Mancini escreveu:
> ASan reports a memory leak related to session->evlist while running
> the perf test "41: Session topology".
> 
> When perf_data is in write mode, session->evlist is owned by the
> caller, which should also take care of deleting it.
> 
> This patch adds the missing evlist__delete.

Thanks, applied.

- Arnaldo

 
> Signed-off-by: Riccardo Mancini <rickyman7@...il.com>
> ---
>  tools/perf/tests/topology.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c
> index ec4e3b21b8311f57..b5efe675b321746e 100644
> --- a/tools/perf/tests/topology.c
> +++ b/tools/perf/tests/topology.c
> @@ -61,6 +61,7 @@ static int session_write_header(char *path)
>  	TEST_ASSERT_VAL("failed to write header",
>  			!perf_session__write_header(session, session->evlist, data.file.fd, true));
>  
> +	evlist__delete(session->evlist);
>  	perf_session__delete(session);
>  
>  	return 0;
> -- 
> 2.31.1
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ