linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Benjamin Li <benl@squareup.com>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Loic Poulain <loic.poulain@linaro.org>,
	linux-arm-msm@vger.kernel.org, Benjamin Li <benl@squareup.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	"John W. Linville" <linville@tuxdriver.com>,
	Eugene Krasnikov <k.eugene.e@gmail.com>,
	wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wcn36xx: add proper DMA memory barriers in rx path
Date: Wed, 27 Oct 2021 07:44:26 +0000 (UTC)	[thread overview]
Message-ID: <163532066175.19793.9331674894554153079.kvalo@codeaurora.org> (raw)
In-Reply-To: <20211023001528.3077822-1-benl@squareup.com>

Benjamin Li <benl@squareup.com> wrote:

> This is essentially exactly following the dma_wmb()/dma_rmb() usage
> instructions in Documentation/memory-barriers.txt.
> 
> The theoretical races here are:
> 
> 1. DXE (the DMA Transfer Engine in the Wi-Fi subsystem) seeing the
> dxe->ctrl & WCN36xx_DXE_CTRL_VLD write before the dxe->dst_addr_l
> write, thus performing DMA into the wrong address.
> 
> 2. CPU reading dxe->dst_addr_l before DXE unsets dxe->ctrl &
> WCN36xx_DXE_CTRL_VLD. This should generally be harmless since DXE
> doesn't write dxe->dst_addr_l (no risk of freeing the wrong skb).
> 
> Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware")
> Signed-off-by: Benjamin Li <benl@squareup.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

9bfe38e064af wcn36xx: add proper DMA memory barriers in rx path

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211023001528.3077822-1-benl@squareup.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


      reply	other threads:[~2021-10-27  7:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23  0:15 [PATCH] wcn36xx: add proper DMA memory barriers in rx path Benjamin Li
2021-10-27  7:44 ` Kalle Valo [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=163532066175.19793.9331674894554153079.kvalo@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=benl@squareup.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=davem@davemloft.net \
    --cc=k.eugene.e@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=loic.poulain@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=wcn36xx@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).