diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2011-03-16 14:29:34 +0200 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-03-31 14:25:25 -0300 |
commit | 08ba53824a7fb224085a0ff73eab213cab0197e9 (patch) | |
tree | cc3f837d1862870fa1f6b597a91958351c5a71fd /net/bluetooth/mgmt.c | |
parent | 8693ac900e230c85d6fff428984a0f983330844d (diff) | |
download | lwn-08ba53824a7fb224085a0ff73eab213cab0197e9.tar.gz lwn-08ba53824a7fb224085a0ff73eab213cab0197e9.zip |
Bluetooth: Fix missing hci_dev_lock_bh in user_confirm_reply
The code was correctly calling _unlock at the end of the function but
there was no actual _lock call anywhere.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 0054c74e27b7..4476d8e3c0f2 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1230,6 +1230,8 @@ static int user_confirm_reply(struct sock *sk, u16 index, unsigned char *data, if (!hdev) return cmd_status(sk, index, mgmt_op, ENODEV); + hci_dev_lock_bh(hdev); + if (!test_bit(HCI_UP, &hdev->flags)) { err = cmd_status(sk, index, mgmt_op, ENETDOWN); goto failed; |