From nobody Tue Feb 10 02:01:12 2026 Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (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 EBC9D219A8A for ; Sun, 25 Jan 2026 19:40:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769370046; cv=none; b=AbTzTv73K2Dj1ciFV5fCP8JvFHzXMkB3jVHzSl2xX7iYlFy2fr9GMtZl0MRWw9f4LZEr4SDbXw7/2bCYlb4Nzp52EFqCyGg59yOA6mz7jc/YHA18FV53ELMZFxiFzwZqibDOtFVJ0Eqk3uqmgnBhnhnjvg4pY7WKbHg2jr0+xRU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769370046; c=relaxed/simple; bh=NDw0zdlNccBo0OEGcTqzdJEKe4tgfmzrwRyhiRthcVU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Dr+sEZADVgN6+XO10YbfSntRT9m7fbaPVla6vz0BvdRYJns7WnrzMlHXDtBv2p2CPHSOiOwDCueHgyICTKSCseG8Vk1NhVRTEW4k8iirkLeAcBZL2U9VQeGn1q9QLQnFc6Eihb4LYC6i34lA9R+vemREVW9SJOoC/cDyUl+U6eM= 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=KO4VDU6u; arc=none smtp.client-ip=209.85.210.54 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="KO4VDU6u" Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-7cfd0f349c4so2451685a34.1 for ; Sun, 25 Jan 2026 11:40:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u-northwestern-edu.20230601.gappssmtp.com; s=20230601; t=1769370044; x=1769974844; 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=ujBxaUbZpVezvFs0113sYpNtSpcNhJdPNBv65Q63G8w=; b=KO4VDU6u5SNdNTKMe0jk8amn08v1lNE+RtxuoILbQE2zyYgzaYoxh+o9MZCiagVZGL YfaCSMZxlCZEB2PhVOzX6scCsYrXv1q9YpCqxA6O/0eXnGKYGDzq4aZtms0WjRHzaOYR 1j24P8KAzgflWMm0ekgxiQUsqlJZC3Ar9IfsnHfJ+t7Y6RGoKA3N8I2qDYX8Zvo9FApv YHd1rQj32v5dlmNw2eQUYp4gPmJrw0C2mV9buTwDL0cbOL3cK7TNDJv3aIS7Y3ahXzIq 5mmdPVyB+T0Cb5BrAV7eaWX0bQiMPcjgl/SId9El7908s43xLvBeuJbewFaDaJ5GYlfU tNQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769370044; x=1769974844; 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=ujBxaUbZpVezvFs0113sYpNtSpcNhJdPNBv65Q63G8w=; b=FqZ4U23fUXOKHdgfpSGnDBxD7hCeVb33yp3fg89UrC4/Th2V/MNsgMY9RIHiHVN6+t 9ItJU9PQIY++cFXGMDLSlb4DVqK1M8BAiBrpPhjsVmMAaXE+owSTUUDjBdLKhvlmWr1a 783+a2omvFuUahRb+ls8RJafFXyr4x3SoEaQOTU4gS0VTlH8sXiSrKWNKO/w+mKUlEbA x0gkvxtqPuhsUp/vQaih3yKsK1WLfvOYnxEy2//cMlO2g0/wkWqE/2n2HA3MK+AjwvBE XqZZuncBDqfe6ZW7sWR+NfQ9z3XGIhnJPsKPlmfH6T6OI51MeTbaZad/kzm45I3huEW3 HCFg== X-Forwarded-Encrypted: i=1; AJvYcCWR05zfb1ycCvxPyXebt+/PPTclbp+tWHkAogQs8dkxEMPUWGAazJIIC1kV7Jk9hHvtEUD+mweFDiODnUw=@vger.kernel.org X-Gm-Message-State: AOJu0YyW7A/ZIKzCJLO/snW8BgkdYbY5jTsbE6edoWg9xM9SNGhjyhtq 4ToGj+2+7KNs71pnxtCHfPVBD00TZtAJeUGSJisAlv7rANUHJdmBhICgZ1UDLJBE2wk= X-Gm-Gg: AZuq6aISfVOZ/EqvXDH3rvlseq+xjOM2IDM+mT+N48PAwd2qZ1o1o1zynqQk/dpvEui BHUVOVG57unLEbCPav869c1VjprLMfJk4wbwAA2aD+3H2nH9QwlbRvNQCVykh1WjIKjp/6wgl5f aTKwkaFy9HJu5jQj3OH8UBqZe54qmpz7MjnLoMBkoM87Njq+lBD9fUMMahYhOiXVwa7XXxPscsc /isTLr/y63AOarGMV1pHdFVyNHNkeKm4UugFvNLE1fXkr8R5zwNEiF9hchjscERNLxxdjdyAXMn DmATW+kA2UnulILoP0HSqgh6O/rKqc7LAZlqyKY0QXrNU3PJQ3PHmCDBiOsmcs6j5NDXE6QegQY 598fdBdSz659GSGh3T9pqlw3GsCrEPX23HmL3K5eW724JXuoWav/3k/ATQgmw+YBUQxHU4n6PyV 74LqhTyBTj3p6+FWZNj6Nj7sbBUbdg0f9axKLKPlCIjr5XEpLic6dfhqIXfNZBI1+zL9SDPsf/9 7XkLRt0wgMkJZT3C1Ot+lUmF3pIbk4= X-Received: by 2002:a05:6830:6102:b0:7c7:4f2:e15d with SMTP id 46e09a7af769-7d170223bfdmr1559368a34.16.1769370043771; Sun, 25 Jan 2026 11:40:43 -0800 (PST) Received: from security.cs.northwestern.edu (security.cs.northwestern.edu. [165.124.184.136]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d15b346e2asm6426106a34.2.2026.01.25.11.40.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jan 2026 11:40:43 -0800 (PST) From: Ziyi Guo To: Stanislaw Gruszka Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Ziyi Guo Subject: [PATCH] wifi: iwlegacy: add missing mutex protection in il4965_store_tx_power() Date: Sun, 25 Jan 2026 19:40:39 +0000 Message-Id: <20260125194039.1196488-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" il4965_store_tx_power() calls il_set_tx_power() without holding il->mutex. However, il_set_tx_power() has lockdep_assert_held(&il->mutex) indicating that callers must hold this lock. All other callers of il_set_tx_power() properly acquire the mutex: - il_bg_scan_completed() acquires mutex at common.c:1683 - il_mac_config() acquires mutex at common.c:5006 - il3945_commit_rxon() and il4965_commit_rxon() are called via work queues that hold the mutex (like il4965_bg_alive_start) Add mutex_lock()/mutex_unlock() around the il_set_tx_power() call in the sysfs store function to fix the missing lock protection. Signed-off-by: Ziyi Guo Acked-by: Stanislaw Gruszka --- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/w= ireless/intel/iwlegacy/4965-mac.c index 3588dec75ebd..57fa866efd9f 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c @@ -4606,7 +4606,9 @@ il4965_store_tx_power(struct device *d, struct device= _attribute *attr, if (ret) IL_INFO("%s is not in decimal form.\n", buf); else { + mutex_lock(&il->mutex); ret =3D il_set_tx_power(il, val, false); + mutex_unlock(&il->mutex); if (ret) IL_ERR("failed setting tx power (0x%08x).\n", ret); else --=20 2.34.1