From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3239FC3DA49 for ; Fri, 26 Jul 2024 16:16:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D469260B5F; Fri, 26 Jul 2024 16:16:19 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ByZ2uBcG14yU; Fri, 26 Jul 2024 16:16:19 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 286DC60B4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1722010579; bh=LpfgQFpcqMHLpK0fEQfo7SYtgWjDyoqvR5GmEIMr5jc=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=t3anXKCk8XwePMOUZgZ7luHoBTXYJYrEA0tH34kRyfgmTi9PUy4rDq1sS3cB9paWp blGXX24141jmrErzau6GqzPDefnIJtDkcJDjobxxePTtvpd9HCTwiaBmFId9bQdqyl wM0VTMnX/b9zQo/sg2ZtygyYNVx5FagT5GHptCvaP+liCFk9zXQkXPKi9DDX4FxR5+ jfU6xvXyiUkDDwVT+9FCTxbOOxQ2qztUch0gy5C+W6KkOwBqN6+HXe3v17lvx0lGcd OTF8T36QWOltIdp0C76ndJoZt5F+Xif9utMzpYxeJAW+dqrgbbGYGPXxaAE7Hzsoiq iibKwGmME+PJA== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 286DC60B4C; Fri, 26 Jul 2024 16:16:19 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D77CD1BF860 for ; Fri, 26 Jul 2024 16:16:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C50A581BCB for ; Fri, 26 Jul 2024 16:16:17 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id xYlWNCWxF_F6 for ; Fri, 26 Jul 2024 16:16:17 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=145.40.73.55; helo=sin.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org F340A81BC5 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org F340A81BC5 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by smtp1.osuosl.org (Postfix) with ESMTPS id F340A81BC5 for ; Fri, 26 Jul 2024 16:16:16 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 18E98CE17F2; Fri, 26 Jul 2024 16:16:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA0E0C32782; Fri, 26 Jul 2024 16:16:10 +0000 (UTC) Date: Fri, 26 Jul 2024 17:16:08 +0100 From: Simon Horman To: Alexander Lobakin Message-ID: <20240726161608.GP97837@kernel.org> References: <20240724134024.2182959-1-aleksander.lobakin@intel.com> <20240724134024.2182959-3-aleksander.lobakin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240724134024.2182959-3-aleksander.lobakin@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722010573; bh=mmDA6t4TSfv6XfSHaXGCVVdLxR4aF+if9zRvtYtDxRg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E1HHs12NDKpbhf4p86zXpkSAO/96o5WYqB5HlLNm0Zufa8wVTM5AI/u+WLGSw2BQD q0E7dcQrDpJzqN9vNkH2sheyuf24FsI+kzPgcHvUtVNHjNBgtuqMpTh0Ls2uEVUKav RsZCZzS6dvVfdPDaFnAQy4SJyIG2nqc0aYRCukS70R9GosAXANpQtHIlGvY1qOpYZB OAOuq9XUMyzCfseTYKcgBv6W7DMHJxjy+Lnh/imQrFJADpd7YJ0kTnc3Na/ixOocay /U+QGSo5KPmx8agXha/z2552m1D6PaYMkIgA+4OJNfC5sJ/hJf7FiwdZj5ElpycKzi HGxxlAiXcZeBQ== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=E1HHs12N Subject: Re: [Intel-wired-lan] [PATCH iwl-net 2/3] idpf: fix memleak in vport interrupt configuration X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pavan Kumar Linga , nex.sw.ncis.osdt.itp.upstreaming@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Eric Dumazet , Michal Kubiak , Tony Nguyen , Jakub Kicinski , intel-wired-lan@lists.osuosl.org, Paolo Abeni , "David S. Miller" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, Jul 24, 2024 at 03:40:23PM +0200, Alexander Lobakin wrote: > From: Michal Kubiak > > The initialization of vport interrupt consists of two functions: > 1) idpf_vport_intr_init() where a generic configuration is done > 2) idpf_vport_intr_req_irq() where the irq for each q_vector is > requested. > > The first function used to create a base name for each interrupt using > "kasprintf()" call. Unfortunately, although that call allocated memory > for a text buffer, that memory was never released. > > Fix this by removing creating the interrupt base name in 1). > Instead, always create a full interrupt name in the function 2), because > there is no need to create a base name separately, considering that the > function 2) is never called out of idpf_vport_intr_init() context. > > Fixes: d4d558718266 ("idpf: initialize interrupts and enable vport") > Cc: stable@vger.kernel.org # 6.7 > Signed-off-by: Michal Kubiak > Reviewed-by: Pavan Kumar Linga > Signed-off-by: Alexander Lobakin Reviewed-by: Simon Horman From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87F4A23759; Fri, 26 Jul 2024 16:16:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722010573; cv=none; b=tNFgFUyvmkj/SNnEtAj7DKgRlCgdgAKSYDlqnfag3nm4C9pYYBxcKJ8Fwsn5kySeSWahGPYHneXxwBEcUbwIMrVwfTN7nEMw1FwaJFgvZJ+f3rtU0lkAAgYrVfnzufuX0t4+zFpBDKUchfh15dlN774g2lgJiNBZKuL42Ks2TOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722010573; c=relaxed/simple; bh=mmDA6t4TSfv6XfSHaXGCVVdLxR4aF+if9zRvtYtDxRg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pbBAOk6COtP9K3WSDXBUjaPjhnljssxlT1PkUqmg4zlmSouDO1tBiAq2P0y5Prq4hp2kh8jDZ/zU69KPvvnux0govTqWyjiquzQ/f0sPx2Ok2VI0p/z2TyV8vvA3+Y41vDbO537KTPGt2oAPKTcpje26DKeBumYV62sTi5xJ6Ss= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=E1HHs12N; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="E1HHs12N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA0E0C32782; Fri, 26 Jul 2024 16:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722010573; bh=mmDA6t4TSfv6XfSHaXGCVVdLxR4aF+if9zRvtYtDxRg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E1HHs12NDKpbhf4p86zXpkSAO/96o5WYqB5HlLNm0Zufa8wVTM5AI/u+WLGSw2BQD q0E7dcQrDpJzqN9vNkH2sheyuf24FsI+kzPgcHvUtVNHjNBgtuqMpTh0Ls2uEVUKav RsZCZzS6dvVfdPDaFnAQy4SJyIG2nqc0aYRCukS70R9GosAXANpQtHIlGvY1qOpYZB OAOuq9XUMyzCfseTYKcgBv6W7DMHJxjy+Lnh/imQrFJADpd7YJ0kTnc3Na/ixOocay /U+QGSo5KPmx8agXha/z2552m1D6PaYMkIgA+4OJNfC5sJ/hJf7FiwdZj5ElpycKzi HGxxlAiXcZeBQ== Date: Fri, 26 Jul 2024 17:16:08 +0100 From: Simon Horman To: Alexander Lobakin Cc: intel-wired-lan@lists.osuosl.org, Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , nex.sw.ncis.osdt.itp.upstreaming@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Kubiak , stable@vger.kernel.org, Pavan Kumar Linga Subject: Re: [PATCH iwl-net 2/3] idpf: fix memleak in vport interrupt configuration Message-ID: <20240726161608.GP97837@kernel.org> References: <20240724134024.2182959-1-aleksander.lobakin@intel.com> <20240724134024.2182959-3-aleksander.lobakin@intel.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240724134024.2182959-3-aleksander.lobakin@intel.com> On Wed, Jul 24, 2024 at 03:40:23PM +0200, Alexander Lobakin wrote: > From: Michal Kubiak > > The initialization of vport interrupt consists of two functions: > 1) idpf_vport_intr_init() where a generic configuration is done > 2) idpf_vport_intr_req_irq() where the irq for each q_vector is > requested. > > The first function used to create a base name for each interrupt using > "kasprintf()" call. Unfortunately, although that call allocated memory > for a text buffer, that memory was never released. > > Fix this by removing creating the interrupt base name in 1). > Instead, always create a full interrupt name in the function 2), because > there is no need to create a base name separately, considering that the > function 2) is never called out of idpf_vport_intr_init() context. > > Fixes: d4d558718266 ("idpf: initialize interrupts and enable vport") > Cc: stable@vger.kernel.org # 6.7 > Signed-off-by: Michal Kubiak > Reviewed-by: Pavan Kumar Linga > Signed-off-by: Alexander Lobakin Reviewed-by: Simon Horman