Re: [PATCH v6] Bluetooth: hci_event: move wake reason storage into validated event handlers
From: patchwork-bot+bluetooth
Date: Thu Mar 26 2026 - 17:40:37 EST
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>:
On Thu, 26 Mar 2026 17:31:24 +0000 you wrote:
> hci_store_wake_reason() is called from hci_event_packet() immediately
> after stripping the HCI event header but before hci_event_func()
> enforces the per-event minimum payload length from hci_ev_table.
> This means a short HCI event frame can reach bacpy() before any bounds
> check runs.
>
> Rather than duplicating skb parsing and per-event length checks inside
> hci_store_wake_reason(), move wake-address storage into the individual
> event handlers after their existing event-length validation has
> succeeded. Convert hci_store_wake_reason() into a small helper that only
> stores an already-validated bdaddr while the caller holds hci_dev_lock().
> Use the same helper after hci_event_func() with a NULL address to
> preserve the existing unexpected-wake fallback semantics when no
> validated event handler records a wake address.
>
> [...]
Here is the summary with links:
- [v6] Bluetooth: hci_event: move wake reason storage into validated event handlers
https://git.kernel.org/bluetooth/bluetooth-next/c/3e7e7f4bdbe5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html