Hi Johan, > The current global pending command list in mgmt.c is racy. Possibly the > simplest way to fix it is to have per-hci dev lists instead of a global > one (all commands that need a pending struct are hci_dev specific). > This way the list can be protected using the already existing per-hci > dev lock. To enable this refactoring the first thing that needs to be > done is to ensure that the mgmt functions have access to the hci_dev > struct (instead of just the dev id). > > Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx> > --- > include/net/bluetooth/hci_core.h | 61 ++++++----- > net/bluetooth/hci_core.c | 16 ++-- > net/bluetooth/hci_event.c | 63 ++++++------ > net/bluetooth/mgmt.c | 206 +++++++++++++++++++------------------ > 4 files changed, 178 insertions(+), 168 deletions(-) makes sense to me. Acked-by: Marcel Holtmann <marcel@xxxxxxxxxxxx> Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html