Hi Lizardo, On Wed, Apr 27, 2011, Anderson Lizardo wrote: > On Wed, Apr 27, 2011 at 7:04 PM, <johan.hedberg@xxxxxxxxx> wrote: > > @@ -2447,14 +2447,47 @@ static inline void hci_user_confirm_request_evt(struct hci_dev *hdev, > > struct sk_buff *skb) > > { > > struct hci_ev_user_confirm_req *ev = (void *) skb->data; > > + int loc_mitm, rem_mitm; > > + struct hci_conn *conn; > > > > BT_DBG("%s", hdev->name); > > > > hci_dev_lock(hdev); > > > > - if (test_bit(HCI_MGMT, &hdev->flags)) > > - mgmt_user_confirm_request(hdev->id, &ev->bdaddr, ev->passkey); > > + if (!test_bit(HCI_MGMT, &hdev->flags)) > > + goto unlock; > > You lock hdev for checking hdev->flags, but not for reading hdev->name > on the BT_DBG() call. Is that ok? I suppose hdev->name can be considered a read-only value as it never changes after the HCI dev is created. There's also lots of other places in hci_event.c that access it without locking, so I think this should be fine. Johan -- 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