[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <163532066175.19793.9331674894554153079.kvalo@codeaurora.org>
Date: Wed, 27 Oct 2021 07:44:26 +0000 (UTC)
From: Kalle Valo <kvalo@...eaurora.org>
To: Benjamin Li <benl@...areup.com>
Cc: Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Loic Poulain <loic.poulain@...aro.org>,
linux-arm-msm@...r.kernel.org, Benjamin Li <benl@...areup.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
"John W. Linville" <linville@...driver.com>,
Eugene Krasnikov <k.eugene.e@...il.com>,
wcn36xx@...ts.infradead.org, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wcn36xx: add proper DMA memory barriers in rx path
Benjamin Li <benl@...areup.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@...areup.com>
> Signed-off-by: Kalle Valo <kvalo@...eaurora.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
Powered by blists - more mailing lists