Received: by 2002:a05:7412:1492:b0:e2:908c:2ebd with SMTP id s18csp592379rdh; Wed, 23 Aug 2023 09:03:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9s7vY2REMC2XwzfEiLLk2/BToaGYGh9IvuXycEt/E6rHcSHQ9c4s9HhZWOi9rh0LHTJbX X-Received: by 2002:a17:902:7797:b0:1b8:c1f:fd2c with SMTP id o23-20020a170902779700b001b80c1ffd2cmr9516795pll.33.1692806594696; Wed, 23 Aug 2023 09:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692806594; cv=none; d=google.com; s=arc-20160816; b=wdb3HC5FHZ2jwaSfDoo5t+S/rQs+BIFOCddDXvYLn1iWvmdXXQqtkzJS1dcSscRulq 2Tm+dqHDgvQnA6l/X7sBr81sJm5xhhXbGeCtC0a3MvhWxBdvfOI9P3zLN0dHeIdZUKBM P/xLWZMF1p7CE3HtxJzCLa9cJYmH+xscvxfcryQqR1Rb/uCh1qHSlWo1Uyz8Oby0B+qd bRtlEFhjotKN8toRUHM8ClWLPYji659xT1hdK8ntJYkI07Bsg/l2m5WrbLr87O4qnfr5 bvVMjVQiTwooImjeHFwD8ve1y9s8tccp7DMjJZ6ZP4fjLkBNHA7R5CozyC0COzc1GmY6 CFbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=bhtBtQZAv+ZsRtkcsd/r5Q/TcKACKnVBDT/uWJAJytY=; fh=4nj9aKQSZ3xj+LraIo7V2tRdhOhRZpMxZ+/SdATT73E=; b=EvWSpjoKIlrRIk3Fiwf506k6Q453z0i0IleAVYO8VBpNch5XDbxC1z3TaUQtqTbAPn 223pBl3w7ia8WKRrUSnkG1By9wM/f4GKP993U6Nfte/CJvCkFPXXEct/xPmSwsyo1psL YsGjDBcP4Wuj7+R2aactzHMNR1XhVXEHjXA0+VudW8jTqYNXvw5mQHN8PflNkF3fsO12 9s7yiC3v4kCuWdwyhWSp9yLOtwuSnwfhUFB+4ii0SdO+Q5KmCMTWqQIbQ7GG57d2NmK8 uRJ8pYsbM0zbfH5F8vZpzCWGq+c+AjpVbqTZX4byggs3nUqnH22UZsi2C07NxG2qXpJs yvyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C9mN4hJ1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a170903120f00b001bbdd44bbd4si12033081plh.74.2023.08.23.09.03.02; Wed, 23 Aug 2023 09:03:14 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C9mN4hJ1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234129AbjHWOSG (ORCPT + 55 others); Wed, 23 Aug 2023 10:18:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235020AbjHWOSF (ORCPT ); Wed, 23 Aug 2023 10:18:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C846E62 for ; Wed, 23 Aug 2023 07:18:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B89BF66308 for ; Wed, 23 Aug 2023 14:18:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C22CC433C7; Wed, 23 Aug 2023 14:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692800282; bh=GMdH5vkLU5RgLDl3GYq0LoKq9cbkTrF9yoz4tusx7m0=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=C9mN4hJ1z2zQIpWY5e8AYfKGxW5FAdoWlPG3nLWdVprvBHJ+yLIzvANk8qeXBGaqW WtNjOgPkmkjFgDsrbnA2Zfk7AEb9uW6uCup+e7mPGbP+kqY5/t9yYJUa5mytvQ6jG6 UenRPxQl/odyS544yGUuoUROTqYnqA0rZ9GbO3d18PvaN/jViTXGxJAJh/uwScD3jX tz9kY+5X1Yzjz2BWsIxS5rM1A9bcH7iH13SmG7jXpfl24ih2XbTY+8TsUfrRB+UG4+ xfH+JSQMrJ+T8+GEuXBoK2vgUfMuii8TUwwgYonfti19+iCfxNacy5ZdQO99Shr/X+ 5kztToDGRZIkQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: ath12k: Fix memory leak in rx_desc and tx_desc From: Kalle Valo In-Reply-To: <20230718053510.30894-1-quic_rajson@quicinc.com> References: <20230718053510.30894-1-quic_rajson@quicinc.com> To: Rajat Soni Cc: , , Rajat Soni User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169280027919.1336947.4721639851626095486.kvalo@kernel.org> Date: Wed, 23 Aug 2023 14:18:00 +0000 (UTC) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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-wireless@vger.kernel.org Rajat Soni wrote: > Currently when ath12k_dp_cc_desc_init() is called we allocate > memory to rx_descs and tx_descs. In ath12k_dp_cc_cleanup(), during > descriptor cleanup rx_descs and tx_descs memory is not freed. > > This is cause of memory leak. These allocated memory should be > freed in ath12k_dp_cc_cleanup. > > In ath12k_dp_cc_desc_init(), we can save base address of rx_descs > and tx_descs. In ath12k_dp_cc_cleanup(), we can free rx_descs and > tx_descs memory using their base address. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Rajat Soni > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. afb522b36e76 wifi: ath12k: Fix memory leak in rx_desc and tx_desc -- https://patchwork.kernel.org/project/linux-wireless/patch/20230718053510.30894-1-quic_rajson@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches