From patchwork Fri Jun 1 11:25:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10443209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C251B603D7 for ; Fri, 1 Jun 2018 12:23:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0B0428C40 for ; Fri, 1 Jun 2018 12:23:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2E7628D8D; Fri, 1 Jun 2018 12:23:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0964428C40 for ; Fri, 1 Jun 2018 12:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=VBpbpG1CJRjkcTbM78D2+ie/b9iz8WuVzzZYiENDCUE=; b=GJR8d5nfMchMOe JDMw9bw3PPmz7IG4WwNeIGoeA4pOobTFoREPDj7m+TaZk3BWV8axiaqTrlKGn9GFblcBa7PYvf4rk 1LOqrK7EKVKppA7HQd20jH9pyKM2CL+znSpn4n2SSNNimh2TglsKflCdL7HKREm8Zyv3pq46yLuZU kyrWt3onJzy3xcWhwqxwya7PkS/8wG2WD9GvDUWtrcysOLQd2dy+riTLqmVXo/3Vy5o0GFDLnsXyn rwJ+/fLMlZ1tkeSP4hXWw+fAnmcoIhEjIw0AaUsWsH/WkO03/7JQNjPMBQK8qFR30gaf8FkLnsbV1 0dcK8UWs9k8UxM8tgKOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOj59-0001pQ-PS; Fri, 01 Jun 2018 12:22:59 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOio9-0005uq-Su for ath10k@bombadil.infradead.org; Fri, 01 Jun 2018 12:05:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:Message-ID: Date:Subject:CC:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tpFM4JOptcunHrCpDQf+wsTGqNAL2kaiMBy7wUKIXR4=; b=ZwbdQ0VysJqFgcyqZ2HSESNJ5V YZ3slbCZ0JFMYovvC897nzsc0o/Rm+ZCPuUzI7nNfwfb6iRGLv0jlNh6Vqe43k1hojEpdjtlcRqp1 1QOc6hvYXeN/FIr51rXCIatab3VV9YGbA7wyhwDhbR1qGwxYhHeze8mHvZ02kWb0FQVuijjcxtZZN 15Y9S04m4JB0c1l+EtTQIu1fwAmna2RgvWkeJcaEOqhLBl/Dk39dmDWOKIdTAU5BLG45sfuosftHh 4z9qX/UoDxIZJTpYRxMHDVFKgO2CyP2LRd9WGRnyI5n0SrZ2/bzdoJvG3eFbcq/YCgZR3Skt/jT2b GoHX/1yA==; Received: from [45.249.212.35] (helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOiCT-0000Za-Go for ath10k@lists.infradead.org; Fri, 01 Jun 2018 11:26:30 +0000 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C04F1A33878D2; Fri, 1 Jun 2018 19:26:06 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.382.0; Fri, 1 Jun 2018 19:25:58 +0800 From: YueHaibing To: , Subject: [PATCH v2] ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64 Date: Fri, 1 Jun 2018 19:25:48 +0800 Message-ID: <20180601112548.22592-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180601_072629_814743_B4ED79F1 X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, YueHaibing , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP sizeof(struct ce_desc) should be a copy-paste mistake just use sizeof(struct ce_desc_64) to avoid mem leak Fixes: b7ba83f7c414 ("ath10k: add support for shadow register for WNC3990") Signed-off-by: YueHaibing --- drivers/net/wireless/ath/ath10k/ce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index 3b96a43..35dec2a 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c @@ -1512,7 +1512,7 @@ ath10k_ce_alloc_src_ring_64(struct ath10k *ar, unsigned int ce_id, ret = ath10k_ce_alloc_shadow_base(ar, src_ring, nentries); if (ret) { dma_free_coherent(ar->dev, - (nentries * sizeof(struct ce_desc) + + (nentries * sizeof(struct ce_desc_64) + CE_DESC_RING_ALIGN), src_ring->base_addr_owner_space_unaligned, base_addr);