ep->num_responses is a member in a packed structure, and arithmetic manipulations on it don't work well at least on aarch64.
So if ep->num_responses == 1, ep->num_responses -1 will be 251 :-( and this breaks all iterator code that follows.
Details
Apply patch, then run:
- hccontrol le_enable enable
- hccontrol le_set_scan_enable enable
Without the patch the second command results in kernel panic (on Pine64 which is 64-bit ARM). With the patch it completes OK and I can later use "hccontrol read_neighbor_cache" to see the list of LE devices.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 27314
Event Timeline
sys/netgraph/bluetooth/hci/ng_hci_evnt.c | ||
---|---|---|
395–396 | This original loop modifies the record field "num_reports" directly inside the netgraph data. Please explain, why this change in functionality is allowed in this context. | |
400 | The error message is very generic and not helpful for the end user. |