Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4631117pxj; Wed, 12 May 2021 09:37:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTDXJzR8OMo/XBP2tkxoIm1hjJyOenG9tADUG3ml4dB6ywcuN4zzFPVtVAaqmPM2k97Q/S X-Received: by 2002:a17:906:e10b:: with SMTP id gj11mr2031641ejb.202.1620837458067; Wed, 12 May 2021 09:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837458; cv=none; d=google.com; s=arc-20160816; b=Gxeaj6KP3fuWhzYr9PGPScfWDH/UoWTA81aGr3Gjb32kefHKUrehn7sIQZINFveDEH oljUJ2cxycJMHJAeq5clWv5fJDVYrmJN83qeqOtF9aarjQEH3uz1D7nW4NuFTTm2nn2z oZAmJLYHZp+IFUnMXApk5DNu82fgV1vyInsTmWEXXLG+Dc6dhlc/G/9/H+el8WTbuRQa NGTFuJ6NRZClig5LrXp7yK6FvI7ap0snxbMkqR0vdh180vfCY976IhWkqBUB2mcnCCXe SaBotWvuy822ubfkq4gGq4X8W2S91n9R1j9S8X/WBpGX6zNODiZxmL+pSTKOH9eSUzrU ij9w== 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=ptjYxq4kj7WMlGo9tHQkTo8HWSe/l7NkwIZGNKxkhh0=; b=RqKwbTCHWQ9pduJQqqzYP4LYU7rCXRBWhPfXne8p2b7tFvBPv/c4PN8Vwhms7ZsF/K PHkbKOocURu1Hioh+47yrZraO8FCznHk9Z2bRhwxBZTCNsgr1SkamgH0ZxccWNZOsWxS gks7W2ccc4QjUoDGKuIDAEQX3njYNk1X1jxjNDTI+ABNW3QVqXx3MMjfCzx2M03CsgM0 Xugn1oINGPq5TEFWLz7ksV+3/liWRHBslzLtpkZ/dgdMUsOjiHnYfJmmJlcVilJqFe0k Uvb3is2IdqlT1fKsz+QeK+vvZ5Pg3gwezgSXC6lN/hq0cNyzCTYRoZcPvtWPBVokPAGO cxaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GcGjpTqE; 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 s24si387673ejd.357.2021.05.12.09.37.11; Wed, 12 May 2021 09:37:38 -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=GcGjpTqE; 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 S242646AbhELQfT (ORCPT + 99 others); Wed, 12 May 2021 12:35:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:41108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233477AbhELPmy (ORCPT ); Wed, 12 May 2021 11:42:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D5ADA619A1; Wed, 12 May 2021 15:22:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832925; bh=LkWGr2rRHvEgmvScWiGg+bJIodcaQoaK49yILxuNnuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GcGjpTqEuhwH5obC0Zcn/bhhnVD4lEPARGqmQ+rG9UE51wRjFBgdWRUVuPlEHW0jV rcnUIpighoE9aJOJVY/teuIDy7M3S9unGU4CV4rChrRkiYz2EZlvQBKUzJXj2wK8Mj p1ChKnDwW0dKV7yZ043mW8z+RTbdoP8+xqHcruSE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ryder Lee , Felix Fietkau , Sasha Levin Subject: [PATCH 5.10 477/530] mt76: mt7615: fix memleak when mt7615_unregister_device() Date: Wed, 12 May 2021 16:49:47 +0200 Message-Id: <20210512144835.435825744@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: Ryder Lee [ Upstream commit 8ab31da7b89f71c4c2defcca989fab7b42f87d71 ] mt7615_tx_token_put() should get call before mt76_free_pending_txwi(). Fixes: a6275e934605 ("mt76: mt7615: reset token when mac_reset happens") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c b/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c index 7b81aef3684e..726e4781d9d9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c @@ -161,10 +161,9 @@ void mt7615_unregister_device(struct mt7615_dev *dev) mt76_unregister_device(&dev->mt76); if (mcu_running) mt7615_mcu_exit(dev); - mt7615_dma_cleanup(dev); mt7615_tx_token_put(dev); - + mt7615_dma_cleanup(dev); tasklet_disable(&dev->irq_tasklet); mt76_free_device(&dev->mt76); -- 2.30.2