Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 0/3] wifi: mt76: use __relay_write to avoid race issues.
@ 2026-05-31  3:40 Jason Xing
  2026-05-31  3:40 ` [PATCH 1/3] relayfs: introduce relay_subbuf_avail() Jason Xing
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jason Xing @ 2026-05-31  3:40 UTC (permalink / raw)
  To: nbd, lorenzo, ryder.lee, shayne.chen, sean.wang, matthias.bgg,
	angelogioacchino.delregno, akpm, axboe
  Cc: linux-wireless, Jason Xing

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-31  5:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-31  3:40 [PATCH 0/3] wifi: mt76: use __relay_write to avoid race issues Jason Xing
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox