Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4630082pxj; Wed, 12 May 2021 09:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh7CULR0yVWbvJhI3Q9YyqZNo8pDuDmQ6FXWaVpt0HMpfukmsKfmoAfkOY1INVpSQP0Lhh X-Received: by 2002:a05:6830:15d2:: with SMTP id j18mr31634862otr.89.1620837380579; Wed, 12 May 2021 09:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837380; cv=none; d=google.com; s=arc-20160816; b=Qq/Z+cMwULTjSIiz1J8pIg2vluRnUr1gXIaw2wzTl0maUj5E1+eZp3/cXO5o87vIfc 4rtQCjD6zY0GsoKviCwk9vwlr5Fu9xfUpUe54MQjKK7YyLUI/71q3Fdd7H4lXqqUDY2O 8sDyUJwHk9t1g4aFwp8mH4FZ3w9KEKs+FEBqPpQuKUMFht5ITXrGXeDwbgRS6lBHZaxw VrXI1uEwCS/9V3OmoYq47Qxl9IAIgPqyAogND4nX+gKtgdVRYC663w0lx3MwNruDgZGL RV7xatCXlqjfSBOyAtz7bbT0H/ygaiY69o7wp0HjiFmlt8YsvsVfcKgVK3GagflrDay7 024A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YHK52B+XWW4983wdj9VWcsVN2dzr41zQppU08gyhB4s=; b=wNKhgJiejHX5lHfrOHCDYHuhpPu6Z7LVbVylyYDhBb4TmiaWuAwgHuQkEIaCaHduVv ZjHHBg8rmpuYXtuRLzeF05mJ8oFTPONLLGgn2NA5xiyopeP46jFtPzL/0DcWagafDQO6 W7bJMXTVn2FwP86vXsVEAOnhetk7dGkb+rUV/oKB972cUy5kOsVGeqX5TccBr0Ro2Qb+ K3T7gLG4KG9y1cC9XYZpZ/7XcE6ca0aOfx9lyrh3js7t2ZxIo1BbDWmqWUjoPyY3+OYO FrnA8fizHIbaRnimrimVpa7vc5mV0Lv2VK0INBpcGyut11HeoM9QdnlOPmEUg4y168r5 3e9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QdpNhxN0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y77si424731oia.83.2021.05.12.09.36.06; Wed, 12 May 2021 09:36:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QdpNhxN0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241799AbhELQau (ORCPT + 99 others); Wed, 12 May 2021 12:30:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:56692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234314AbhELPjZ (ORCPT ); Wed, 12 May 2021 11:39:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 09F166199D; Wed, 12 May 2021 15:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832844; bh=LEaZT3EiD4UMYxzYaA95qpiTWHa5aj373qv2v1yWGGw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QdpNhxN046l56h1HIEk9c6/w4h2C8ov1G37bcLxMyqg0WBL4ZI980EPZDX/fxmWrY PF1xxVfkW+QnaPfQKHYSXeratjWKoMcVpX7QLUmCTOM0em35AUTVE5y6N5dCmEspPl hPiW7btsD6Rr9a2ezRzSLyEmQwckpfS+JgFQDH8A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felix Fietkau , Sasha Levin Subject: [PATCH 5.10 412/530] mt76: mt7615: fix tx skb dma unmap Date: Wed, 12 May 2021 16:48:42 +0200 Message-Id: <20210512144833.302509577@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Felix Fietkau [ 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 Signed-off-by: Sasha Levin --- 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