From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380945; b=qGptfqqwVcD00rJ8bdLKDOtdbI0lAzzUrKzz7SJJ1fmPumRSW9iQ9/J3IqwvOaavvSjh IvSm5VvPoScoAP1SMBHuBnuA/pTZSIplJC41RKm4sjJ6POWoOH96YlSjid2b6f/NupOrc 3lQw1iWvQr0sQeVAjQ6fDscXoFtPH2hoPqu+xqNV1GrN5w2EmW7Kh5AyGZPnvQ0FOGzZa yhkfzkRUOVlJndmi2JWqfhCF9YNhP4kq9E/dGK7GRgd4ofWRTs+xlsM209oKgC0SD5w54 rZqWdIVfRBFsitUf6z8h4l03vzO36bfD6lT2vR2zArDxt3e2JFU4yYP7al5MowlAkKA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380945; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=0rjnAfeZRrzcfKfZKeHZu6ry+Q5TeqHfNf66k9w6b9A=; b=LT7xwBUPjSBqlAcJPkQlHvsuI0HHiALvJCAHUb1UnN4okfM75L5sskYc+5u8UfaUf954 pUypp9MC9Mx8HO8zhd9raWCqxlqK78d8ZX9LWcNFFXpdsjT7TEObfsvXjJEkCnarub5RX 20LbQ+8uxSl1aC7NBOFnKxTTlj/M0nlsfKWuMn3rlV16kXrMC5paOvKkCdCXTJxfCr82K M9UDhd23MYTEXIlKIiRLoBYqklLQEURArgsRTAqXsLCSexMoQjImY/ME2DmSBa6N8juj3 w78Cl++cIxsYtRpKjDQADEGAi4lTQDdgHHQ3JHtAizTWexrYNUVCaRQf/8dEnFF3rEg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="ip1Dpcb/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B49FE606A68E; Fri, 4 Dec 2026 10:42:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ip1Dpcb/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B0A31F00897; Fri, 4 Dec 2026 10:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380945; bh=0rjnAfeZRrzcfKfZKeHZu6ry+Q5TeqHfNf66k9w6b9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ip1Dpcb/Bt39RbmJYjat9AoX1P6FeKmSPTZT3F3eTFoNnOLyke3deJCralF5Oqw1D xLXt05JNIpwLB7gCriY7K2VLi7fxi7LEvVwEm1Q+5LKe2Fr3//hp5pSXgWLUyUgowj SEALTiOjEGsD2NED3mcJRrS/Bm712xxanTUQbkXc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xuanqiang Luo , Jedrzej Jagielski , Aleksandr Loktionov , Tony Nguyen , Jakub Kicinski Subject: [PATCH 7.3 493/742] iavf: fix ASQ command buffer leak on init failure Date: Fri, 4 Dec 2026 19:05:57 +0900 Message-ID: <20261204100648.233744223@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xuanqiang Luo commit 2a1f106379a90ce7ac63f96a57c241a4cf20a983 upstream. iavf_alloc_adminq_asq_ring() allocates cmd_buf before the remaining ASQ resources. If iavf_alloc_asq_bufs() or iavf_config_asq_regs() fails, the unwind path elides cmd_buf while freeing the other allocations. The ASQ count is not set until initialization succeeds, so the shutdown path cannot reclaim the buffer. Free cmd_buf in the common unwind path. Fixes: d358aa9a7a2d ("i40evf: init code and hardware support") Cc: stable@vger.kernel.org Signed-off-by: Xuanqiang Luo Reviewed-by: Jedrzej Jagielski Reviewed-by: Aleksandr Loktionov Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20261113004602.129864-6-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/intel/iavf/iavf_adminq.c +++ b/drivers/net/ethernet/intel/iavf/iavf_adminq.c @@ -60,6 +60,7 @@ static enum iavf_status iavf_alloc_admin **/ static void iavf_free_adminq_asq(struct iavf_hw *hw) { + iavf_free_virt_mem(hw, &hw->aq.asq.cmd_buf); iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf); }