Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp316604qtb; Wed, 19 Oct 2022 02:44:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7+3KjMcpC/db0omFgtnxNXFnmCWTFmgRGGo4aw+CfeDjNR67ggy+3LmKh1rkdVawfaBgR2 X-Received: by 2002:a05:6402:191:b0:45c:83e8:d74a with SMTP id r17-20020a056402019100b0045c83e8d74amr6308199edv.329.1666172641461; Wed, 19 Oct 2022 02:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172641; cv=none; d=google.com; s=arc-20160816; b=DJ/0jQerLhO/ysmwRtuz3v7shFGkQvDQOR/ycnivjLHFjfHvjk9RUzkJAray2fkOUJ 9IecDvWKeq2oxPySvvI9nfYY11FAq4kJ+pYSkpo7UOxOnKKS8bQHYTnGUmlfbvu+BbO/ A2Bf9WEKE6Ovr2L4MPt7stpotnBvzDHyWWhu4sMEg+lZBY8q8ZTlwMU75Rlf9D0YqRHD crvgNFzwZ1c3q7i74JjQKuxYiYQibNb44G5MDvDc2rtBVBsDMvJ4+BXxVNEulrEHHf+m WEV9ZqwJVjoSmTEp7aGr7DF7qyIjI8b+wNtqAGXa01ZdzUDYDaFA3iX7QwrcKRhIOkKq m5wA== 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=LUt6br25yqJT0y4vTguy18zRcVgEnJo82l83DKnuIPE=; b=gcTH9jtH+w1RSbZj+VTCvgv7XsjwE+iohCZZs5pttcZpLMxihlfB8AGOwwAv8QqP7Y 80A9CqI79ohsdL9Fg5Hr1LY86nm3JtOLLyR0KJtUDBilb2aygZzDd6tOgD9E3mPpXMbj erkVRCJ094Wp6tnZI1Bt86W5mwB6ZRwGyGZrMy5Pg6uP9zl42mHCEUVTAjcVPGwn85F4 uD7M25vaB4BSH7pGrvFx1+st/gnr3leEoSGQl3utJxtc2k/mD0Kl2rM5wrHPmV2SzQ2D ksd6G/f2AMzkhDblJVDbcPaK117Rpzcfy6q0/+KFMK1yJtrnEqqLiKmDxH67hfMlwb3v fWqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vf87kxdG; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t11-20020a1709067c0b00b0078a3ef9f092si12056533ejo.998.2022.10.19.02.43.26; Wed, 19 Oct 2022 02:44:01 -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=Vf87kxdG; 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 S233776AbiJSJcT (ORCPT + 99 others); Wed, 19 Oct 2022 05:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiJSJ2c (ORCPT ); Wed, 19 Oct 2022 05:28:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6E2CE8ABA; Wed, 19 Oct 2022 02:12:30 -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 678D46183D; Wed, 19 Oct 2022 09:11:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79782C433D6; Wed, 19 Oct 2022 09:11:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170690; bh=qgniTSF+OJAJ5oQQqmSqvcCBvyeFINIUvqYDGmh5u6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vf87kxdGBGyDX1vfq1dtL0QQcHEu8tC8Ceg4xzIFPr6+SG/TAIkrsxSvZvuhk0LNo b4iaOlzZf4+QWJeFQYokHPFyHixbkiGAPxiEWrCP1l6K+eYuSFpeKL9RUHQxWWvN4N mO0cG/31MbrBmRpBKFxBN0TFBW/P8UkAW7uFiqqY= 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 6.0 706/862] wifi: rtw89: free unused skb to prevent memory leak Date: Wed, 19 Oct 2022 10:33:13 +0200 Message-Id: <20221019083321.171162167@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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 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 a5880a54812e..8b338e5ce364 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -872,6 +872,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; } -- 2.35.1