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 925EE347FCD for ; Thu, 30 Jul 2026 01:05:20 +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=1785373521; cv=none; b=qgicJ3L4tgH7a+AvPIMnMmF1XlcxSFbHXEpxcF+dfPPdQUTRd+6VrPEmN41gS0VTZlEi5sNLaPz2bdPJFx0Ho099FcnMm79k3ldWu+KNrYZa7ou74TP3F94rLsCrtDNt2SheYK5CbRLDv/8mTjkji/kXqnJq/BoXsLPe7pXHFnY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785373521; c=relaxed/simple; bh=G26oBuLWBXTguVs1cjBDadH3KIV/Cq3VPwqIvFRppTQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o8axPfc4YPVOjnwXs8RszJ9TlbsHp8FMUj7ulaJZX04ZB1gW74vkY6BWyypioTeTT7vTKkZSSDZcR8SwtuSfEeTrD/RwFmn26cTeAiSvWoTYb2G5QyS8Jy7AjRgr4PcEv+ZfPJEp7XMrmvpDW1bpqQu5K5kZQPG/zR0HWdcmXbA= 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=G8aZRNGa; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=UHI+mY89; 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="G8aZRNGa"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="UHI+mY89" 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 66U103gY3665538 for ; Thu, 30 Jul 2026 01:05:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=Hru35mpumEb kOLf7h02q3Nl02jlJ/9pefcv0jtM38wk=; b=G8aZRNGaf7yQm8jK6VNifzlUbCH VEQw5yKfkBonyTfiH5RX8F2nplDfIjkWwiiydqPLvZAjfJciBvceugVVeccTX0f2 XRFic0g5lbXsCtEYEmZhtp36V2U4cfbepZVEFoON8vOKFwabHXCbXUwrwwQBhbOW o7FNBjP0RW1MRee0lGXHoGB8n8MpKJkeBuEdKhP8K25Xl716f3b7nt114xNju32e 8K3Ivv2SSgRmWfmWzsyVZEqUmJx7pnPMgB5X/wezQnj6M+cdmoUBszOyEDjziVSQ QkPxbD8fAGXfcr1VTpsVnkJXh6in9K5UC2avDHXDUm0O7fbBKX3CLcwKaSQ== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fqvjdr0ju-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Jul 2026 01:05:19 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-84c4cd31b51so327170b3a.0 for ; Wed, 29 Jul 2026 18:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785373519; x=1785978319; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Hru35mpumEbkOLf7h02q3Nl02jlJ/9pefcv0jtM38wk=; b=UHI+mY898DoMmqlcH9qZ11cogmE+87WYlf29CX6lXAxy7AzusV+Kihz366gDiguLTA BUde9mqnekGLFnjo+qm4jtr0sEh4/Db8kEFDzktBCMXMFXnWkPuAW9h1NYLbtNzBwwpb 2ORkbDlXj+AGIiJqZPuKmfmBK/hOfH79N4xv13GE2HZ3bY0DfLwMOB6F5MyScxUPTQv/ UYw1HM+kAuA4sJkm/7lUydE5aVwl9eniFvJ5KJ8L5jBZFLd3e2yEp50IcwbCJHL+IB6m 4wGla68vHAvzCA5ay+BzwPVsM7Bd6LjFhP0xKhHE3KSEzbGWivMfuMnnhISQt6ifw/1Z KN7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785373519; x=1785978319; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Hru35mpumEbkOLf7h02q3Nl02jlJ/9pefcv0jtM38wk=; b=renbbfeJeecYGjc1EIbWEvu+PnSLYZx7t+BH2MDAFjJRumtNssrDLkJn/qQzLHK2GC t35TzJ90wBf6IA55uN3MWInrNi/Up0iGCKnje9zNc5vVr+W0EiWFY0GgpOkfourudH4h KdTmR1ILQWYIf7UnuAV9XVWcCZOedrxu6AXrxKyX9sgiRnw5np/xrSlYxE9EGzLPd5pb qVOK/dwiga5p25Qlvk2aWezHGSfaKXXG+5M1jX8Y7ENNUEw9a6ssgi1LgXLTdjvFbshg dy6XQYGheejkuL80Bvt4fU2Gz+cdaMdn8xR/xUPMlA8IUaR4JgrmNCiT8Fo38p49hIhm F+eg== X-Forwarded-Encrypted: i=1; AHgh+RqaD783YFDPx7i6CUCSy/LHCJ7sf/fIU93tjAi/LnV4T3WyoKdyWUD8HQFMV8w/qeACegMyQDNzMnUXkfA=@vger.kernel.org X-Gm-Message-State: AOJu0YzAOCLeBQKbvVH53Ho6I95MXVN5oiOeX58motfFEXeYzGpV9zdg GP3RTfioyVSyn9NrwLzqzqckBt7QZkGNV+T0eL8e6mJQ5aiSyXYcrtsA0RHmN5sUvsHHpSei73U TfpPLqSDS1sHUH9ZkmuhyMspREi4WXgYK10aJ60Hz0pdvOli1NelZpB4NCZm3DPzU+zpiLe03t4 Goyw== X-Gm-Gg: AR+sD11Kh1NmSIpij0TNl+z4rB5QAx+1tWPPRQFbI/8ZVraduTBh2AYB+beDMlqR27J dg2eRx9D99f067bfhzZXWduOe7UOYbehYlwmkcBMAiVH0fo6NRkLYkh7MWG9/W1uW0tbTjJzp1U hA+PATxFf6mLjmjkQSRSzZsND3tIUc6zZslRu+/MPUqvLmDMdrui+ldmI63h9XK/DESX+AN+AFZ 4RwbQ9dXbukVh/lxSI5MxOtSRKPRHTD4Xb7tq02974qrjb2oVgwaBZhBryNw8ZG8eptwU+vFMbV LHzZZhZT5oohXu6emDLOLeiQfbSAxUiRm+oQMzfdcczVwRfMPF/nxzKONoZyackgIrHal6ydxE8 aYNm5PRjWkz2og3vXUCtolaOa5nweTbKvtD2K3T6hfWmhnNdLEm7M06oR74U= X-Received: by 2002:a05:6a00:748c:b0:848:3576:3204 with SMTP id d2e1a72fcca58-84ebdf47d90mr157926b3a.34.1785373519073; Wed, 29 Jul 2026 18:05:19 -0700 (PDT) X-Received: by 2002:a05:6a00:748c:b0:848:3576:3204 with SMTP id d2e1a72fcca58-84ebdf47d90mr157896b3a.34.1785373518582; Wed, 29 Jul 2026 18:05:18 -0700 (PDT) Received: from Z2-SFF-G9-MQ.ap.qualcomm.com (i-global052.qualcomm.com. [199.106.103.52]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84e9fe23120sm2168563b3a.11.2026.07.29.18.05.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2026 18:05:18 -0700 (PDT) From: Miaoqing Pan To: jjohnson@kernel.org Cc: ath12k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Miaoqing Pan Subject: [PATCH ath-current 3/3] wifi: ath11k: unregister PM notifier on QMI init failure path Date: Thu, 30 Jul 2026 09:05:05 +0800 Message-Id: <20260730010505.143458-4-miaoqing.pan@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260730010505.143458-1-miaoqing.pan@oss.qualcomm.com> References: <20260730010505.143458-1-miaoqing.pan@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=RpD16imK c=1 sm=1 tr=0 ts=6a6aa34f cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=b9+bayejhc3NMeqCNyeLQQ==:17 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=FJAr2BPrIL5JYYbaf3kA:9 a=zc0IvFSfCIW2DFIPzwfm:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzMwMDAwMyBTYWx0ZWRfX2z7VGdU/5gyu 0nPmDdQ9mTVhtc6FWKy8TmlCVcor7sPwBvBrccowoYDYrdYRRtwgLJR8CrIz2Dx1RTNSKLHSSCd cUg87bTulNBEoZ2Lbjap6mChP1AvXyA= X-Proofpoint-ORIG-GUID: C8HQLx_NHyN-XfYn0DQk6bvDQCz6gxq2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzMwMDAwMyBTYWx0ZWRfXz8UhvW5glCuo KIYgcN0MDtTTnj0XpxUn+JRZmMuuIJRh5uHAVaWVhxGBBuOKiIirDhDT1dNSyZzr5FffMk1dzXt YzGRE+n767zghfZwrsR7QiV+WLauK1+h/xew9O8gIV+ey/O2+a8HOevAMw78eurHXCHTIinu5wi 7MB/9EBbg2r2ALksJr+9uT8yGNR0r2kUO1HbciMxn9K6TFhzGyMy+9aOorImmp3bzwwGBA0RWI0 2zc9+oq7+up0w1ZNAzsq0lZ5fUeMGZtHZyuN8MdZ/R4/CHyvEgvxoeTBTv6i3ha0XoR7rV/2D/E fK9957kObtKR8YgFZGlkXBiPN9+1ZfwsjxkOdoBnawkuyC+CaswdyZA8nz3Vt7hjK0967OrfsEO S7gmKVhlf+yOHnfhiZUDq+/7G7ly+K4P4OnlxPsmifM1tjmCFX5U9a/x+O2XIDdPgijut75dUcM v7MdJY3R143Z8ITPyTw== X-Proofpoint-GUID: C8HQLx_NHyN-XfYn0DQk6bvDQCz6gxq2 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 suspectscore=0 adultscore=0 clxscore=1015 impostorscore=0 bulkscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607300003 ath11k_core_init() registers a PM notifier before the QMI server becomes available. If the QMI server never arrives, the device remove() path can take the early-exit path introduced for QMI initialization failures, skipping ath11k_core_deinit(). As a result, the PM notifier remains registered after the ath11k base object has been freed. A subsequent suspend or resume event may invoke the stale notifier and trigger a use-after-free. Fix this by explicitly unregistering the PM notifier in the QMI failure cleanup path before releasing ath11k resources. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1 Fixes: 32d93b51bc7e ("wifi: ath11k: choose default PM policy for hibernation") Signed-off-by: Miaoqing Pan --- drivers/net/wireless/ath/ath11k/ahb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 7f5f5c8d7c56..bdb8c99f10fa 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -1272,6 +1272,7 @@ static void ath11k_ahb_remove(struct platform_device *pdev) ath11k_ahb_power_down(ab, false); ath11k_debugfs_soc_destroy(ab); ath11k_qmi_deinit_service(ab); + ath11k_core_pm_notifier_unregister(ab); goto qmi_fail; } -- 2.34.1