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: <87msjw2al8.fsf@linux.intel.com>
Date: Wed, 25 Sep 2024 05:15:31 -0700
From: Andi Kleen <ak@...ux.intel.com>
To: Levi Yun <yeoreum.yun@....com>
Cc: peterz@...radead.org,  mingo@...hat.com,  acme@...nel.org,
  namhyung@...nel.org,  mark.rutland@....com,
  alexander.shishkin@...ux.intel.com,  jolsa@...nel.org,
  irogers@...gle.com,  adrian.hunter@...el.com,  james.clark@...aro.org,
  howardchu95@...il.com,  nd@....com,  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