From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 073BE3BCD0A for ; Thu, 30 Jul 2026 09:40:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785404424; cv=none; b=H7Td1g7iQpzSNmaYaHgJwEaZU6EWQ/CEt/yJmNzeR7NM1IgUfSw1xIHPh7dsMwnSHJ1NPXbNUFN+YH/A+ozoG1sRumYE9UAuvCbNyucgvhf5ZTqouQu76uY5/y/JSWszJ7KYw62nrWIuXxdFlYJsdQTcdJ4RusOYD4e4skboFL8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785404424; c=relaxed/simple; bh=Ck//C12qcsTvf62Tmetpp/Nn8MrhL2ZrnyrPfA9mmLU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CkWfu1fiE9NMnexdVhBsE+copljX5tVRZSXVs8rnjnzgh7vgjZZT0Mri9qzXjJI06asApnkfLOxRhCEbOlUvh/jG6aqxFP+5zSb6ppeOMXzgwCPKmp4dvck1xF8Nbk3NoysPwonFYc4cOkcbbMXfbLNWVtS5NrfW3mPf5YXwni8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=bXUIdCHC; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=X88UAO9D; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="bXUIdCHC"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="X88UAO9D" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66U9KiMe577454 for ; Thu, 30 Jul 2026 09:40:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= SLtB7ZyF+St8HvEQIEPSXQokiGSbSWKZ1j1xEWjE5uw=; b=bXUIdCHCloInmJzK D0RLBMyh5Un81bUrPpV9xp7qOQIT7jsaZ92rqktWj5yUxQkungApBwCZTkyizrHr v7MqZvwKOryuilb+H1NwtD8C438Km2BtzyMApw++2TzQzr9qGPHkOlSFxFNZ8zRO e2ZabGc9XX/wA3JHtly9RHIiYn7FkWmrc7EWFCO//zf4IFkZfBWHKg8Ohw1uq8zT ZgTcBmw7XSElvqh940rZJyuwS/ig/O7TJ/IjnOlozJdiKs7+g8bsqy8zSvLT32FF jxLbiScrVQnKtF8i+8beb7/Moe0n8jJd8E3MGQYiBHiX8v0XooV37HcRO/XtWePN 9OFBWA== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fr3w6036c-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Jul 2026 09:40:22 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2cca5e0a0c9so36038695ad.1 for ; Thu, 30 Jul 2026 02:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785404417; x=1786009217; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=SLtB7ZyF+St8HvEQIEPSXQokiGSbSWKZ1j1xEWjE5uw=; b=X88UAO9D3T8xu6HZ7WebRxyqqynRzgCW7tx6Le1ofK/ViChQPOjoMu4YNxTmop6r54 SBT6TitA/aSImAqPyDbK3Zx+WeXgV9FD2EKrOcr/kqwool7sX6WHnkJqQ/d8wYnrnwPZ iwyCPxp21Nr/X1E49kmv4HSNeDnxNvNDo0RXbBQ8T66WFyhPd+kfwHzIHdXop4CbIQHo zL7Astz0Ya/rKwjrlLh2PZkp48A/K6bt+wp9xN0LTFPB6BkXx/bqB0QZVcNpa1sM7JNf hV8T9nfXY/AcMiMMLj0blH0tRLFvXHoAgegJ2TpOt1IAN5TTnsYSbbAlIyQIyCHEK0Px bWvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785404417; x=1786009217; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SLtB7ZyF+St8HvEQIEPSXQokiGSbSWKZ1j1xEWjE5uw=; b=YbB48jSszDTLMKm0kgD9XDuJohTNGFQGPMG5xQe1u8v6ZKbrQJrWmV8t6HyZLSi94x wcsyMHZKSgZbfnaKX5zSjbK0QnId+GXi0fpYdjdYlNbxV3pEPLBSOvbPoHz4VeYcMuY8 2nWcWfppWOZ+Gk3g2Ph8g4t9ulHoAryBKg9EU1pT66AC0IDRt2mOeDAC5g51Oi4kHtF9 3cfbiNTfUag2aL4BE9itnBnZaRH089EvA29QHsdU/6unRwO5Abd/vUAj1CoTh8iAg+MB zkoK3hnUVTKK/x8/ar479fruUkz08lc54zoK8tek7JWHZp5CqF1PpSpm+K0EcDqgwunt K22g== X-Forwarded-Encrypted: i=1; AHgh+RoToST99l5ptMZY2hiVsuWYBH9Wr5XPxH2sylzOjFs4luSBXIHQYwbddnfdHBitJZKFE3mCixQk/kdSOEM=@vger.kernel.org X-Gm-Message-State: AOJu0YxHFrLR2AJ3BBSs2l75L6s04wIrHdU5Q6iOSXfhb8QCVPm1NF7n In6KWnn11WwkpbSXXbndW66ApWeI6gM2GN8m0IEN78swnujCvBiBOa7K25L1VUCj+Hq7WmhsA0C xHJgqtZJ44APOf33SsHvgPk8HFLKkEH/pp4fqDcML5TjwRFUlJqI2/tC1GHtMe59mQKs= X-Gm-Gg: AR+sD13jR5zKVGo0naGLjswZv1ynGVeivyiFWogFRQ6apqhTO7GFOZrzX0Bm2bG8ILn +7ekJOiG7n4LQXJIHf/FWctUnkulT5ffXskv+lx35XaHRuQj11fJkiMxh9vaZz0W/B+RT9im0Rz HdRG2XN2Wp63/ArYl+2n5c7xm3XN2hFWITuz5VlBXf3w6Ei6ip3sTLmVxcHqXRN/GACRE/AczFd ce5kt9qoquTtP9ypVfuJ2W0+R4u88vfJmDr1HvyISfUZ4jstb7KhWobubSKqh0ZOonHUluOSAo5 fDYDI1p3osmUflaG4zBd48c/LNBXPcY7V6WwxBIDZnHASg5L8CFhAjZ0Oybp44e6aeQBmv11t2a oOXgsy/vOLxQmHXjS5regOn4AXLX/fzOkPlz6vvFI X-Received: by 2002:a05:6a20:9151:b0:3b4:605c:2163 with SMTP id adf61e73a8af0-3c9006eec4cmr1947283637.4.1785404416698; Thu, 30 Jul 2026 02:40:16 -0700 (PDT) X-Received: by 2002:a05:6a20:9151:b0:3b4:605c:2163 with SMTP id adf61e73a8af0-3c9006eec4cmr1947260637.4.1785404416274; Thu, 30 Jul 2026 02:40:16 -0700 (PDT) Received: from [10.152.199.23] ([202.46.23.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31504927a7bsm20870779eec.0.2026.07.30.02.40.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jul 2026 02:40:15 -0700 (PDT) Message-ID: Date: Thu, 30 Jul 2026 15:10:10 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8] wifi: ath11k: fix resource leak on error in ext IRQ setup To: Jeff Johnson , ZhaoJinming , Baochen Qiang , Jeff Johnson Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260729020005.219253-1-zhaojinming@uniontech.com> <5ba0a5c3-7009-4e9f-b5b0-11ec79469451@oss.qualcomm.com> From: Rameshkumar Sundaram Content-Language: en-US In-Reply-To: <5ba0a5c3-7009-4e9f-b5b0-11ec79469451@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNzMwMDA3MSBTYWx0ZWRfX5JahCcgy1SeT +B9H2wTM/wYS3UunKSLbVY6w1/83oeC+j3HwCHQwY9ELcOZMj0JZ81a9sjJzvivd99WaPSlCB5O 2EK3qx2ttL6G7p+uPQHpNTwuvGFTarc= X-Authority-Analysis: v=2.4 cv=b9WCJNGx c=1 sm=1 tr=0 ts=6a6b1c06 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=j4ogTh8yFefVWWEFDRgCtg==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=GtBE_Bw5yehhu0ekGRIA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-GUID: 3PcJVsZPCLnmsrA5vS_R_OLWQ4h1gVPf X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzMwMDA3MSBTYWx0ZWRfXyY31xIXOLhAH g6BA4cidX9Nv27cFoYbnU6LecrYLoceZ2aqEWEaN8ApT7Nd+8/aiuCkhxIjjct8h0QtBlF+pyac Po1YPId3eGQnbbGWa7CBTKu1xnTrDUgb0rvQhxOaRYTd3suvKWxGwV6ELvI0EVCI+PY3iqprm6P zd/TxZN8zdp8bsIUg0RZKZMNGhmyY2WhDBntIpVFawMIcrBxrLS4sqe8Pe2z05xEVl5yDRr8KSW 277W5+bvJoDNyWVUxbdAN0s+ncNFHAYbLlgGKT/5OHAnyVNk9APRFirX8JkdF+zseh64fdEjQ+H 46hy4V4Iv+GspWpRW3GvyZaMygIMAgZsXIKDtyHXt/UpuYG5cVMBvA9XzBNV/NOyNUr/2clVYhd pt7eWXD35yOrk5/9PxOTohllj1yKvS1+ieIOxCXt7YRVcGqQG8j0vShQ19uCyMTfDLonJObvCTU kO7XFdL46k0oQJ7PAiQ== X-Proofpoint-ORIG-GUID: 3PcJVsZPCLnmsrA5vS_R_OLWQ4h1gVPf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-30_02,2026-07-29_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 adultscore=0 clxscore=1015 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607300071 On 7/30/2026 6:54 AM, Jeff Johnson wrote: > On 7/28/2026 7:00 PM, ZhaoJinming wrote: >> In ath11k_ahb_config_irq(), when a CE request_irq() fails, the function >> returns the error immediately without freeing the CE IRQs that were >> successfully registered in previous loop iterations. The probe error >> path does not call ath11k_ahb_free_irq() either, so the previously >> registered CE IRQ handlers remain attached to the interrupt lines and >> are never released. >> >> In ath11k_ahb_config_ext_irq(), when an external request_irq() fails, >> the error is only logged and the loop continues. The function then >> returns 0 indicating success, leaving the device in a partially >> configured state where some external IRQs are not registered. This >> causes enable_irq()/disable_irq()/free_irq() to be called on >> unregistered IRQs during runtime and remove/shutdown, triggering >> WARN_ON(!desc->action), and missing interrupt handlers lead to data >> loss. >> >> Additionally, if alloc_netdev_dummy() fails for a later IRQ group, the >> function returns -ENOMEM without freeing the ext IRQs and napi_ndev >> that were successfully set up for earlier groups. >> >> Fix all three issues: propagate the error up to the caller and unwind >> all successfully registered IRQs and allocated resources on failure. >> Also move ab->irq_num[irq_idx] assignment after request_irq() succeeds >> in the ext IRQ path to match the CE IRQ path and avoid storing a stale >> IRQ number on failure. >> > > Is there a reason you didn't carry forward Baochen's Reviewed-by: tag? > > He first gave the the tag for v4 > > In v5 the code was unchanged, and Baochen commented: > I have given my Reviewed-by: tag in the v4 review. Since v5 is identical to v4 > you should pick it. > > once again: > Reviewed-by: Baochen Qiang > > v6 was a trivial change in code. If you had applied his Reviewed-by then I > would have maintained it for v6. if it had been a bigger diff then it might be > ok to drop the Reviewed-by, but you'd then want to mention that in the commit > history > > v7 was unchanged from v6 so it should have had Baochen's RB. > code in v8 was unchanged from v7 so it should have had Baochen's RB. > > This is another good reason to use b4 for patch maintenance. > "b4 trailers -u" will accumulate any tags and update your patch. > > That is all advice for next time. > > You don't need to post another version to pick up the RB tag. > Running b4 in maintainer mode will pick up the one I just added above. > > Baochen, no need to re-review. > Ramesh, would like you to review. Looks like my RB was already present on v6. Nevertheless, I've added it to v8 as well. -- Ramesh