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 C482A29D281 for ; Thu, 30 Jul 2026 01:24:31 +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=1785374673; cv=none; b=uSW+UFWZeWHKJ3SjIu2z2P+0xMGuT94rtASoj1Jr0hFrFA+S27Qna12HYovBFdBuQ9BCN1AcG3I2s+M8l6MW+9to1eI+TOimvbciyRRHWAVnEgCENfMX1JSJYRHif9Oy80HgQwoL0WcRjs2kpsZ47IvIycUZmoNll4OlBLN+Ol0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785374673; c=relaxed/simple; bh=F/GN9Vw5jyHVRZzshn6T9qf+tbLSQIznFUDDUeVKcI4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pKJ6kGzRM3GbVUnJBnDpVeZd3cB/nEbB90qh5VhMNQqtJ9o0yWDiUUCTPe4y1ndZNvFmOvLN1aIKD5cuzpn1QQCkDAeTcvXypNwVRcUUZESDBcRroL5yNDNNrLiRto3Fke811/DPZf/idn4p93bJoHoiSTrk0QrBk7hhkeXdU8w= 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=CksDfOVw; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RRFLsDQ+; 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="CksDfOVw"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RRFLsDQ+" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66U18MAe3018535 for ; Thu, 30 Jul 2026 01:24:31 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= HDnspEIVuTCXuRcKdi6kqP3UXQ4ZvcdlyKrCIK6R5R4=; b=CksDfOVwJKYmiLi7 WXQMOfxd4DerIX60bdOoUREBACXhaSMVNLCPPhBTk/cdi+IcBDvQ7Fgh/Zya9ajK DlR1W+GhS8d1R8gpM1Kvmqf4FU2NV8AHUVFmr8z3/4e6dEpWA/MPhwDRTz2W24G0 a1Mp530NJgryw+UET0gFI4fulfBmBprGhYf6C/8Zh/sD1O/CEwtQFmxTOcyhpiu7 5ezksN/72IGIlgrfsdPyzHz/wOINZUVNcd1W4zG0nhWSoZhhORDHoWosKDSaTANp B58SsFmtIOtUQE4/VPqQF+9F9Imcs0weCVUwJ8G3R4Yj2Z8zFYYsyuxm1/5eXqB/ K7pElw== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fqvp7r1k5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Jul 2026 01:24:30 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-cb5cc1e13f8so1979042a12.3 for ; Wed, 29 Jul 2026 18:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785374670; x=1785979470; 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=HDnspEIVuTCXuRcKdi6kqP3UXQ4ZvcdlyKrCIK6R5R4=; b=RRFLsDQ+qijUP7+tTDlnlU5Mxxh2pxo9niiraP6t//OxseMJs4Txyu7wVGlUd46OBs MnB+KT/77JSQnKMTdc0QlUDrhFrvAtrZg0rfXj9AuLU3wrYFkLWR7tkovr3cxlR/v7uZ b/jWI3aFrzu3RYjzL08r4tc/6iI2T2tJCLMA+Zu4wHRT55ZGSrDaONpqOSDr0IaEqLn+ I54lBBM0kV6W9DhEWr067Yz0OG7H6riFsytRdmvtagOuD4wMDnESqjeK0Xe1+iMYIyWk h5KZXud9csXPtfNHNXdvf6Gq1UV5sVgyD+VKpkjkeZ3WWrfUdOiKIlz3n1bGvAq9OEJR ujPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785374670; x=1785979470; 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=HDnspEIVuTCXuRcKdi6kqP3UXQ4ZvcdlyKrCIK6R5R4=; b=lAxnzOJuiFsmi8uKrRPV4IaQm+ckw4sP0m6+DkidNj/KVr1kGJMrYKUvhnr8v6fRKI rINU4sXdXRmWyxLGWoRnz+fUdNFTtGBuGjLmiTtAj7RY4jeUfz0zfBfxioKhOzOs7p8e FFxrrEQBFt2tYb9HJoPfGPi/bAIaBORk/MMbi42cEj9P2Uln09I7LrXB8BN/JI3Pxojp U41aEWgwlDFVQ4DmuSsAy9KkJPApwUQ27xyCnXzdsAx3w7UyrFO9hn33qVWcrXZb5Uue 3E/7waR/tGAFUWFqr5SBd4OD8cSSa2oJMNpGT3bTscSf2hqDxH3i/mC8jQRmnuzxOn5Z FQiw== X-Forwarded-Encrypted: i=1; AHgh+RqZUy+LJ77hUUs6//GIjP+MS4Ct7C4LvsvhKITbnTncoCnhFLn1ZNX6ZX/4AKxRk2jVYqAmD2N3ZxuHOFk=@vger.kernel.org X-Gm-Message-State: AOJu0YzzpqM191VRCMZ5i/XmEXesSUttkuVrym6e/DLoWxOgbSUGmor5 pC5jw6jlB4FiZ8A2eWmzYVwDN1h6r0dVHtV610SyoSYHuF0jUDG5V3OefoRiE3IgIzwl89Mz0Y6 xUMWThb8PH6deO7aSqghxLQKRY2fHkz/YN+vgYHD2fE8+Z6lex8Z/LRG8Qnoz8sS3P2g= X-Gm-Gg: AR+sD13y176+EluLi2ZjiH1RunHvr2rHAp7U4LffYyCSTpJNrUoiTrXgG82oXE45Liu oLTyN3yXzKBZ7Np3cKQ/6b9YWXvzfvkj6FBbL/ZruhVlcejG4ujofKnR+4bKiCjZZ+Xh8Cn2mrT Fpwe9L4h5x+EBckhXmG7/Gb38xa37M1Aut8xmSdYqjjAFcScQLw3fyW4O3FhkTk2e3R0vXV269e 1arVQMl+Os825Zzmm4B657r6/EsQdSURe3jVKv6H7NM23oCqNlw+D7Vo9yUrXtzwqfVRs3kOzVM xS2F/p3BM91UQ1zVJBu8QDeiV0aUHrDtgpxoUdt3Z8GSluAJR5/5n+bMyb94HQ879nkakDmVOfS Fzn9bFQc5KPq2ki5WXMOEGQrtSytpuZHT+eP6XKJrrmFMNjaFV6oZeSv6CQ== X-Received: by 2002:a05:6a20:1d98:b0:3c3:8d4c:668a with SMTP id adf61e73a8af0-3c90094c2b0mr423527637.75.1785374670008; Wed, 29 Jul 2026 18:24:30 -0700 (PDT) X-Received: by 2002:a05:6a20:1d98:b0:3c3:8d4c:668a with SMTP id adf61e73a8af0-3c90094c2b0mr423501637.75.1785374669556; Wed, 29 Jul 2026 18:24:29 -0700 (PDT) Received: from [192.168.1.11] (15.sub-75-218-246.myvzw.com. [75.218.246.15]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13e7265010esm14721244c88.6.2026.07.29.18.24.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Jul 2026 18:24:28 -0700 (PDT) Message-ID: <5ba0a5c3-7009-4e9f-b5b0-11ec79469451@oss.qualcomm.com> Date: Wed, 29 Jul 2026 18:24:27 -0700 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: ZhaoJinming , Baochen Qiang , Jeff Johnson , Rameshkumar Sundaram Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260729020005.219253-1-zhaojinming@uniontech.com> From: Jeff Johnson Content-Language: en-US In-Reply-To: <20260729020005.219253-1-zhaojinming@uniontech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: fGQfAL52Mox7BTnQagCCN8oNHrLou5vx X-Proofpoint-ORIG-GUID: fGQfAL52Mox7BTnQagCCN8oNHrLou5vx X-Authority-Analysis: v=2.4 cv=cMvQdFeN c=1 sm=1 tr=0 ts=6a6aa7ce cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=6VQYfvmiyQ8t40WkS/mQdw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=3x75WggdeHjsNz2JpxQA:9 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzMwMDAwNiBTYWx0ZWRfXzyca3Ob1U3Nl Qu9dx/DNEDzSyrp7/gntEIKXRAirWQpSYvAfV/EMHBcg4RF/9d6bhMLgeKhhY49pP/Hf0V6ct2i zs5i5Zr6sM8wdBfMqBAUmoh2igl4aBA= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzMwMDAwNiBTYWx0ZWRfX4Z9zo21ivp8f oOoFKJcGRES5/gOppk4lvDT1UHIckDFptQqW57BYhpJ4fpLnnSP4Zvu4NdWMWzU8Ltju4zMsMCS v7XqDSjDhjG0WQ6paoj/4kg6icejSufHlX9mEXWytaxe5MLK5Cyx8QFPsDzV76rqSRB8m13yR1w M+zf9jt5Py5E1v+0lPnUxl7YOXNNyxXfnyb8xsxLxBWRmLo+K29Tks3JjHnlirykyMSMHKvbeMq /plqr/F8pzhjEqI04OUSjG/+dO/x+jq/lMu0E68OEan2DWQVIFylk9VV+u967LV9piOZQjMPZvj CyfIV8Dj8ysimktF8umGsiFl0W4WCUQBIjCYcet2JBZv2g6yk/Rt0XeOleGJHcmUerU+Qstj43D +ifO1D0E6BuP4HAJvIiwkE0Aftljl4MPu9NkMnOt19zrna/SYAFvM/j/kQ2WlLGpG3Ljxxo3mPQ CfjRDrODCtcdkSDjAjQ== 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-29_09,2026-07-29_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 malwarescore=0 suspectscore=0 adultscore=0 phishscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607300006 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. /jeff