* [PATCH v1] perf vdso: Missed put on 32-bit dsos
@ 2024-09-12 18:27 Ian Rogers
2024-09-12 19:15 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 6+ messages in thread
From: Ian Rogers @ 2024-09-12 18:27 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Kan Liang, linux-perf-users,
linux-kernel
If the dso type doesn't match then NULL is returned but the dso should
be put first.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/util/vdso.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index 1b6f8f6db7aa..c12f5d8c4bf6 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -308,8 +308,10 @@ static struct dso *machine__find_vdso(struct machine *machine,
if (!dso) {
dso = dsos__find(&machine->dsos, DSO__NAME_VDSO,
true);
- if (dso && dso_type != dso__type(dso, machine))
+ if (dso && dso_type != dso__type(dso, machine)) {
+ dso__put(dso);
dso = NULL;
+ }
}
break;
case DSO__TYPE_X32BIT:
--
2.46.0.662.g92d0881bb0-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vdso: Missed put on 32-bit dsos
2024-09-12 18:27 [PATCH v1] perf vdso: Missed put on 32-bit dsos Ian Rogers
@ 2024-09-12 19:15 ` Arnaldo Carvalho de Melo
2024-09-12 19:31 ` Ian Rogers
0 siblings, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-09-12 19:15 UTC (permalink / raw)
To: Ian Rogers
Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
linux-perf-users, linux-kernel
On Thu, Sep 12, 2024 at 11:27:57AM -0700, Ian Rogers wrote:
> If the dso type doesn't match then NULL is returned but the dso should
> be put first.
I guess we can add:
Fixes: f649ed80f3cabbf1 ("perf dsos: Tidy reference counting and locking")
?
- Arnaldo
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/util/vdso.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
> index 1b6f8f6db7aa..c12f5d8c4bf6 100644
> --- a/tools/perf/util/vdso.c
> +++ b/tools/perf/util/vdso.c
> @@ -308,8 +308,10 @@ static struct dso *machine__find_vdso(struct machine *machine,
> if (!dso) {
> dso = dsos__find(&machine->dsos, DSO__NAME_VDSO,
> true);
> - if (dso && dso_type != dso__type(dso, machine))
> + if (dso && dso_type != dso__type(dso, machine)) {
> + dso__put(dso);
> dso = NULL;
> + }
> }
> break;
> case DSO__TYPE_X32BIT:
> --
> 2.46.0.662.g92d0881bb0-goog
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vdso: Missed put on 32-bit dsos
2024-09-12 19:15 ` Arnaldo Carvalho de Melo
@ 2024-09-12 19:31 ` Ian Rogers
2024-09-23 19:01 ` Ian Rogers
0 siblings, 1 reply; 6+ messages in thread
From: Ian Rogers @ 2024-09-12 19:31 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
linux-perf-users, linux-kernel
On Thu, Sep 12, 2024 at 12:15 PM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> On Thu, Sep 12, 2024 at 11:27:57AM -0700, Ian Rogers wrote:
> > If the dso type doesn't match then NULL is returned but the dso should
> > be put first.
>
> I guess we can add:
>
> Fixes: f649ed80f3cabbf1 ("perf dsos: Tidy reference counting and locking")
>
> ?
Yep, that's the one that added the reference count increment.
Thanks,
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vdso: Missed put on 32-bit dsos
2024-09-12 19:31 ` Ian Rogers
@ 2024-09-23 19:01 ` Ian Rogers
2024-09-23 23:24 ` Namhyung Kim
0 siblings, 1 reply; 6+ messages in thread
From: Ian Rogers @ 2024-09-23 19:01 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
linux-perf-users, linux-kernel
On Thu, Sep 12, 2024 at 12:31 PM Ian Rogers <irogers@google.com> wrote:
>
> On Thu, Sep 12, 2024 at 12:15 PM Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> >
> > On Thu, Sep 12, 2024 at 11:27:57AM -0700, Ian Rogers wrote:
> > > If the dso type doesn't match then NULL is returned but the dso should
> > > be put first.
> >
> > I guess we can add:
> >
> > Fixes: f649ed80f3cabbf1 ("perf dsos: Tidy reference counting and locking")
> >
> > ?
>
> Yep, that's the one that added the reference count increment.
Noticed this isn't in the tree yet, do I need to resend for the fixes tag?
Thanks,
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vdso: Missed put on 32-bit dsos
2024-09-23 19:01 ` Ian Rogers
@ 2024-09-23 23:24 ` Namhyung Kim
2024-09-27 18:39 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 6+ messages in thread
From: Namhyung Kim @ 2024-09-23 23:24 UTC (permalink / raw)
To: Ian Rogers, Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Adrian Hunter, Kan Liang, linux-perf-users,
linux-kernel
On Mon, Sep 23, 2024 at 12:01:23PM -0700, Ian Rogers wrote:
> On Thu, Sep 12, 2024 at 12:31 PM Ian Rogers <irogers@google.com> wrote:
> >
> > On Thu, Sep 12, 2024 at 12:15 PM Arnaldo Carvalho de Melo
> > <acme@kernel.org> wrote:
> > >
> > > On Thu, Sep 12, 2024 at 11:27:57AM -0700, Ian Rogers wrote:
> > > > If the dso type doesn't match then NULL is returned but the dso should
> > > > be put first.
> > >
> > > I guess we can add:
> > >
> > > Fixes: f649ed80f3cabbf1 ("perf dsos: Tidy reference counting and locking")
> > >
> > > ?
> >
> > Yep, that's the one that added the reference count increment.
>
> Noticed this isn't in the tree yet, do I need to resend for the fixes tag?
Arnaldo, can you please pick this up to perf-tools?
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] perf vdso: Missed put on 32-bit dsos
2024-09-23 23:24 ` Namhyung Kim
@ 2024-09-27 18:39 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-09-27 18:39 UTC (permalink / raw)
To: Namhyung Kim
Cc: Ian Rogers, Peter Zijlstra, Ingo Molnar, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
linux-perf-users, linux-kernel
On Mon, Sep 23, 2024 at 04:24:23PM -0700, Namhyung Kim wrote:
> On Mon, Sep 23, 2024 at 12:01:23PM -0700, Ian Rogers wrote:
> > On Thu, Sep 12, 2024 at 12:31 PM Ian Rogers <irogers@google.com> wrote:
> > >
> > > On Thu, Sep 12, 2024 at 12:15 PM Arnaldo Carvalho de Melo
> > > <acme@kernel.org> wrote:
> > > >
> > > > On Thu, Sep 12, 2024 at 11:27:57AM -0700, Ian Rogers wrote:
> > > > > If the dso type doesn't match then NULL is returned but the dso should
> > > > > be put first.
> > > >
> > > > I guess we can add:
> > > >
> > > > Fixes: f649ed80f3cabbf1 ("perf dsos: Tidy reference counting and locking")
> > > >
> > > > ?
> > >
> > > Yep, that's the one that added the reference count increment.
> >
> > Noticed this isn't in the tree yet, do I need to resend for the fixes tag?
>
> Arnaldo, can you please pick this up to perf-tools?
Right, I just did that, b4 was nice enough to notice the Fixes tag I
suggested, its in my local branch, will push out soon.
- Arnaldo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-09-27 18:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12 18:27 [PATCH v1] perf vdso: Missed put on 32-bit dsos Ian Rogers
2024-09-12 19:15 ` Arnaldo Carvalho de Melo
2024-09-12 19:31 ` Ian Rogers
2024-09-23 19:01 ` Ian Rogers
2024-09-23 23:24 ` Namhyung Kim
2024-09-27 18:39 ` Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.