public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_bcm4377: Fix msgid release
@ 2023-11-14  7:05 Hector Martin
  2023-11-14  7:32 ` bluez.test.bot
  2023-11-14 15:13 ` [PATCH] " Neal Gompa
  0 siblings, 2 replies; 3+ messages in thread
From: Hector Martin @ 2023-11-14  7:05 UTC (permalink / raw)
  To: Sven Peter, Alyssa Rosenzweig, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz
  Cc: Aditya Garg, Luiz Augusto von Dentz, asahi, linux-arm-kernel,
	linux-bluetooth, linux-kernel, stable, Hector Martin

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@live.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hector Martin <marcan@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@marcan.st>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: Bluetooth: hci_bcm4377: Fix msgid release
  2023-11-14  7:05 [PATCH] Bluetooth: hci_bcm4377: Fix msgid release Hector Martin
@ 2023-11-14  7:32 ` bluez.test.bot
  2023-11-14 15:13 ` [PATCH] " Neal Gompa
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-11-14  7:32 UTC (permalink / raw)
  To: linux-bluetooth, marcan

[-- Attachment #1: Type: text/plain, Size: 2179 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=800912

---Test result---

Test Summary:
CheckPatch                    FAIL      0.84 seconds
GitLint                       PASS      0.22 seconds
SubjectPrefix                 PASS      0.07 seconds
BuildKernel                   PASS      28.15 seconds
CheckAllWarning               PASS      30.67 seconds
CheckSparse                   PASS      36.38 seconds
CheckSmatch                   PASS      99.46 seconds
BuildKernel32                 PASS      27.21 seconds
TestRunnerSetup               PASS      423.58 seconds
TestRunner_l2cap-tester       PASS      23.34 seconds
TestRunner_iso-tester         PASS      37.47 seconds
TestRunner_bnep-tester        PASS      7.03 seconds
TestRunner_mgmt-tester        PASS      169.49 seconds
TestRunner_rfcomm-tester      PASS      10.98 seconds
TestRunner_sco-tester         PASS      14.79 seconds
TestRunner_ioctl-tester       PASS      12.41 seconds
TestRunner_mesh-tester        PASS      8.96 seconds
TestRunner_smp-tester         PASS      9.94 seconds
TestRunner_userchan-tester    PASS      7.40 seconds
IncrementalBuild              PASS      26.28 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
Bluetooth: hci_bcm4377: Fix msgid release
WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#78: 
Reported-by: Aditya Garg <gargaditya08@live.com>
Cc: stable@vger.kernel.org

total: 0 errors, 1 warnings, 8 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13454901.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: hci_bcm4377: Fix msgid release
  2023-11-14  7:05 [PATCH] Bluetooth: hci_bcm4377: Fix msgid release Hector Martin
  2023-11-14  7:32 ` bluez.test.bot
@ 2023-11-14 15:13 ` Neal Gompa
  1 sibling, 0 replies; 3+ messages in thread
From: Neal Gompa @ 2023-11-14 15:13 UTC (permalink / raw)
  To: Hector Martin
  Cc: Sven Peter, Alyssa Rosenzweig, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, Aditya Garg, Luiz Augusto von Dentz,
	asahi, linux-arm-kernel, linux-bluetooth, linux-kernel, stable

On Tue, Nov 14, 2023 at 2:05 AM Hector Martin <marcan@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@live.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Hector Martin <marcan@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@marcan.st>
>
>

LGTM.

Reviewed-by: Neal Gompa <neal@gompa.dev>


-- 
真実はいつも一つ!/ Always, there's only one truth!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-14 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-14  7:05 [PATCH] Bluetooth: hci_bcm4377: Fix msgid release Hector Martin
2023-11-14  7:32 ` bluez.test.bot
2023-11-14 15:13 ` [PATCH] " Neal Gompa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox