From nobody Mon Feb 9 11:56:02 2026 Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B403030F53E for ; Fri, 23 Jan 2026 04:58:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769144313; cv=none; b=ZXeiZOc2o6fD1sMe68XT7zGD9kH/uKRsFs/qPQZF2aBJEwJHczDs3LhrR969c026ZU3xYgiLBfL5FuvcYZC2cdfMdNoCaOd7hln1k4KEAaFgHWNUEwxpud00bmCFyVEOZE6lB4JQTEYaq2/hgHJ4IB0VZv6OiA+1prLYhf8Y9fI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769144313; c=relaxed/simple; bh=lYsrQ1EJwEWL/1e/oTQamNHkx7ztcxzCi6MRAQrIUXw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=kK59GQE3S4Sf89w0FVtnybsaiTHVxhp+PvD4R9olYa13UAEIHBQqzHz/KljF4j9BqSbvl80OyigvccyX1/D+syNlB9XoKvyp8RMWnTsnSl71YACtsXAqmZOdhf0VbLhpgNOtIfM6Z8bjKRbUO8bqpf3JuELbRltrF7f3wp1xgaU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu; spf=pass smtp.mailfrom=u.northwestern.edu; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b=LpNVEgpU; arc=none smtp.client-ip=209.85.161.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b="LpNVEgpU" Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-662c42e7897so481620eaf.1 for ; Thu, 22 Jan 2026 20:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u-northwestern-edu.20230601.gappssmtp.com; s=20230601; t=1769144307; x=1769749107; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7TaN6HO4UpfTa5x1GQ53EAUUeL9sRzG0T0kFV13YYQg=; b=LpNVEgpU6/wfulMe4txjV/vQCyU0S9ljMlhRVazh8qeSGdoEfA4vixaa9b2KcToNW3 78WipYGCNGuw0L24sdvxgsxm5E+NIxHyo8CsmzhDLvXu1pQcgKc3xNxvhOyeZnp8ca76 6FJfbXksHaY7igQGt/Mxqq6OWSZ/hrCVwo/HjGB1s/+3LIjJscwGqVegekvm0m2Tn408 d4GRrdoDzcxIKPYf10FXBRavdh7d1vNRrxO3T7RZ76Nr8AcHJ7WROY4fgCl6o/d7DrpW WaN5DA+TkGipJ8WXeNKvpANBrdQ2baLc8H+V9HxRz6g6shaUe78rNGRIjvq4X0xhljtE 7REw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769144307; x=1769749107; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7TaN6HO4UpfTa5x1GQ53EAUUeL9sRzG0T0kFV13YYQg=; b=JweKMZ8yLTom3Cq6RDw7Rcm84tLIDoIwgUiZdGVYuPo95YnRl9PE0v6zOhLnrk9gHT fWSPDaaPAg3fE3KPHPlObOdNTOYNxqCKgFwCZGMnfPZjsiVvq1Yq768ZK0bYeFig05Ze CExajS3DaE50s77ZYnNgwzw/qM/Af/3rSqIRCc2d/msVS2IdOxh494z0l0hQK9rDBlAp bVO0AWFAX/gPHmPiPX3yf0qKBwEmN7Zm2ErjFAGRf5i3/TRZ7C5e/zLiPbmXH9Du7dpM cJJebtW6QH7ukNOurX9L0wuqf4EKtOpn8UEffUQhZi/VXJ5cZDeqE0Ac/tRvn8ns8KSL gafQ== X-Forwarded-Encrypted: i=1; AJvYcCWjvNYf+0uYz67vPOJlg9P/pk21MVu4O2lCCxGGGHKBmnXWkyF0394hZ5Mvy7fFzq1n3+EklITn4b8ZJZk=@vger.kernel.org X-Gm-Message-State: AOJu0YxBwMpCZBKs5lLOWgFj4097+EWJGmCewb/Tl7pkXrRi1yuPxsrD O8+lLyPY43ONYtfATQwPOifnHHnuDudpSItTEDqbsGdhNA67BkovlcVPQlPEiTn0YSM= X-Gm-Gg: AZuq6aK80vgLq/Ye1GN4rY5IXFljY9as7v1mok4Hm+mMX/7tAM/TfoUIbISibu2pFin k/LThro/0zsk3NBkL2tRHIO+c0RlNw0WC2JhASkRp0D/xQTSvyhltQa2c9P2MNo8AW+eA1lxuzi DquPElozrRvGoLC/Hil5nLtM9AEt2ZHBGZTIVQRtkQY4hIqynhG4wbEqZwznIkA+SE8VYRXffB3 nbA7cizHsFk6OKXL6FLBSKk+/PD62ySXnjssaY7ZxtZu3CEZhIIfFwmzhynXqgvX0SHmSla28RA dps6kzO+RiRFcEMYylFoK/DVMBnJ6vsxw14pCbOW2512ll6ufzRgZ2tHDYIiJNDDH5uKDLojf3t qRiVdF7XZPP2BmgRc2X2I4lpslmizgVc/GVqyoTEwbdqiKiB0k4J6+A8vW6WH8gA00cqC056BXz rpGzlz4jA+XE4qElWXAxVdouw/+uF+qaM4wuFTP7v32gf6IXGg8+vBt2mFt8MCZyzgXuSEjd9bO hpoooJHV73J+XOtAZTTpeComZfXT5MRTcO0Rcmbgg== X-Received: by 2002:a05:6820:4c17:b0:659:9a49:8f04 with SMTP id 006d021491bc7-662cab0991fmr870166eaf.21.1769144307361; Thu, 22 Jan 2026 20:58:27 -0800 (PST) Received: from security.cs.northwestern.edu (security.cs.northwestern.edu. [165.124.184.136]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-662cb662e90sm600579eaf.14.2026.01.22.20.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jan 2026 20:58:27 -0800 (PST) From: Ziyi Guo To: Jeff Johnson Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, linux-kernel@vger.kernel.org, Ziyi Guo Subject: [PATCH] wifi: ath10k: sdio: add missing lock protection in ath10k_sdio_fw_crashed_dump() Date: Fri, 23 Jan 2026 04:58:22 +0000 Message-Id: <20260123045822.2221549-1-n7l8m4@u.northwestern.edu> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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 c06d50db40b8..00d0556dafef 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); =20 + mutex_lock(&ar->dump_mutex); + + spin_lock_bh(&ar->data_lock); ar->stats.fw_crash_counter++; + spin_unlock_bh(&ar->data_lock); =20 ath10k_sdio_disable_intrs(ar); =20 @@ -2505,6 +2509,8 @@ void ath10k_sdio_fw_crashed_dump(struct ath10k *ar) =20 ath10k_sdio_enable_intrs(ar); =20 + mutex_unlock(&ar->dump_mutex); + ath10k_core_start_recovery(ar); } =20 --=20 2.34.1