From: Johan Hedberg Date: Wed, 16 Mar 2011 12:29:34 +0000 (+0200) Subject: Bluetooth: Fix missing hci_dev_lock_bh in user_confirm_reply X-Git-Tag: MMI-PSA29.97-13-9~19291^2~16^2~94^2~77^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=08ba53824a7fb224085a0ff73eab213cab0197e9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Gustavo F. Padovan --- 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;