Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Kim Wooseok <5mghybrid@khu.ac.kr>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Jes Sorensen <Jes.Sorensen@gmail.com>,
	Kalle Valo <kvalo@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH rtw-next] wifi: rtl8xxxu: isolate the USB register buffer from CPU state
Date: Tue, 13 Oct 2026 01:09:16 +0000	[thread overview]
Message-ID: <b45bced8a241448fbfbbc19bd5bdbb68@realtek.com> (raw)
In-Reply-To: <CAH1Bc_wUq2Nmhvd9q85JP+KyCYHB_xqStfmo6ZirOxOkXzAg9A@mail.gmail.com>

Kim Wooseok <5mghybrid@khu.ac.kr> wrote:
> 
> For example, suppose the buffer initially contains 10:
> 
> 1. Task A holds usb_buf_mutex and starts a USB register read.
> 2. Task B tries to acquire the same mutex and joins its wait list.
>    This can bring the shared cache line into the CPU cache, including
>    the old buffer value 10. Updating the list makes that line dirty.
> 3. The USB controller writes the new value 20 to RAM via DMA. Since
>    this DMA is not cache-coherent, the cached copy still contains 10.
> 4. If the dirty cache line is then written back, the old buffer value
>    10 can be written back along with the updated wait list, overwriting
>    the value 20 from DMA.

Thanks for the detail and this example, which is clear to me. :)

Ping-Ke



      reply	other threads:[~2026-10-13  1:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 22:39 [PATCH rtw-next] wifi: rtl8xxxu: isolate the USB register buffer Kim Wooseok via B4 Relay
2026-10-09 22:39 ` [PATCH rtw-next] wifi: rtl8xxxu: isolate the USB register buffer from CPU state Kim Wooseok via B4 Relay
2026-10-12  5:44   ` Ping-Ke Shih
2026-10-13  0:15     ` ‍김우석[학생](전자정보대학 전자공학과)
2026-10-13  0:44       ` Ping-Ke Shih
2026-10-13  0:58         ` Kim Wooseok
2026-10-13  1:09           ` Ping-Ke Shih [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=b45bced8a241448fbfbbc19bd5bdbb68@realtek.com \
    --to=pkshih@realtek.com \
    --cc=5mghybrid@khu.ac.kr \
    --cc=Jes.Sorensen@gmail.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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