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:
 <GV1PR08MB10521644365A907A4301AABE9FB692@GV1PR08MB10521.eurprd08.prod.outlook.com>
Date: Wed, 25 Sep 2024 12:40:44 +0000
From: Yeo Reum Yun <YeoReum.Yun@....com>
To: Andi Kleen <ak@...ux.intel.com>
CC: "peterz@...radead.org" <peterz@...radead.org>, "mingo@...hat.com"
	<mingo@...hat.com>, "acme@...nel.org" <acme@...nel.org>,
	"namhyung@...nel.org" <namhyung@...nel.org>, Mark Rutland
	<Mark.Rutland@....com>, "alexander.shishkin@...ux.intel.com"
	<alexander.shishkin@...ux.intel.com>, "jolsa@...nel.org" <jolsa@...nel.org>,
	"irogers@...gle.com" <irogers@...gle.com>, "adrian.hunter@...el.com"
	<adrian.hunter@...el.com>, "james.clark@...aro.org" <james.clark@...aro.org>,
	"howardchu95@...il.com" <howardchu95@...il.com>, nd <nd@....com>,
	"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 1/2] perf stat: Close cork_fd when
 create_perf_stat_counter() failed

Hi Andi,

> Technically 0 is a valid file descriptor. Check for >= 0

Right. However, when I see the event, evlist__start_workload(),
it checks cork_fd with

    if (evlist->workload.cork_fd > 0) {

Would you like to change this with this patchset too?

Thanks.

________________________________________
From: Andi Kleen <ak@...ux.intel.com>
Sent: 25 September 2024 13:15
To: Yeo Reum Yun
Cc: peterz@...radead.org; mingo@...hat.com; acme@...nel.org; namhyung@...nel.org; Mark Rutland; alexander.shishkin@...ux.intel.com; jolsa@...nel.org; irogers@...gle.com; adrian.hunter@...el.com; james.clark@...aro.org; howardchu95@...il.com; nd; linux-perf-users@...r.kernel.org; linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/2] perf stat: Close cork_fd when create_perf_stat_counter() failed

Levi Yun <yeoreum.yun@....com> writes:
> +void evlist__cancel_workload(struct evlist *evlist)
> +{
> +     int status;
> +
> +     if (evlist->workload.cork_fd > 0) {

Technically 0 is a valid file descriptor. Check for >= 0
And make sure the field is initialized with -1

The rest looks fine to me.

Reviewed-by: Andi Kleen <ak@...ux.intel.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ