All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Takashi Iwai <tiwai@suse.de>,
	regressions@lists.linux.dev, linux-kernel@vger.kernel.org,
	postix@posteo.eu
Subject: Re: [REGRESSION 6.0.x / 6.1.x] NULL dereferencing at tracing
Date: Tue, 01 Nov 2022 09:21:41 +0100	[thread overview]
Message-ID: <871qqn84q2.wl-tiwai@suse.de> (raw)
In-Reply-To: <20221031144850.5522b036@rorschach.local.home>

On Mon, 31 Oct 2022 19:48:50 +0100,
Steven Rostedt wrote:
> 
> On Mon, 31 Oct 2022 08:11:28 +0100
> Takashi Iwai <tiwai@suse.de> wrote:
> 
> > Hi Steven,
> > 
> > we've got a bug report indicating the NULL dereference at the recent
> > tracing changes, showing at the start of KDE.  The details including
> > the dmesg are found at:
> >   https://bugzilla.opensuse.org/show_bug.cgi?id=1204705
> > 
> > It was reported at first for 6.0.3, and confirmed that the problem
> > persists with 6.1-rc, too.
> > 
> > The culprit seems to be the commit
> > f3ddb74ad0790030c9592229fb14d8c451f4e9a8
> >     tracing: Wake up ring buffer waiters on closing of the file
> > and reverting it seems fixing the problem.
> > 
> > Could you take a look?
> > 
> >
> 
> Can you apply this to see if it fixes it?
> 
> I'm guessing there's a path to the release of the file descriptor where
> the ring buffer isn't allocated (and this expected it to be).
> 
> I'll investigate further to see if I can find that path.

For avoiding confusion: the follow up post in this thread
  https://lore.kernel.org/71829e56-a13f-0462-37a7-a4d64c16f561@posteo.de
is from Alex, who is the original bug reporter on openSUSE Bugzilla.

The test result looks negative, unfortunately.


Takashi

> 
> -- Steve
> 
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index 199759c73519..c1c7ce4c6ddb 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -937,6 +937,9 @@ void ring_buffer_wake_waiters(struct trace_buffer *buffer, int cpu)
>  	struct ring_buffer_per_cpu *cpu_buffer;
>  	struct rb_irq_work *rbwork;
>  
> +	if (!buffer)
> +		return;
> +
>  	if (cpu == RING_BUFFER_ALL_CPUS) {
>  
>  		/* Wake up individual ones too. One level recursion */
> 

  reply	other threads:[~2022-11-01  8:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31  7:11 [REGRESSION 6.0.x / 6.1.x] NULL dereferencing at tracing Takashi Iwai
2022-10-31  8:29 ` Steven Noonan
2022-10-31  9:48 ` Steven Rostedt
2022-10-31  9:52   ` Takashi Iwai
2022-10-31 18:48 ` Steven Rostedt
2022-11-01  8:21   ` Takashi Iwai [this message]
2022-11-03 12:54 ` [REGRESSION 6.0.x / 6.1.x] NULL dereferencing at tracing #forregzbot Thorsten Leemhuis
     [not found] <e693eb6b-28d0-d091-3df3-60f2b591c0e7@posteo.de>
2022-10-31 20:47 ` Fwd: [REGRESSION 6.0.x / 6.1.x] NULL dereferencing at tracing postix
2022-11-02 15:57   ` postix
2022-11-02 16:03     ` Steven Rostedt
2022-11-02 16:36       ` postix
2022-11-02 16:39         ` 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=871qqn84q2.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=postix@posteo.eu \
    --cc=regressions@lists.linux.dev \
    --cc=rostedt@goodmis.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 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.