From nobody Fri Jan 9 01:03:25 2026 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 735E07B3E1 for ; Mon, 5 Jan 2026 00:27:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767572831; cv=none; b=DD+MVFPR6FiR1I8pSFM1txw00IPDAvFjog8AYiYRwiGJlqVxYREVzpEKIp7+H7VVd9Vd/mtMg8UvC3/hOxP9sLN2RS4TdFG5JtgXl39LPLD/J4xqxp3HQBqjxtHh32fIW4bQhwySWo2j6W6YlyfbgJ79NCDvCc25ViMX/P21E+E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767572831; c=relaxed/simple; bh=TwK5yG1+7tBn7pEnm2Ulp9jAVc15XSZWmUbdiepn8ZU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bEunJXUBemyjI0y1jkDDRUqLRFKyLgGWw7TPfb8MWAbyom9hpSYdvVitv8pVc/zVsDh8jrlXsDedxL5yX0x9/Y3nhX4MblYovXdT4qPePUwLBsRvqCq38xcRiMfoY3mKwj2AZYrqbKWReDQw4hbvnE6dSBHxNrqn/Dh45f4QfZE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=d/kJHEr7; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d/kJHEr7" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2a110548cdeso181741315ad.0 for ; Sun, 04 Jan 2026 16:27:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767572828; x=1768177628; 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; bh=Lx7Cxs6mPWElG9bplppz5XOkNbtbfz1JGfVMLJ0UqF4=; b=d/kJHEr7q3emXHT/zQLlKeFARXVu7ZG7xF7DSHu5CHUj7EkNjg1aFdo7sWMGgMbY5o or2vC8lIWzCcOoWCUyNKp6P++vbMwZEU/XVVmg6AX1/ScLFpnrSIfhLaL5nMkv2fpcWe qEIBR+RgneqiLSWml9rqKq5jcyAq/JzYcFVU6UTkOdD0CQdE5X0a1ijuouZ6TYgDvgAj vRpcXp+tbrOq8rzR2PqUmlruE3vJUM27HCQUdoiBLy0dqKLFa4C2mPrWN5P/mYRweLlu cfbT8RTKLA525iz1uigdQYRclT5ITNHLpsYy9HLIx06ae1tTpW+uDS1GQ3KExMtNsf/X AAKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767572828; x=1768177628; 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; bh=Lx7Cxs6mPWElG9bplppz5XOkNbtbfz1JGfVMLJ0UqF4=; b=Y9UDI/+JmZ20nUnQv1eXwHHxZD9l/Rromrx35B9nHIjgFoecMN6mDSYVj0TCOhazeq asVovt6upyOdwjRtgKK6p+cAf9r7NypJY4JC2AdPY/2jpYjwLZiKFQ72NkvuqoOAIdCh HVqU0SatxEq3g6bx82eukkXhkPtgaKk7N3eqqrQ/L60t+T5gOFweqBKdwPnEiOHgCdbh eY6YzHD99zzGa98BJ9CYQfkgmg1fJfGaBKVLoQiy+v1Kt5WPdg4y0/9aZ4VQb2pbrcL3 C5vcufBFnuMBw58/QFCMv3CP0mNL4Jilm+pux2i19DsWARNiIRPg3Mfn4wIJMqYpJb/N S/xg== X-Forwarded-Encrypted: i=1; AJvYcCW4paDA/ZWmLZpBrtKYQqMZiEuJ2j3BRhb/OTGPlyZrvoiG/f+kZbeqJa33n2DXg0O0IM9iHi08uVei/Y0=@vger.kernel.org X-Gm-Message-State: AOJu0Yy4jtnN0nZ553JJbi8iyR0wxdQjsDqLD/cPDykNHWS752nysr7E Y37Hp2angXHZBs+/pVkI+auySsXkgGaLm3/9o3DCJ3ecH6ychnBrWYzE X-Gm-Gg: AY/fxX6aBhL6OM/MbxqBH6rjV4ap64TQZ7C/BJIMa4smd2rPXpz3AEaHHxN75PM2pYn yaoj9mD6uyNquvJvO+0IfIWN90BMUD9YoGDBFXPV3F5nrC4jsWnTL19++ZlnSd2ig78CcAEw/Bb uVy/SWeNfK2MfbADihQpTghQlvnwjkSrOhRZaF6wbqf6GqTAGSnQltHe+5Lu0Q9QTFCGIc0b/bL 9sG4bCqbG5GyMPMPIQDiTmIyztoglc5c/AkLUyU4YGvJBq438apxINumChTFUOr17j0aVoYmen+ ZAPvkXWqB8O5q4c2EFQwrd7MnrFjTfLEvP9u+fPelHiw7oQeAji3nkYCkXVgMeXuuJig+5fKs8k 739E51912FKB6l6nCdnD1Edw/6Y/Uk+c78PTOA86/ynXkkuLkQI48+6QXTy3UEaoGwRicNdELnr J60lZPKVvXDbN7KjCkwTB9jMWXWrB3wGUZUp0GfkvhKxyFKe0hF2/2IHuY2Mp+KIo= X-Google-Smtp-Source: AGHT+IF2dXIfKchGTeNJHu2azmCNIm50WiML6/yJZT6JBX6bohZ5k2MDH1QBCndrXw+T70AJIWjSig== X-Received: by 2002:a05:7022:eacd:b0:119:e569:fba6 with SMTP id a92af1059eb24-121722c348emr53252639c88.21.1767572828149; Sun, 04 Jan 2026 16:27:08 -0800 (PST) Received: from zubuntu.bengal-mercat.ts.net ([2001:5a8:60d:bc9:9ebf:dff:fe00:f8f2]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-121724de268sm133378109c88.8.2026.01.04.16.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jan 2026 16:27:07 -0800 (PST) From: Zac Bowling To: zbowling@gmail.com Cc: deren.wu@mediatek.com, kvalo@kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-wireless@vger.kernel.org, lorenzo@kernel.org, nbd@nbd.name, ryder.lee@mediatek.com, sean.wang@mediatek.com Subject: [PATCH 16/17] wifi: mt76: mt7925: add mutex protection in resume path Date: Sun, 4 Jan 2026 16:26:37 -0800 Message-ID: <20260105002638.668723-17-zbowling@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260105002638.668723-1-zbowling@gmail.com> References: <20260102200524.290779-1-zbowling@gmail.com> <20260105002638.668723-1-zbowling@gmail.com> 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" Add mutex protection around mt7925_mcu_set_deep_sleep() and mt7925_mcu_regd_update() calls in the resume path to prevent potential race conditions during resume operations. These MCU operations require serialization, and the resume path was the only call site missing mutex protection. Without this, concurrent access during resume could corrupt firmware state or cause race conditions with other MCU commands. Found by static analysis (sparse/coccinelle) pattern matching for unprotected MCU function calls. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt= 7925 chips") Signed-off-by: Zac Bowling --- drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c b/drivers/net/= wireless/mediatek/mt76/mt7925/pci.c index e9d62c6aee91..3a9e32a1759d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c @@ -584,10 +584,12 @@ static int _mt7925_pci_resume(struct device *device, = bool restore) } =20 /* restore previous ds setting */ + mt792x_mutex_acquire(dev); if (!pm->ds_enable) mt7925_mcu_set_deep_sleep(dev, false); =20 mt7925_mcu_regd_update(dev, mdev->alpha2, dev->country_ie_env); + mt792x_mutex_release(dev); failed: pm->suspended =3D false; =20 --=20 2.51.0