[PATCH] Bluetooth: hci_bcm4377: Fix msgid release
Neal Gompa
neal at gompa.dev
Tue Nov 14 07:13:43 PST 2023
On Tue, Nov 14, 2023 at 2:05 AM Hector Martin <marcan at marcan.st> wrote:
>
> We are releasing a single msgid, so the order argument to
> bitmap_release_region must be zero.
>
> In practice this was probably harmlessly masked to 0 anyway, which is
> why it worked, but it trips ubsan.
>
> Fixes: 8a06127602de ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards")
> Reported-by: Aditya Garg <gargaditya08 at live.com>
> Cc: stable at vger.kernel.org
> Signed-off-by: Hector Martin <marcan at marcan.st>
> ---
> drivers/bluetooth/hci_bcm4377.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
> index 19ad0e788646..5e9f79235cde 100644
> --- a/drivers/bluetooth/hci_bcm4377.c
> +++ b/drivers/bluetooth/hci_bcm4377.c
> @@ -715,7 +715,7 @@ static void bcm4377_handle_ack(struct bcm4377_data *bcm4377,
> ring->events[msgid] = NULL;
> }
>
> - bitmap_release_region(ring->msgids, msgid, ring->n_entries);
> + bitmap_release_region(ring->msgids, msgid, 0);
>
> unlock:
> spin_unlock_irqrestore(&ring->lock, flags);
>
> ---
> base-commit: ffc253263a1375a65fa6c9f62a893e9767fbebfa
> change-id: 20231114-bluetooth-msgid-fix-29769be7e45b
>
> Best regards,
> --
> Hector Martin <marcan at marcan.st>
>
>
LGTM.
Reviewed-by: Neal Gompa <neal at gompa.dev>
--
真実はいつも一つ!/ Always, there's only one truth!
More information about the linux-arm-kernel
mailing list