summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorPrasanna Kumar T S M <ptsm@linux.microsoft.com>2026-07-24 02:27:12 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-31 14:21:20 +0200
commit6f4acc3a3c300e174e3f586b97b04ed8f5948c36 (patch)
tree2bc4f9ca43382779c79cbebda3a0a4ccc6f7b0d6 /tools/perf/scripts/python/bin/stackcollapse-report
parent63d436b42395d714c3a1c55e0c42733a26673460 (diff)
cdx: Fix double free when sysfs file creation fails
In cdx_create_res_attr(), if sysfs_create_bin_file() fails, the code frees res_attr but doesn't set cdx_dev->res_attr[num] to NULL. This leaves a dangling pointer in the array. Then cdx_destroy_res_attr() frees the already-freed memory. Fix the double free by initializing cdx_dev->res_attr[num] after sysfs_create_bin_file() completes. Fixes: aeda33ab8160 ("cdx: create sysfs bin files for cdx resources") Cc: stable@vger.kernel.org Signed-off-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com> Acked-by: Nikhil Agarwal <Nikhil.agarwal@amd.com> Acked-by: Nipun Gupta <nipun.gupta@amd.com> Link: https://patch.msgid.link/20260724092712.2119149-1-ptsm@linux.microsoft.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions