Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp996869pxb; Tue, 8 Feb 2022 07:08:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyuDZPvCVLoHODFXaps1E3xtatmNBGdBHoNAUhkWXnxYjfwlt+lL/YnTaaDMZ3Cu0ZvNlS X-Received: by 2002:a17:90b:4c91:: with SMTP id my17mr1866841pjb.121.1644332933997; Tue, 08 Feb 2022 07:08:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644332933; cv=none; d=google.com; s=arc-20160816; b=JB1sfZ1IxM6S3msGkQw/5p/vQEHVmtteLl0MS8eN5jBXfHi2w60E7wDw/tOMn1UoBs E49XrjrkQZuLV8Vy9ZDtg2srYxbrnOFZW/i050++kxMSkSyCL7Fow+4TcvO38OGvqLT0 jWQ5Ockk2L2bK72DfeOhFaSRDeGT0bvZ4k9hQo1AMu9/VSMLIX8sBdEGVa/OfSbu9Oui z2N3FiicmMPCZIJWtUe2/BNzOECR5iYaPBStempeXmFkJlwsfQaJx35DzMUFauh/ZwRY ifrlwixOiIxkxoiLEQuOEw6I7XE61oK8He4N44ET/bXf/UIhtKSYULfG2mL1JSa59IK/ fr/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=zFLmwJZRLH1HRNEBDcdiTMdL/f+lY2pat/iBv4OLjgQ=; b=xPMTvcVSi/t+WODrPLa17xZYA05T3rMZzUtaihXKcNIF7QtXHEmBiaizzN+FiZGqHS obuDyh3ZLCE3Aew0ErtRhupL6DK30wxHKh1+Dks4h0JPtAiq8FyeXSInpCLa3Ehljd8N RlJzGsjy6+MCY3I7p/U0lRd2Qk23zRZby02XCtjibQil4M3vw8PEOoUU69c7Gw80vLDw X5IU41rFmw41OPy2e9HMFm+BDGOB2WafygsiHumGcmNapA7xC2/T30OCtYa5hB3Hx1U2 hAVJQTWNOhSaoM3gTMs305rYOW4UTsULWfrZB3D31ENWgJZh8a3fXngw0qpmMvuryUd3 5mFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j24si2463129pjl.80.2022.02.08.07.08.36; Tue, 08 Feb 2022 07:08:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351339AbiBHNQ1 (ORCPT + 72 others); Tue, 8 Feb 2022 08:16:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343863AbiBHNNM (ORCPT ); Tue, 8 Feb 2022 08:13:12 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D121C03FECE for ; Tue, 8 Feb 2022 05:13:05 -0800 (PST) X-UUID: 3d4237f4fb6a41c0a4c2fea028b2ed56-20220208 X-UUID: 3d4237f4fb6a41c0a4c2fea028b2ed56-20220208 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 84911052; Tue, 08 Feb 2022 21:12:59 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Tue, 8 Feb 2022 21:12:58 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 8 Feb 2022 21:12:58 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , "Evelyn Tsai" , linux-mediatek , Shayne Chen Subject: [PATCH] mt76: mt7915: fix potential memory leak of fw monitor packets Date: Tue, 8 Feb 2022 21:12:30 +0800 Message-ID: <20220208131230.26417-1-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,MAY_BE_FORGED, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Free the skb of fw monitor packets. Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c index 3c38031..5646b9d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c @@ -1717,6 +1717,7 @@ void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q, break; case PKT_TYPE_RX_FW_MONITOR: mt7915_debugfs_rx_fw_monitor(dev, skb->data, skb->len); + dev_kfree_skb(skb); break; case PKT_TYPE_NORMAL: if (!mt7915_mac_fill_rx(dev, skb)) { -- 2.25.1