From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 50B942EF287; Tue, 17 Jun 2025 16:02:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750176170; cv=none; b=rHtUbkaOJD7iEHChaS0u3fUnXB5dyCjXw3WmIQMbiXYd/GPP9pBTJVEHYxxhkemydgsG+G7PsJdHX9g7NnYR6FSkipPk8ifxiNWzowaEHI68cT3NNKBjd01n2I7EAgUoXZmkSdGmHIbE9+PjDxI8OS644znDF2xq7snz1dLz9mY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750176170; c=relaxed/simple; bh=AAvqcEscDnxnKkQ/o3TJG34JO/oWwyOSjUYIVgJuI5Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gzzxK1dTe4kjkTwJbfk5oS/dqPbJQXeIZJVwwn2WYGFeciRd6uF6Gdu1SrG/d49x9kd2gVhgHOlY2cASeulp9P6a7naIqJ075ZMJdqaHyrasRZhuG/FpxqDlAkb9w78QI5b3UE7lcMMo/uWuZJ1x+15U48AiL1vFhmqgWK+pJq8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IZmzxQbD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IZmzxQbD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B266EC4CEE3; Tue, 17 Jun 2025 16:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750176170; bh=AAvqcEscDnxnKkQ/o3TJG34JO/oWwyOSjUYIVgJuI5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IZmzxQbDSF5x4fBdQd75nSG7MMeBnKAdnsX8VPv1proTANwJSPrYjlJAYGEQIx4LK hPwjjaH3uRmQ5Kkuyki1TEqxUrexD6Q5EKmhUnL6PM4ULeQO0A32jqhtv3fbLCHq40 dUtAVKJa+fgDJRshlGxNs800NShL7JOa1hBLojwQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vasanthakumar Thiagarajan , Karthikeyan Periyasamy , Jeff Johnson , Sasha Levin Subject: [PATCH 6.15 161/780] wifi: ath12k: fix NULL access in assign channel context handler Date: Tue, 17 Jun 2025 17:17:49 +0200 Message-ID: <20250617152458.046421185@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617152451.485330293@linuxfoundation.org> References: <20250617152451.485330293@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Karthikeyan Periyasamy [ Upstream commit ea24531d00f782f4e659e8c74578b7ac144720ca ] Currently, when ath12k_mac_assign_vif_to_vdev() fails, the radio handle (ar) gets accessed from the link VIF handle (arvif) for debug logging, This is incorrect. In the fail scenario, radio handle is NULL. Fix the NULL access, avoid radio handle access by moving to the hardware debug logging helper function (ath12k_hw_warn). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: 90570ba4610b ("wifi: ath12k: do not return invalid link id for scan link") Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Karthikeyan Periyasamy Link: https://patch.msgid.link/20250324062518.2752822-8-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath12k/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index dfa05f0ee6c9f..c20fd92000dfe 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -9462,8 +9462,8 @@ ath12k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw, ar = ath12k_mac_assign_vif_to_vdev(hw, arvif, ctx); if (!ar) { - ath12k_warn(arvif->ar->ab, "failed to assign chanctx for vif %pM link id %u link vif is already started", - vif->addr, link_id); + ath12k_hw_warn(ah, "failed to assign chanctx for vif %pM link id %u link vif is already started", + vif->addr, link_id); return -EINVAL; } -- 2.39.5