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=1796383307; b=0JzlH7Z4Om1IMf4WZZ8HrIiKJC2femlgVrKwgWrBYlTguoNC6L5aCBvmuFsR0pS97tvb ZKUwX85HvpWfYvK+V8H7f6km58Qink8cWV5lveliWVb9qpiJYeR2tioCQQkN3gnheTyVF LkDGq+AKNc3HdEZsquBFKX3lN87CZ6WGrA3gYnBjl4TcKbwCrdeCGSp9ImjNvVyGJQS8c oCzFAy/j59l8WGPgQXJG6W+qKFpcQPTY4QAuxY9FQRALiK1mc4cdK3KXXvyjgit3glpR2 TatsB3i+oox6MXgtPsJBi7Y7NBcz2/maiev+RgitELWArckz+6Vp2c2VDU37RZwZEyg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383307; 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=iY0/dgvHVMZg9XKzTovKfmr2bOtuiFcfmID68sTYKxM=; b=MBddmicJzmyZlmPMvVKQkcuhfvlq20qleE88QjWArno4XkK4X0+Bir/f+5lddrAVoiF8 asIP52GQo2H47tsZMGJNTAeKSXOpnG56XpGalZrasrSyxTqKX25uPuKnvuTNby3p5775M FSU3AzHJek9iLHBXpekbPJGKMqnsjHNtnQzECBJz2OjTW85GElgl6ot2Uuc9NoIW8RKk0 k1YOGtFicTDAO1GdRlqVjiCP3j22EMy3HttZTY/DnqocEBj2NfJmwbPhrioyyUIEZpsyZ n7AgSE88ikTAleNECVYUBbWf5I67SLg6eZN4cp+Iz2CixXTU7ukTKTspUKnL4BQtCcA== 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=R3bQNFEr; 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 6167C606A32C; Fri, 4 Dec 2026 11:21:47 +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=R3bQNFEr Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE91B1F000C2; Fri, 4 Dec 2026 11:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383307; bh=iY0/dgvHVMZg9XKzTovKfmr2bOtuiFcfmID68sTYKxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=R3bQNFErYW3wA7e95qthcGW0KZ99vmMddFKoqD/Z/Wd4bjNku06njQNQNGcRTXq+G +0EX2JFhwgjXzAwCWM4S7xmHVsDHcTasNg9xRYP9hh9YFjoRh5kvPYmKARvkV4neNN HH5lt+nMRhuYXanvPjBs4m24u0IWFNpXA2FTBmCs= 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.12 169/555] Bluetooth: hci_core: Take req_sync lock in hci_power_on() Date: Fri, 4 Dec 2026 19:03:32 +0900 Message-ID: <20261204100614.651566086@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@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.12-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 d2fcccdf482e0..e42ba4743f25f 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