From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Wang Nan <wangnan0@huawei.com>
Cc: a.p.zijlstra@chello.nl, paulus@samba.org0, dsahern@gmail.com,
jolsa@kernel.org, mingo@redhat.com, lizefan@huawei.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: top: fix a segfault when kernel map is restricted.
Date: Wed, 29 Apr 2015 19:12:03 -0300 [thread overview]
Message-ID: <20150429221203.GD29633@kernel.org> (raw)
In-Reply-To: <1429918529-225417-1-git-send-email-wangnan0@huawei.com>
Em Fri, Apr 24, 2015 at 11:35:29PM +0000, Wang Nan escreveu:
> Perf top raise a warning if a kernel sample is collected but kernel map
> is restricted. The warning message needs to dereference al.map->dso...
> However, previous perf_event__preprocess_sample() doesn't always
> guarantee al.map != NULL, for example, when kernel map is restricted.
>
> This patch validates al.map before dereferencing, avoid the segfault.
>
> Before this patch:
>
> $ cat /proc/sys/kernel/kptr_restrict
> 1
> $ perf top -p 120183
Thanks, applied.
- Arnaldo
prev parent reply other threads:[~2015-05-04 20:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 23:35 [PATCH] perf: top: fix a segfault when kernel map is restricted Wang Nan
2015-04-29 22:12 ` Arnaldo Carvalho de Melo [this message]
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=20150429221203.GD29633@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@redhat.com \
--cc=paulus@samba.org0 \
--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