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 7A6C318DB2A; Wed, 25 Feb 2026 01:33: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=1771983230; cv=none; b=u/tDqB332A7JpzyufZkiGm1lByM4o3AXRfEGOBviqNhjZ+Fk0/I0zzEzuybrMCjs1B5U6rTED1UyjWWon3/RDGxLpgQ+9tZqnKpi9dy/RZXuENLbwLkbuKw9PP7HLXjYaqngddxgIKBQDdXKIC6IK3h7uP6CKwkemoyE+JsrsNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771983230; c=relaxed/simple; bh=8AoqDM+5h0eCyEtt7tC2qxGPNmeoeOZjWYjgqlOY5Fg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WNwKRzuRy/vaV/flcADyPJ/uDA/46Keu+m5WNcLHYYG89Fkexj781DC4+AGUmc1lthga0EqX3GDmmc8uhdSVzFj0ShKQ5P4L77zwi5NIlrElHyeg6wRmioKmS4b65JV5E9Vp+58chAZoEl64RTlSXBmsSUaE7el0nxLoOuVX0Mk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VCnlpWy0; 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="VCnlpWy0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 388C8C116D0; Wed, 25 Feb 2026 01:33:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1771983230; bh=8AoqDM+5h0eCyEtt7tC2qxGPNmeoeOZjWYjgqlOY5Fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VCnlpWy0aSE/SUJ2NWoWcUDauoYP5LLiNUBYQsNxMth5yu5WuoJhVfOa5FrabdNsQ EftA4DR2HU1TF44vEpNd0m6X7YeBkLbYOg/8sTFb39OM1JF6KvoO/3aQPjIDE9Sq9Z yDd4G90WP2ZB8z5XVbpOpbDbYqOgR0Oo6VABixPk= 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.19 374/781] wifi: ath10k: sdio: add missing lock protection in ath10k_sdio_fw_crashed_dump() Date: Tue, 24 Feb 2026 17:18:03 -0800 Message-ID: <20260225012408.863560798@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260225012359.695468795@linuxfoundation.org> References: <20260225012359.695468795@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.19-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