Patch "perf dso: Fix build when libunwind is enabled" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    perf dso: Fix build when libunwind is enabled

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-dso-fix-build-when-libunwind-is-enabled.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a9024f61bd165d0d6785844a62db3acbbfcde8af
Author: James Clark <james.clark@xxxxxxxxxx>
Date:   Mon Jul 15 10:47:13 2024 +0100

    perf dso: Fix build when libunwind is enabled
    
    [ Upstream commit 92717bc077892d1ce60fee07aee3a33f33909b85 ]
    
    Now that symsrc_filename is always accessed through an accessor, we also
    need a free() function for it to avoid the following compilation error:
    
      util/unwind-libunwind-local.c:416:12: error: lvalue required as unary
        ‘&’ operand
      416 |      zfree(&dso__symsrc_filename(dso));
    
    Fixes: 1553419c3c10 ("perf dso: Fix address sanitizer build")
    Signed-off-by: James Clark <james.clark@xxxxxxxxxx>
    Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
    Tested-by: Leo Yan <leo.yan@xxxxxxx>
    Tested-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
    Cc: Yunseong Kim <yskelg@xxxxxxxxx>
    Cc: Athira Rajeev <atrajeev@xxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240715094715.3914813-1-james.clark@xxxxxxxxxx
    Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 2340c4f6d0c24..67414944f2457 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -1501,7 +1501,7 @@ void dso__delete(struct dso *dso)
 	auxtrace_cache__free(RC_CHK_ACCESS(dso)->auxtrace_cache);
 	dso_cache__free(dso);
 	dso__free_a2l(dso);
-	zfree(&RC_CHK_ACCESS(dso)->symsrc_filename);
+	dso__free_symsrc_filename(dso);
 	nsinfo__zput(RC_CHK_ACCESS(dso)->nsinfo);
 	mutex_destroy(dso__lock(dso));
 	RC_CHK_FREE(dso);
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index 878c1f441868b..ed0068251c655 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -602,6 +602,11 @@ static inline void dso__set_symsrc_filename(struct dso *dso, char *val)
 	RC_CHK_ACCESS(dso)->symsrc_filename = val;
 }
 
+static inline void dso__free_symsrc_filename(struct dso *dso)
+{
+	zfree(&RC_CHK_ACCESS(dso)->symsrc_filename);
+}
+
 static inline enum dso_binary_type dso__symtab_type(const struct dso *dso)
 {
 	return RC_CHK_ACCESS(dso)->symtab_type;
diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 5c073d815ba2b..7460bb96bd225 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -408,7 +408,7 @@ static int read_unwind_spec_debug_frame(struct dso *dso,
 							__func__,
 							dso__symsrc_filename(dso),
 							debuglink);
-					zfree(&dso__symsrc_filename(dso));
+					dso__free_symsrc_filename(dso);
 				}
 				dso__set_symsrc_filename(dso, debuglink);
 			} else {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux