[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201019114319.1b699ffa@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Mon, 19 Oct 2020 11:43:19 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jia-Ju Bai <baijiaju1990@...il.com>
Cc: kvalo@...eaurora.org, davem@...emloft.net,
vaibhavgupta40@...il.com, christophe.jaillet@...adoo.fr,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtl8180: avoid accessing the data mapped to streaming
DMA
On Mon, 19 Oct 2020 10:54:20 +0800 Jia-Ju Bai wrote:
> + if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
> + if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
> + priv->seqno += 0x10;
> + hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
> + hdr->seq_ctrl |= cpu_to_le16(priv->seqno);
> + }
> +
> mapping = dma_map_single(&priv->pdev->dev, skb->data, skb->len,
> DMA_TO_DEVICE);
>
> @@ -534,13 +541,6 @@ static void rtl8180_tx(struct ieee80211_hw *dev,
>
> spin_lock_irqsave(&priv->lock, flags);
>
> - if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
> - if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
> - priv->seqno += 0x10;
You're taking the priv->seqno access and modification from under
priv->lock. Is that okay?
Powered by blists - more mailing lists