From: Johan Hedberg <johan.hedberg@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/7] Bluetooth: Add automated SSP user confirmation responses
Date: Wed, 27 Apr 2011 16:46:05 -0700 [thread overview]
Message-ID: <20110427234605.GA3022@jh-x301> (raw)
In-Reply-To: <BANLkTinxDHjLjAPqMLys3nxsjkHNnM=x0A@mail.gmail.com>
Hi Lizardo,
On Wed, Apr 27, 2011, Anderson Lizardo wrote:
> On Wed, Apr 27, 2011 at 7:04 PM, <johan.hedberg@gmail.com> 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
prev parent reply other threads:[~2011-04-27 23:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 23:04 [PATCH 1/7] Bluetooth: Add automated SSP user confirmation responses johan.hedberg
2011-04-27 23:04 ` [PATCH 2/7] Bluetooth: Add variable SSP auto-accept delay support johan.hedberg
2011-04-27 23:04 ` [PATCH 3/7] Bluetooth: Fix HCI_CONN_AUTH_PEND flag for all authentication requests johan.hedberg
2011-04-27 23:04 ` [PATCH 4/7] Bluetooth: Add confirm_hint parameter to user confirmation requests johan.hedberg
2011-04-27 23:04 ` [PATCH 5/7] Bluetooth: Fix reason code for pairing rejection johan.hedberg
2011-04-27 23:04 ` [PATCH 6/7] Bluetooth: Fix logic in hci_pin_code_request_evt johan.hedberg
2011-04-27 23:04 ` [PATCH 7/7] Bluetooth: Fix link key persistent storage criteria johan.hedberg
2011-04-27 23:47 ` Anderson Lizardo
2011-04-27 23:57 ` Johan Hedberg
2011-04-28 0:00 ` Anderson Lizardo
2011-04-27 23:27 ` [PATCH 1/7] Bluetooth: Add automated SSP user confirmation responses Anderson Lizardo
2011-04-27 23:46 ` Johan Hedberg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110427234605.GA3022@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=anderson.lizardo@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox