Re: [PATCH v5 1/2] perf stat: Close cork_fd when create_perf_stat_counter() failed
From: Andi Kleen
Date: Wed Sep 25 2024 - 10:29:13 EST
On Wed, Sep 25, 2024 at 12:40:44PM +0000, Yeo Reum Yun wrote:
> 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?
Yes please.
-Andi