Message ID | 20220125185305.2419774-1-luiz.dentz@gmail.com |
---|---|
State | New |
Headers | show |
Series | Bluetooth: hci_event: Fix HCI_EV_VENDOR max_len | expand |
Hi I've only just noticed this patch solves my issue https://lore.kernel.org/netdev/20220125144639.2226-1-mike@fireburn.co.uk/ Can it be added to stable too? My patch can then be ignored: https://patchwork.kernel.org/project/bluetooth/patch/20220312164550.1810665-1-mike@fireburn.co.uk/ Thanks Mike
Hi Mike, On Mon, Mar 14, 2022 at 6:50 AM Mike Lothian <mike@fireburn.co.uk> wrote: > > Hi > > I've only just noticed this patch solves my issue > > https://lore.kernel.org/netdev/20220125144639.2226-1-mike@fireburn.co.uk/ > > Can it be added to stable too? > > My patch can then be ignored: > > https://patchwork.kernel.org/project/bluetooth/patch/20220312164550.1810665-1-mike@fireburn.co.uk/ > > Thanks > > Mike We fixed this a while back: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/net/bluetooth/hci_event.c?id=314d8cd2787418c5ac6b02035c344644f47b292b
On Mon, 14 Mar 2022 at 17:30, Luiz Augusto von Dentz <luiz.dentz@gmail.com> wrote: > > > We fixed this a while back: > > https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/net/bluetooth/hci_event.c?id=314d8cd2787418c5ac6b02035c344644f47b292b > > -- > Luiz Augusto von Dentz Yes, and it looks like that commit is queued for kernel 5.18. I was hoping you could get it added into 5.17 where I'm seeing spurious messages during boot, before it's released Thanks Mike
Hi Marcel, On Mon, Mar 14, 2022 at 11:31 AM Mike Lothian <mike@fireburn.co.uk> wrote: > > On Mon, 14 Mar 2022 at 17:30, Luiz Augusto von Dentz > <luiz.dentz@gmail.com> wrote: > > > > > > We fixed this a while back: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/net/bluetooth/hci_event.c?id=314d8cd2787418c5ac6b02035c344644f47b292b > > > > -- > > Luiz Augusto von Dentz > > Yes, and it looks like that commit is queued for kernel 5.18. I was > hoping you could get it added into 5.17 where I'm seeing spurious > messages during boot, before it's released > Can we perhaps merge it to bluetooth.git so we send a pr to be included in 5.17?
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 664ccf1d8d93..63b925921c87 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -6844,7 +6844,7 @@ static const struct hci_ev { HCI_EV(HCI_EV_NUM_COMP_BLOCKS, hci_num_comp_blocks_evt, sizeof(struct hci_ev_num_comp_blocks)), /* [0xff = HCI_EV_VENDOR] */ - HCI_EV(HCI_EV_VENDOR, msft_vendor_evt, 0), + HCI_EV_VL(HCI_EV_VENDOR, msft_vendor_evt, 0, HCI_MAX_EVENT_SIZE), }; static void hci_event_func(struct hci_dev *hdev, u8 event, struct sk_buff *skb, @@ -6869,8 +6869,9 @@ static void hci_event_func(struct hci_dev *hdev, u8 event, struct sk_buff *skb, * 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); + bt_dev_warn_ratelimited(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)