From: Greg KH <gregkh@linuxfoundation.org>
To: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] tracing/timerlat: Move hrtimer_init to timerlat_fd open()
Date: Thu, 1 Feb 2024 10:05:59 -0800 [thread overview]
Message-ID: <2024020122-uncombed-moody-a96d@gregkh> (raw)
In-Reply-To: <05c12163-d348-4615-a9e3-f36787629e0e@kernel.org>
On Thu, Feb 01, 2024 at 05:02:56PM +0100, Daniel Bristot de Oliveira wrote:
> On 2/1/24 16:44, Greg KH wrote:
> > On Thu, Feb 01, 2024 at 04:13:39PM +0100, Daniel Bristot de Oliveira wrote:
> >> Currently, the timerlat's hrtimer is initialized at the first read of
> >> timerlat_fd, and destroyed at close(). It works, but it causes an error
> >> if the user program open() and close() the file without reading.
> >
> > What error exactly happens? Userspace, or the kernel crashes?
>
> sorry, kernel crash:
>
> # echo NO_OSNOISE_WORKLOAD > /sys/kernel/debug/tracing/osnoise/options
> # echo timerlat > /sys/kernel/debug/tracing/current_tracer
>
> # cat ./timerlat_load.py
> #!/usr/bin/env python3
>
> timerlat_fd = open("/sys/kernel/tracing/osnoise/per_cpu/cpu0/timerlat_fd", 'r')
> timerlat_fd.close();
>
> # ./taskset -c 0 ./timerlat_load.py
> <BOOM>
Then obviously, this is a real, functional, change, so say so in the
kernel changelog :)
thanks,
greg k-h
next prev parent reply other threads:[~2024-02-01 18:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 15:13 [PATCH] tracing/timerlat: Move hrtimer_init to timerlat_fd open() Daniel Bristot de Oliveira
2024-02-01 15:25 ` Steven Rostedt
2024-02-01 15:27 ` Daniel Bristot de Oliveira
2024-02-01 15:44 ` Greg KH
2024-02-01 16:02 ` Daniel Bristot de Oliveira
2024-02-01 16:10 ` Steven Rostedt
2024-02-01 18:05 ` Greg KH [this message]
2024-02-01 18:08 ` Steven Rostedt
2024-02-01 18:12 ` Greg KH
2024-02-01 18:24 ` 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=2024020122-uncombed-moody-a96d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=bristot@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).