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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 52CDCC44501 for ; Wed, 15 Jul 2026 09:41:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id EFD40406AF; Wed, 15 Jul 2026 09:41:16 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Hzm3mm0yOVku; Wed, 15 Jul 2026 09:41:15 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 27F7F4065F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1784108475; bh=9pLf70bhIsBjYYAuXnkUf9IaSpfzFW1UY6uqtiFu0Cc=; h=Date:To:Cc:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AR6FPDhXyMcTCusoFyoz4uRu+JCjeqXHL/h/lihjFN7Y+x/abzLuanmstoplMYFZp q97tSAkg+XqJq5Vny86lO2Okdst+mux06oMTm9IweSeBXY72v0ctYgS5y+VBZQuQ/l UIdbL8SIpuo38kq07APOB2vPecXt3ujURyJi0QnL+E/hvMKQ6FkuHF+KS+Wbk+Ha4j 4EGQYKMaC16iulQsK95VlNRLEIvNYe+kME/1FOMd/PtbS23fZXr6gqpfsA9AFmYJXZ SgUJqCyBZDlhrrhvRN6N6fu8uOQT8/f7SWsZKvorxlIYHiGXS+86TfVep8GUHVGxuP 9ovwgzpcJA8Mg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 27F7F4065F; Wed, 15 Jul 2026 09:41:15 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id 95F7D150 for ; Wed, 15 Jul 2026 09:41:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 872A580D84 for ; Wed, 15 Jul 2026 09:41:13 +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 aQevNNZ5sAj7 for ; Wed, 15 Jul 2026 09:41:09 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=91.218.175.181; helo=out-181.mta0.migadu.com; envelope-from=xuanqiang.luo@linux.dev; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org E3AD780D83 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E3AD780D83 Received: from out-181.mta0.migadu.com (out-181.mta0.migadu.com [91.218.175.181]) by smtp1.osuosl.org (Postfix) with ESMTPS id E3AD780D83 for ; Wed, 15 Jul 2026 09:41:07 +0000 (UTC) Message-ID: Date: Wed, 15 Jul 2026 17:40:01 +0800 MIME-Version: 1.0 To: "Jagielski, Jedrzej" , "Nguyen, Anthony L" , "Kitszel, Przemyslaw" , "intel-wired-lan@lists.osuosl.org" Cc: Andrew Lunn , Mitch Williams , Greg Rose , Sudheer Mogilappagari , "netdev@vger.kernel.org" , Xuanqiang Luo , "stable@vger.kernel.org" References: <20260715082548.56687-1-xuanqiang.luo@linux.dev> <20260715082548.56687-2-xuanqiang.luo@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: luoxuanqiang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784108461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9pLf70bhIsBjYYAuXnkUf9IaSpfzFW1UY6uqtiFu0Cc=; b=pishA9GCA8WBAZW7KVKBT0Ofny9G+wF+WswAd6T6SRV3HSSZjsheVlF3H3Te2smds2jHX7 d/3Irf3H7Z+CbcsQkijkkvpR7n9cEU4Yig7ZGAITVMkmWtTTqnY6hmhogBKQQB+hmZqOLT wZr6Gu+f84lxn/AB67o0IehsNJdxmPI= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=pishA9GC Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2 1/2] iavf: fix ASQ command buffer leak on init failure X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 在 2026/7/15 17:28, Jagielski, Jedrzej 写道: > From: xuanqiang.luo@linux.dev > Sent: Wednesday, July 15, 2026 10:26 AM > >> From: Xuanqiang Luo >> >> 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 >> --- >> drivers/net/ethernet/intel/iavf/iavf_adminq.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/net/ethernet/intel/iavf/iavf_adminq.c b/drivers/net/ethernet/intel/iavf/iavf_adminq.c >> index 6937b7dd44cbb..40f76f9507f4b 100644 >> --- 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_adminq_arq_ring(struct iavf_hw *hw) >> **/ >> 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); >> } >> >> -- >> 2.43.0 > Looks fine, thanks! > > Reviewed-by: Jedrzej Jagielski > > One note for the future - please be aware that there is minimal time period to be > waited before resubmitting new patch revision, which is at least 24h for netdev/IWL > mailing lists Thanks for the reminder! I also received a notification from netdev-bot, and I'll keep this in mind for future revisions.