From patchwork Sat Oct 22 07:27:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7760 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1119712wrr; Sat, 22 Oct 2022 02:23:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7YwiOkYE/sgu1TL9Qr5BSXTX4VU2BemukIFKYMBBVmjFsstud/TyFmyiEOx2ucTp7ulBst X-Received: by 2002:a17:90b:4b0e:b0:20d:213b:1083 with SMTP id lx14-20020a17090b4b0e00b0020d213b1083mr27633397pjb.208.1666430587602; Sat, 22 Oct 2022 02:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666430587; cv=none; d=google.com; s=arc-20160816; b=f9EUHs2/4Yw8t2WPeqA6l8a2+xNsJgQ+M3hRlvWNdyzaEFIRcD1bSbdDjCh2yV+TMY AZxSSAQNMniGNnYMiHtv8tHMNHkcOY7KejoA52KwS+K4d7Sbqv7/1tTVWtFuJn31O8gr EApqL/YAnrpqauhE4Bwi1Mds+9NVD+JG1C3ix6ukA4Jb64ndpZjNYwcSBVCJT3aZNB7Y 7SEn/FrbUJj91cN++tr44WhgdcL1Cfqt/0mGD5nT3qzPCGICXBSYJImtgh8grRyXrdQZ wSvPG6mCFn8v+FcXx8xJul1Sm75WEXj14P/sQK1ALFV4YtFbVSynrdQ2PoWQdbjam7JA OPjA== 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=HNPTUUbcVN8xpr3mQMlV0dH8r18nleYLAfNm5tNbk5A=; b=B3LQ8DDYo+kuT3XRrDefykkGfRF5vKV/Sod43PHD++w96w+SkYFkea6hGK3RcBWgaL 2PrXuwnN1lycX6m8gxRbX6mhWRH9VYyeCb5/dOvfu0NhM5hTEKdrYQNMCtl8e2y5oXLH 9dS1QkY2VCJAsz9Qv0sESVwm6iYTGVhAMk0amzpFgITswTVdzCF1xMkeMYTtNIYhgPng P5LfSzTX5DR3fQ5iFEoU7ueIl7NYUGqYdBws5UXl04CU/rtw84Looz+1UAi3M8Qlw454 BXtFK4d0AGDdHKdfJjllVYfYnWaCSLTZ/q/0Ywf0DOfFN+z/om/uNWH/SvE5Dy04PfMl iKRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KsukZKZy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i11-20020a170902cf0b00b0017f580f646fsi30918155plg.304.2022.10.22.02.22.54; Sat, 22 Oct 2022 02:23:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KsukZKZy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231597AbiJVI5g (ORCPT + 99 others); Sat, 22 Oct 2022 04:57:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231946AbiJVI4x (ORCPT ); Sat, 22 Oct 2022 04:56:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE1AE52FEC; Sat, 22 Oct 2022 01:14:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EA68B60B9F; Sat, 22 Oct 2022 08:01:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC221C433D6; Sat, 22 Oct 2022 08:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425677; bh=lhTMxcnaPY9F61jECeQTcv9FNk/rwyy5W+n0biYYB0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KsukZKZys/QHAuo5bmPIZQeyBZO8lE1sNYmUohsiQnoyKKB9Uzxh/f8tWNais2f7j h8rQP9l1pjRb6X/8Z970mma0n+fgf8NojTMHZ3lXRKnLEFdeBVq351mH2W/8Ftl8FP hoZWZOuqOl17sCYWtf0j+xYRiAcjzClhtPQ6hCxk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Po-Hao Huang , Ping-Ke Shih , Kalle Valo , Sasha Levin Subject: [PATCH 5.19 579/717] wifi: rtw89: free unused skb to prevent memory leak Date: Sat, 22 Oct 2022 09:27:38 +0200 Message-Id: <20221022072524.035796781@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747379119844932396?= X-GMAIL-MSGID: =?utf-8?q?1747379119844932396?= From: Po-Hao Huang [ Upstream commit eae672f386049146058b9e5d3d33e9e4af9dca1d ] This avoid potential memory leak under power saving mode. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220916033811.13862-6-pkshih@realtek.com Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtw89/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index a6a90572e74b..7313eb80fb1e 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -860,6 +860,7 @@ int rtw89_h2c_tx(struct rtw89_dev *rtwdev, rtw89_debug(rtwdev, RTW89_DBG_FW, "ignore h2c due to power is off with firmware state=%d\n", test_bit(RTW89_FLAG_FW_RDY, rtwdev->flags)); + dev_kfree_skb(skb); return 0; }