Linux wireless drivers development
 help / color / mirror / Atom feed
From: Jason Xing <kerneljasonxing@gmail.com>
To: nbd@nbd.name, lorenzo@kernel.org, ryder.lee@mediatek.com,
	shayne.chen@mediatek.com, sean.wang@mediatek.com,
	matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
	akpm@linux-foundation.org, axboe@kernel.dk
Cc: linux-wireless@vger.kernel.org, Jason Xing <kernelxing@tencent.com>
Subject: [PATCH 0/3] wifi: mt76: use __relay_write to avoid race issues.
Date: Sun, 31 May 2026 11:40:07 +0800	[thread overview]
Message-ID: <20260531034010.85002-1-kerneljasonxing@gmail.com> (raw)

From: Jason Xing <kernelxing@tencent.com>

__relay_reserve() that is even though efficient has a disadvantage:
it's not easy to prevent the writer and reader race conditions since
readers can read incorrect data just after the offset is advanced at
which point where no data or only partial data has been written into
relayfs.

---
The series is only complied. I came across this caller and spotted
the issue when developing relayfs.


Jason Xing (3):
  relayfs: introduce relay_subbuf_avail()
  wifi: mt76: mt7915: use relay_subbuf_avail() to fix stale fwlog reads
  wifi: mt76: mt7996: use relay_subbuf_avail() to fix stale fwlog reads

 .../wireless/mediatek/mt76/mt7915/debugfs.c   | 27 +++++++++----------
 .../wireless/mediatek/mt76/mt7996/debugfs.c   | 25 +++++++++--------
 include/linux/relay.h                         | 24 +++++++++++++++++
 3 files changed, 49 insertions(+), 27 deletions(-)

-- 
2.43.7


             reply	other threads:[~2026-05-31  3:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-31  3:40 Jason Xing [this message]
2026-05-31  3:40 ` [PATCH 1/3] relayfs: introduce relay_subbuf_avail() Jason Xing
2026-05-31  3:40 ` [PATCH 2/3] wifi: mt76: mt7915: use relay_subbuf_avail() to fix stale fwlog reads Jason Xing
2026-05-31  3:40 ` [PATCH 3/3] wifi: mt76: mt7996: " Jason Xing
2026-05-31  5:58 ` [PATCH 0/3] wifi: mt76: use __relay_write to avoid race issues Jason Xing

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=20260531034010.85002-1-kerneljasonxing@gmail.com \
    --to=kerneljasonxing@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=axboe@kernel.dk \
    --cc=kernelxing@tencent.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.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