Skip to content

wifi: mt76: use __relay_write to avoid race issues.

Jason Xing linux-wireless 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3relayfs: introduce relay_subbuf_avail()include/linux/relay.h+24 -00 replies
2/3wifi: mt76: mt7915: use relay_subbuf_avail() to fix stale fwlog readsdrivers/net/wireless/mediatek/mt76/mt7915/debugfs.c+13 -140 replies
3/3wifi: mt76: mt7996: use relay_subbuf_avail() to fix stale fwlog readsdrivers/net/wireless/mediatek/mt76/mt7996/debugfs.c+12 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] wifi: mt76: use __relay_write to avoid race issues.

From: Jason Xing <[email protected]>

__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(-)
Signature · 1 line
2.43.7