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 6FB5B30ACF2 for ; Thu, 23 Jul 2026 01:55:43 +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=1784771744; cv=none; b=GzYQ6GmympTRy2/dChapB2sHb94DSsmjniSBIFCPG5f6bGS9T6n4QCOCvcxWAXEFOCX8ya5LgvJe8+9NZepeBQQ5GycV8cGnPUf6gfaVSiAC3wFhwNW90i2YQjbUfjCNxuREvTJk5GpD7ccXsi02FCuWZGAT+43djBCfkYeS4uM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784771744; c=relaxed/simple; bh=3dQZUn8xvzR98YcqPSB5KMC/gDhAot6zFCiBVtfhGDI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gIcr7QcZEb2jsl8nJjA7AOoNTX3ByPkmd0IHi9xumSSaGxlXkf2amhtexRztSrB7rQx4fKnra1xd1lwUhDlTEd3yjWTE8txLiCuZ+uWuCA+7M5U0gcoftLgWfk+QGbUh9VnZkqIkTgbc7G8g4IGb48wyAoIXRD9XH0BclfC2TNY= 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=HfnjD/f7; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=gJmRIu4b; 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="HfnjD/f7"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="gJmRIu4b" 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 66N0Wl4q2519479 for ; Thu, 23 Jul 2026 01:55:43 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= VwPIGZg61RTgdC0tQzXgf9LKpmSLanNFlteoC875wdU=; b=HfnjD/f70xJcThNO s4g6NGmWiANPgx8MMCSlXRCRjPSUvBu+Wv+0x7dinURcoPwRUchRtN1bQz1XyLAY cimgrqUE0f1aWVqk0jUTQI4rKnYPxcjtIiXO5z3Oci6vyr3x8h03uQRYDzlrCley 9CigKc3yD0quaxa7bisBXd7AYrQFJ7iba/suVC4SxD77aEF9Ttfe7V3mHXxpB89P LCauTscyIhqHpcJ5qvQNEAFlXk9olgvspwzLncML8+7DZo9Lsy/l9JdDMTAFQ6wv e1bWPkITuRvKetqMwHzd/VaSugKN6m0AwVu6FH1A6oU2k2jT8Nof2x1VRYvw1fmJ de5euA== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fk6c7gk7p-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Jul 2026 01:55:42 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8488ac68185so432104b3a.2 for ; Wed, 22 Jul 2026 18:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784771742; x=1785376542; 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=VwPIGZg61RTgdC0tQzXgf9LKpmSLanNFlteoC875wdU=; b=gJmRIu4bsRi83d37Js1P53ytkbB5HZU2oyQ1pODtFERFEP7D/WLKFVS9UlUUxUFlEk 78mXKcMIRSH7wfkf/uK8SvSuYXtoFHjjcurn86y4lK+3464MfHp+Sb8Yeb3HmCXugCb7 772b2B2/BahjgT2upJN0znL9tMtQcu0MNWzXAYykdZTS25z5RKdG7Nl7kb8IP09D3brR KA9i4nLhO8COVn6lXwHGGv776Ij7yr5376wTmuz8jEnycz1vLvAQGu8yUKLw4SPh/GBz Ec73aqh/QmlGsYyeQKnvvUUvvBZ6GaGVr26g9tZs1KDmp28i6Vd4yKdHSWtXobSVS8VT Jsyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784771742; x=1785376542; 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=VwPIGZg61RTgdC0tQzXgf9LKpmSLanNFlteoC875wdU=; b=kosTnqPYszSLPZ/5NipeIN/TqKQXXnVZ6kxS6p2rc+P+GrUQNYuPlnW6B++14hD6+l WyoB1smCJzxiiWK+emcDmNvXemGH84mvye4vEb5C1DV5BKZZHwX+pMswv6vNmGlnf/mz 9z6Xiw8KEPQCS5EdXRcT0InQBC+gYCt5n2BnEppyxSwRmccmLvZvni0l3j3ipfXSaR/s PM53uoxjA6m5xoEolbWiF0zRufsfznD46XY3tEOmO2Y6wAxCp9DO6DzbF7tTykVeu9hl EpNz3otVz4eQYka1DnXk3ex6Yya02XDqXfBhcJiXhW5w47xFIYPR1Oj8JA+l2/Biq1IO VNzg== X-Forwarded-Encrypted: i=1; AHgh+RqFQw3DRldCFxcs1qPczqmSOnuQXsxtOW3Hsjd3RbPGsBRQmT14XcWhcmieAGpSNd5GmsPQkqBmgyfiZ5w=@vger.kernel.org X-Gm-Message-State: AOJu0Yxyuivshoqv/k1GpDu/+P0WW8aumcoeFAIBKKf+v9SSMB1AFzBC 8TA0Z16zW2qkR1+1Ll3nURAMJZJHFsQaz8tLOmHqOxTIHjO3O2/bZDN5Ms9cLxQQ4Q1ZP/dARlT lEB2/ZI06uetdnVcn3qRhRfdc1bQAtVhm3eoD1tcTWb04gAg9CxjwHWHIQ07yzilTU9YNYkUO2L AQAg== X-Gm-Gg: AR+sD10FPUXl+0itrSGJvZHYhdlcwIvzrcT9kPqmCLVPOsMa32tnySJBGMQgrfRzWxd z1p5gv4UfWDpsnG+FggKNsFHotGI5YhoNh3zHO7z3wQ519L9PaTzSysM901m07BC27UZw556+26 4dt37c4E7TtFHNHWnOlEjVKGw43lsBOkvYwoBWhOI6dfW+CzeuYxX073LW32EBBS4uBctnlzDRo Ip1ybbSidswWi/5iy1+Hed6khP4zZOM9OaQn/y3WgPKJEbDozkKhOjptE3UoCA3xSj1UrRxyKao ErHuxZ3wLshHUiBvXep9G59jcGkPfU8Tph9mTygoCXngj1tieCpsGUV1Y/GMXJJsf8DxYDEgOgl /1fAwYsTktzNSj26cK8Jk633YWQWIgmHn37peIPodt3L14ntOeteMlJqBIt1c+HsKXftP0ECy X-Received: by 2002:a05:6a00:2e8f:b0:848:4190:ae72 with SMTP id d2e1a72fcca58-84e2bb54b03mr1442300b3a.46.1784771742127; Wed, 22 Jul 2026 18:55:42 -0700 (PDT) X-Received: by 2002:a05:6a00:2e8f:b0:848:4190:ae72 with SMTP id d2e1a72fcca58-84e2bb54b03mr1442276b3a.46.1784771741671; Wed, 22 Jul 2026 18:55:41 -0700 (PDT) Received: from [10.133.33.45] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84e17604a46sm2154683b3a.60.2026.07.22.18.55.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jul 2026 18:55:41 -0700 (PDT) Message-ID: <8f82a267-aace-4007-8fc1-c31d9065d059@oss.qualcomm.com> Date: Thu, 23 Jul 2026 09:55:38 +0800 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 v5] wifi: ath11k: fix resource leak on error in ext IRQ setup To: ZhaoJinming , Jeff Johnson Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260723013818.393470-1-zhaojinming@uniontech.com> From: Baochen Qiang Content-Language: en-US In-Reply-To: <20260723013818.393470-1-zhaojinming@uniontech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: Nvd-_KundmHBVrkc16qOJ8OsvCVLBOui X-Proofpoint-ORIG-GUID: Nvd-_KundmHBVrkc16qOJ8OsvCVLBOui X-Authority-Analysis: v=2.4 cv=baZbluPB c=1 sm=1 tr=0 ts=6a61749e cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=iHwBjlyiAAAA:8 a=EUspDBNiAAAA:8 a=MOnjC4vlygQvvV3irVYA:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 a=uNSKXYNwxGiU6LD0JREI:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIzMDAxNiBTYWx0ZWRfX5d5scqzXK/K/ ZwE0nWmMXXod8Yp0euR5LBzUW3G29iAq2WzMPhj6CEP+by1eEnf7nnE6/y48jOVi+8TKoDwuLIc /U+mgT8d5Qr5V52HUw/JdFIKvtsLS8I= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIzMDAxNiBTYWx0ZWRfX5+qTCWNxqvdL K+SqOJAWcODb4NI2hOhAU2vPh9GrtU+d16lYOSpQRVK8mJKa07/VL223slTuOTEPMixAzHpRyOf NHP0SBLmKcBQAhFSboqON8QuTOncIMiGRJC+QpNoUj8Ul0Csj4BeXVbSqZ+DeQ/D6AI6QtWDkT3 6beH5yY2K/hqIKAIhFEZOmGSHD+W1QDV74dALkmNP8LObCisZwav3rQiq2rNLbS+z8kCGcCbYtS 5Lvm+R+7Cfnk89hvBQDxDtJr1wbKMEWDiabpUs1ecgCYQeMZpM8bM6K4vQq8x3rBjKp95SvDCSS 6ultlK0qFFzOau/8giYpGdBIg5lDGppsde0lyf1wcWdNNYWOE/0xpX7ue5svtYWJ+hzvNl4as1f A5k+afb+rSbGOozpMb62sGjRZ9kqu27vST6Il0i6Bnw5DVQJQf7A2oyUXMOU0yBaitCjFofpj86 vUFubwP8qbnYR/qHQ+A== 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-23_01,2026-07-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 adultscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607230016 On 7/23/2026 9:38 AM, 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. > > Signed-off-by: ZhaoJinming 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