2022-03-12 18:07:17

by Mike Lothian

[permalink] [raw]
Subject: [PATCH] Bluetooth: hci_event: Remove excessive bluetooth warning

Fixes: 3e54c5890c87a ("Bluetooth: hci_event: Use of a function table to handle HCI events")
Signed-off-by: Mike Lothian <[email protected]>
---
net/bluetooth/hci_event.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index fc30f4c03d29..aa57fccd2e47 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -6818,14 +6818,6 @@ static void hci_event_func(struct hci_dev *hdev, u8 event, struct sk_buff *skb,
return;
}

- /* Just warn if the length is over max_len size it still be
- * possible to partially parse the event so leave to callback to
- * decide if that is acceptable.
- */
- if (skb->len > ev->max_len)
- bt_dev_warn(hdev, "unexpected event 0x%2.2x length: %u > %u",
- event, skb->len, ev->max_len);
-
data = hci_ev_skb_pull(hdev, skb, event, ev->min_len);
if (!data)
return;
--
2.35.1


2022-03-14 02:03:04

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: hci_event: Remove excessive bluetooth warning

This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----
error: patch failed: net/bluetooth/hci_event.c:6818
error: net/bluetooth/hci_event.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch


Please resolve the issue and submit the patches again.


---
Regards,
Linux Bluetooth

2022-03-14 22:03:31

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: hci_event: Remove excessive bluetooth warning

Hi Mike,

> Fixes: 3e54c5890c87a ("Bluetooth: hci_event: Use of a function table to handle HCI events")
> Signed-off-by: Mike Lothian <[email protected]>
> ---
> net/bluetooth/hci_event.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index fc30f4c03d29..aa57fccd2e47 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -6818,14 +6818,6 @@ static void hci_event_func(struct hci_dev *hdev, u8 event, struct sk_buff *skb,
> return;
> }
>
> - /* Just warn if the length is over max_len size it still be
> - * possible to partially parse the event so leave to callback to
> - * decide if that is acceptable.
> - */
> - if (skb->len > ev->max_len)
> - bt_dev_warn(hdev, "unexpected event 0x%2.2x length: %u > %u",
> - event, skb->len, ev->max_len);
> -

which event type is this? You need to have a commit message giving details. I am also pretty sure that this is broken hardware and we can go for ratelimited version, but the warning is justified if the hardware is stupid. If our table is wrong, we fix the table, but not just silence an unpleasant warning.

Regards

Marcel