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+530af6f1e5c230588975@syzkaller.appspotmail.com
Subject: Re: [PATCH] ring-buffer: Annotate the speculative iterator event copy
Date: Thu, 12 Nov 2026 05:49:27 -0500	[thread overview]
Message-ID: <20261112054927.4f80674c@fedora> (raw)
In-Reply-To: <20261111084201.80984-1-zhujun2@cmss.chinamobile.com>

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

> A non-consuming iterator can copy an event while the writer overwrites
> its page. The reader lock only excludes other readers, so KCSAN reports
> the memcpy() racing with event reservation.
> 
> The iterator already checks the page stamp and committed size after the
> copy and retries if the writer entered the page. Mark the speculative
> copy as an intentional race; only the validated private copy is used.
> 
> Fixes: 785888c544e0 ("ring-buffer: Have rb_iter_head_event() handle concurrent writer")

I agree with the change but this isn't a fix. It's just to hide a false
positive from KCSAN. You want to add a fixes tag, add the commit that
introduced KCSAN.

-- Steve

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  8:42 Zhu Jun
2026-11-12 10:49 ` 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=20261112054927.4f80674c@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+530af6f1e5c230588975@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®