public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Chunyu Hu <chuhu@redhat.com>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: Fix trace_pipe_raw read panic
Date: Mon, 24 Jul 2017 16:24:10 -0400	[thread overview]
Message-ID: <20170724162410.5932cb28@vmware.local.home> (raw)
In-Reply-To: <1500880866-1177-1-git-send-email-chuhu@redhat.com>


Hi Chunyu,

Thanks for the patch. I'm currently traveling, and will have little
time to test it. Hopefully I can get to it sometime this week.

-- Steve


On Mon, 24 Jul 2017 15:21:06 +0800
Chunyu Hu <chuhu@redhat.com> wrote:

> per_cpu trace directories and files are created for all possible cpus,
> but only the cpus which have ever been on-lined have their own per cpu
> ring buffer (allocated by cpuhp threads). While trace_buffers_open, the
> open handler for trace file 'trace_pipe_raw' is always trying to access
> field of ring_buffer_per_cpu, and would panic with the NULL pointer.
> 
> Align the behavior of trace_pipe_raw with trace_pipe, that returns -NODEV
> when openning it if that cpu does not have trace ring buffer.
> 
> Reproduce:
> cat /sys/kernel/debug/tracing/per_cpu/cpu31/trace_pipe_raw
> (cpu31 is never on-lined, this is a 16 cores x86_64 box)
> 
> Tested with:
> 1) boot with maxcpus=14, read trace_pipe_raw of cpu15.
>    Got -NODEV.
> 2) oneline cpu15, read trace_pipe_raw of cpu15.
>    Get the raw trace data.

  reply	other threads:[~2017-07-24 20:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24  7:21 [PATCH] tracing: Fix trace_pipe_raw read panic Chunyu Hu
2017-07-24 20:24 ` Steven Rostedt [this message]
2017-08-01 13:02   ` Chunyu Hu
2017-08-01 13:44     ` Steven Rostedt
2017-08-01 16:22 ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2017-07-24  9:02 Chunyu Hu
2017-08-02 11:03 Chunyu Hu
2017-08-02 18:17 ` Steven Rostedt

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=20170724162410.5932cb28@vmware.local.home \
    --to=rostedt@goodmis.org \
    --cc=chuhu@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /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