mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: He Kuang <hekuang@huawei.com>
Cc: a.p.zijlstra@chello.nl, mingo@redhat.com, namhyung@kernel.org,
	jolsa@kernel.org, wangnan0@huawei.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf buildid-list: Fix segfault when show DSOs with hits
Date: Fri, 10 Apr 2015 09:51:21 -0300	[thread overview]
Message-ID: <20150410125121.GD4521@kernel.org> (raw)
In-Reply-To: <1428658500-6483-1-git-send-email-hekuang@huawei.com>

Em Fri, Apr 10, 2015 at 05:35:00PM +0800, He Kuang escreveu:
> commit: f3b623b8490a ("perf tools: Reference count struct thread")
> appends every thread->node to dead_threads in machine__remove_thread()
> and list_del_init() this node in thread__put().
> 
> perf_event__exit_del_thread() releases thread wihout using
> machine__remove_thread(), and causes a NULL pointer crash when
> list_del_init(&thread->node) is called. Fix this by using
> machine_remove_thread() instead of using thread__put() directly.
> 
> This problem can be reproduced as following:
> 
>   $ perf record ls
>   $ perf buildid-list --with-hits
>   [ 3874.195070] perf[1018]: segfault at 0 ip 00000000004b0b15 sp
>   00007ffc35b44780 error 6 in perf[400000+166000]
>   Segmentation fault
> 
> After this patch:
>   $ perf record ls
>   $ perf buildid-list --with-hits
>   bc23e7c3281e542650ba4324421d6acf78f4c23e /proc/kcore
>   643324cb0e969f30c56d660f167f84a150845511 [vdso]
>   0000000000000000000000000000000000000000 /bin/busybox
>   ...

Thanks, applied.

- Arnaldo

  reply	other threads:[~2015-04-10 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10  9:35 He Kuang
2015-04-10 12:51 ` Arnaldo Carvalho de Melo [this message]
2015-04-11  6:37 ` [tip:perf/core] " tip-bot for He Kuang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150410125121.GD4521@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome