]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "perf test: Don't leak workload gopipe in PERF_RECORD_*"
authorNiko Mauno <niko.mauno@vaisala.com>
Thu, 23 Oct 2025 07:51:01 +0000 (10:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:03:09 +0000 (14:03 +0100)
This reverts commit b7e5c59f3b0971f56ebbceb9d42cc45e9ac1cd94 which is
commit 48918cacefd226af44373e914e63304927c0e7dc upstream.

Commit in question broke building perf followingly with v5.15.195:

  | ld: perf-in.o: in function `test__PERF_RECORD':
  | tools/perf/tests/perf-record.c:142: undefined reference to `evlist__cancel_workload'

The 'evlist__cancel_workload' seems to be introduced in
commit e880a70f8046 ("perf stat: Close cork_fd when create_perf_stat_counter() failed")
which is currently not included in the 5.15 stable series.

Fixes: b7e5c59f3b09 ("perf test: Don't leak workload gopipe in PERF_RECORD_*")
Cc: stable@vger.kernel.org # 5.15
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/perf/tests/perf-record.c

index b215e89b65f7d84669f1d724ea7bdbfa6aa53e8e..0df471bf1590ee22a1706a9c0720d135db163f5e 100644 (file)
@@ -115,7 +115,6 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
        if (err < 0) {
                pr_debug("sched__get_first_possible_cpu: %s\n",
                         str_error_r(errno, sbuf, sizeof(sbuf)));
-               evlist__cancel_workload(evlist);
                goto out_delete_evlist;
        }
 
@@ -127,7 +126,6 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
        if (sched_setaffinity(evlist->workload.pid, cpu_mask_size, &cpu_mask) < 0) {
                pr_debug("sched_setaffinity: %s\n",
                         str_error_r(errno, sbuf, sizeof(sbuf)));
-               evlist__cancel_workload(evlist);
                goto out_delete_evlist;
        }
 
@@ -139,7 +137,6 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
        if (err < 0) {
                pr_debug("perf_evlist__open: %s\n",
                         str_error_r(errno, sbuf, sizeof(sbuf)));
-               evlist__cancel_workload(evlist);
                goto out_delete_evlist;
        }
 
@@ -152,7 +149,6 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
        if (err < 0) {
                pr_debug("evlist__mmap: %s\n",
                         str_error_r(errno, sbuf, sizeof(sbuf)));
-               evlist__cancel_workload(evlist);
                goto out_delete_evlist;
        }