From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381826; b=AzW6dyY1kpzDz8zZwmmm4wgTBogQ+5ENMz4xDkQeM42A2hJIFZHA8+BhG4vQ+KiHmTTe 8iOpcrj2F6ut8Zyh89vJt/Ie8FLXq6cw13bA5ygtagMSTDVhtx0Xw8IK8VZRLuCS3zPNp tVUirADjSomv8px0SzsvH5myQRxI/gNWEUIWA0UUL27PKG7mgsNoVDZjbDUHcV9cP8H4z tfixWmBHUMsiPumgh1IkrJI71/leqb1nq8FncKSNiGWfQC0Cqoa5YeVPSwk5pAdSX0UD9 lx3KawcRh04/W2ZHConXmyXK7Eace9KssLVx1aKgGhqL99n4DnirBOe4EYKzhPZh3eQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381826; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=GUKHYc0G/LqT2qvinMCshudifD+aaK2iTPOuUPAPsW8=; b=zWuUg9q5WdTqIfCmwiT0DljQuKrdCw3wDW8N2j8RnaIgtT94ubQXELmEWAP+msDMVPeo NPtYnlCF2yWY3SO5dMn8j96wuRU2G4VKstQGegguvGbwjC7OcazM7mO9CXfBHRM1opAW/ iRkAvR2irtVSjAkKQ6BNKrZVSCEbDy0XYhlRAfyyc9AmT27by6wdqVH6SY1iJ+4FySsuk MkWsaZ0JeYUdG9inp07qT9Go/lLLp7w0/54TDC3mfG8w/Ouul1GpMeWlDaleaLQ3e1Hje KK0jU8KQNwN8x2h5gO4ZoNMhAvagN1wHaCHQZZmAc5JdGkWAYyjbc80xudBMPkMhj3g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=FGhBIIB8; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22C22606A32D; Fri, 4 Dec 2026 10:57:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=FGhBIIB8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A1E71F000C2; Fri, 4 Dec 2026 10:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381826; bh=GUKHYc0G/LqT2qvinMCshudifD+aaK2iTPOuUPAPsW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FGhBIIB8vuBe19hQwD3tLl3l1HVqrsbTI8JyQ3p0X9UwK4FMjwpk3ndDEhkJhCiQU ll7u0J2fVeV35UaXupTZP2KBZxErS0MuDL9xC8p/SwHplYtSV1SDfgkYDb6iei2yez YpdPSCqr91foNDqwVQ0WUfCgqihWGLoA4tyFpZmw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 6.18 149/703] Bluetooth: hci_core: Take req_sync lock in hci_power_on() Date: Fri, 4 Dec 2026 19:00:48 +0900 Message-ID: <20261204100631.863280441@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luiz Augusto von Dentz [ Upstream commit 6a296a4658124490d7dddd2b751e5f9ae5c5aec7 ] hci_powered_update_sync() issues synchronous HCI commands but was called without hci_req_sync_lock(), racing with other request users. Reported-by: Sashiko Link: https://sashiko.dev/#/bug/linux-1baf7393-3aeb-4fa5-806f-19cea743b9f3 Fixes: cf75ad8b41d2 ("Bluetooth: hci_sync: Convert MGMT_SET_POWERED") Assisted-by: OpenCode:claude-fable-5.2 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- net/bluetooth/hci_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 54a8942a022ec..f8a3c97d8e70f 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -951,7 +951,9 @@ static void hci_power_on(struct work_struct *work) hci_dev_test_flag(hdev, HCI_MGMT) && hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF)) { cancel_delayed_work(&hdev->power_off); + hci_req_sync_lock(hdev); err = hci_powered_update_sync(hdev); + hci_req_sync_unlock(hdev); mgmt_power_on(hdev, err); return; } -- 2.53.0