mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Zhu Jun <zhujun2@cmss.chinamobile.com>
Cc: vdonnefort@google.com, mhiramat@kernel.org,
	mathieu.desnoyers@efficios.com,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzbot+53ab168fdda7fba508ba@syzkaller.appspotmail.com
Subject: Re: [PATCH] ring-buffer: Mark concurrent accesses to waiter flags
Date: Thu, 12 Nov 2026 05:45:42 -0500	[thread overview]
Message-ID: <20261112054542.63b29e3d@fedora> (raw)
In-Reply-To: <20261111084137.80941-1-zhujun2@cmss.chinamobile.com>

On Wed, 11 Nov 2026 16:41:37 +0800
Zhu Jun <zhujun2@cmss.chinamobile.com> wrote:

> Poll and wait paths set the pending waiter flags while ring buffer
> writers test and clear them without a common lock. The irq_work callback
> also accesses the full-buffer wakeup flags concurrently. These plain
> accesses cause KCSAN reports.
> 
> Use READ_ONCE() and WRITE_ONCE() for the shared waiter and wakeup flags.
> Keep the existing barriers and irq_work wakeup protocol unchanged.
> 
> Fixes: 15693458c4bc ("tracing/ring-buffer: Move poll wake ups into ring buffer code")
> Fixes: 1e0d6714aceb ("ring-buffer: Do not wake up a splice waiter when page is not full")
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>

Is this simply to prevent read/write tearing?

-- Steve

      reply	other threads:[~2026-11-12 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  8:41 Zhu Jun
2026-11-12 10:45 ` Steven Rostedt [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=20261112054542.63b29e3d@fedora \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=syzbot+53ab168fdda7fba508ba@syzkaller.appspotmail.com \
    --cc=vdonnefort@google.com \
    --cc=zhujun2@cmss.chinamobile.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

all inboxes | Powered by JetHome®