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 CC2AD2C21DF; Wed, 25 Feb 2026 06:55: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=1772002550; cv=none; b=j5rFH9SZfK5wuS77yPCjneLaRuq2OHZQMEyBA7MdFlnrMhLQdXqgE4X8P8W+npk0Zw70gWjFtdcvjOVGQqhtfvE36RIMcEjC8r7Y+hudVYfBp2j4peVPBmEDPp75IuFJAY0odZ6SdpRsSDx5NuJxQ6x2mgiuGlIZvyJSO31QAwQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772002550; c=relaxed/simple; bh=eC6Gj40b8lUrVB3rNPEXiRXpXtt4FyXH/36UJq//eG0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xq1xtVYR5bn/rOBq2F48dSyOff2V/OJ3lkui+rYEdu/NrTXh8TYFtm4dCpEnngFian/dQypW7wd2HF0DUzZX5/LsnO7pvhlHJGIyMfhiLuk//NAVxf9WAdLxmqIydxzI6FC3LFoOwoUM3Dn3QXnrwvBxuT1IYksj1yf1523qJu4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ggSKf3P0; 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="ggSKf3P0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 844D5C116D0; Wed, 25 Feb 2026 06:55:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1772002550; bh=eC6Gj40b8lUrVB3rNPEXiRXpXtt4FyXH/36UJq//eG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ggSKf3P0gi+ixC5bM7RIxuDJ+1u7n0wkFV5/cSU9cCHH69gwoQP8f9ACwNTmn2PAw MeyPjcAIzTX4pP0bKQaIKC53xUxSigPWw0h5rsVP6gTdZrSqm7w/cZjrCoEIrLkeqB 7mScIxGlbX5nsn2myp0cr0tshSN2yW+2sxnmnH3A= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ziyi Guo , Baochen Qiang , Jeff Johnson , Sasha Levin Subject: [PATCH 6.18 283/641] wifi: ath10k: sdio: add missing lock protection in ath10k_sdio_fw_crashed_dump() Date: Tue, 24 Feb 2026 17:20:09 -0800 Message-ID: <20260225012355.627727275@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260225012348.915798704@linuxfoundation.org> References: <20260225012348.915798704@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ziyi Guo [ Upstream commit e55ac348089e579fc224569c7bd90340bf2439f9 ] ath10k_sdio_fw_crashed_dump() calls ath10k_coredump_new() which requires ar->dump_mutex to be held, as indicated by lockdep_assert_held() in that function. However, the SDIO implementation does not acquire this lock, unlike the PCI and SNOC implementations which properly hold the mutex. Additionally, ar->stats.fw_crash_counter is documented as protected by ar->data_lock in core.h, but the SDIO implementation modifies it without holding this spinlock. Add the missing mutex_lock()/mutex_unlock() around the coredump operations, and add spin_lock_bh()/spin_unlock_bh() around the fw_crash_counter increment, following the pattern used in ath10k_pci_fw_dump_work() and ath10k_snoc_fw_crashed_dump(). Fixes: 3c45f21af84e ("ath10k: sdio: add firmware coredump support") Signed-off-by: Ziyi Guo Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20260123045822.2221549-1-n7l8m4@u.northwestern.edu Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/sdio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index c06d50db40b81..00d0556dafefd 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -2487,7 +2487,11 @@ void ath10k_sdio_fw_crashed_dump(struct ath10k *ar) if (fast_dump) ath10k_bmi_start(ar); + mutex_lock(&ar->dump_mutex); + + spin_lock_bh(&ar->data_lock); ar->stats.fw_crash_counter++; + spin_unlock_bh(&ar->data_lock); ath10k_sdio_disable_intrs(ar); @@ -2505,6 +2509,8 @@ void ath10k_sdio_fw_crashed_dump(struct ath10k *ar) ath10k_sdio_enable_intrs(ar); + mutex_unlock(&ar->dump_mutex); + ath10k_core_start_recovery(ar); } -- 2.51.0