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=1796389300; b=ppWtK3OvdcHoLYEcSWXxGHv/Ab7HQnjbK9aVWnnTgnmjLgc1ZWH0AHP1jyImi6GlEaZH KPVqtCNRxzpQJxuFnry1buayYPhZnovu1Qyzc6L/ScE+b89Sd4MbddXyo9HbnSc4OW9Gd lUMIzES+sJYxaw5eUyUzc/UT7gFbbYUxkC1XOxXKRKafW+I4GLgL0Vs9yUmb/Zvttdgfn yu6zIrvIlHjEl0CfrpONKwq5rVjAFdokduJPlYqDb5b5P4Qx9xLwOpM3l/Sv0a+F66a2F IbKEatO11DTbU1sTAvIAji2hYwhZPpCGjgshb6TVg4Yf55yLkdSbCqnKAA2z0m9OO5w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796389300; 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=37DqxH8KQS7+rZQyAbFYo41bhIUjiVUdbRIyyIKE+hU=; b=KqgDRMXFz5xlg/seomOdA/ZavDVl9n3AswNLFl2C7/D0ZTJ5JuJ+B0D/o1KAq16DOxN3 rOjciVEGuM38S2p2qkA/5F0ZboXoWK89tugTr4LeKr5SEURpEPKd1b2ePFsmKeytnw3fU LB5+1t+YmEnUViLgYhM7xMGh22RJAktcEAlB5LSuGnRPgDUhT1MFhVfSBaOfw3TVDZ+4K SD5E4Ibb1logr21nQUZTZUrx7LeNJk0U4C8r+b+Tpj45i5Hwgh1VIaXRj8affXRFNdLk8 Zv8C7UZJ9ULmqoAEfPsfivasuMXgO3LZlvHjYQu4EyWTyhtqZjpZv3F0mJAal4PrWaA== 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=Ca7E2nwL; 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 8CA4B606A322; Fri, 4 Dec 2026 13:01:40 +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=Ca7E2nwL Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB6101F000C2; Fri, 4 Dec 2026 13:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796389300; bh=37DqxH8KQS7+rZQyAbFYo41bhIUjiVUdbRIyyIKE+hU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ca7E2nwLcTswRA4xikuPnjulYCrysUKG1q0p7z9oPY9tVH3GQhOIXz0taVYc/uMU2 NRy0AG4jepTksuQiKMhkBQIw+EGl/hwfksgef53m/FWSv/L80cWIgTlZ8SN7Dnjl2G seVYBcTJLMU7XF7OqzeygH9LmZmTIunaC7JGdkkY= 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 6.1 0941/1059] iavf: fix ASQ command buffer leak on init failure Date: Fri, 4 Dec 2026 19:07:52 +0900 Message-ID: <20261204100708.400016621@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@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 6.1-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 @@ -81,6 +81,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); }