lkml.org 
[lkml]   [2021]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 412/530] mt76: mt7615: fix tx skb dma unmap
    Date
    From: Felix Fietkau <nbd@nbd.name>

    [ Upstream commit ebee7885bb12a8fe2c2f9bac87dbd87a05b645f9 ]

    The first pointer in the txp needs to be unmapped as well, otherwise it will
    leak DMA mapping entries

    Fixes: 27d5c528a7ca ("mt76: fix double DMA unmap of the first buffer on 7615/7915")
    Signed-off-by: Felix Fietkau <nbd@nbd.name>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
    index 8c66ad943b4d..f479012ab52c 100644
    --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
    +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
    @@ -688,7 +688,7 @@ mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp)
    {
    int i;

    - for (i = 1; i < txp->nbuf; i++)
    + for (i = 0; i < txp->nbuf; i++)
    dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]),
    le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
    }
    --
    2.30.2


    \
     
     \ /
      Last update: 2021-05-12 19:01    [W:5.370 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site