diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 9832f8445d43..e121e0bea0cc 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -1683,6 +1683,9 @@ int hci_get_auth_info(struct hci_dev *hdev, void __user *arg) struct hci_auth_info_req req; struct hci_conn *conn; + if ((!(&hdev->lock)) || (!hdev)) + return -EBADFD; + if (copy_from_user(&req, arg, sizeof(req))) return -EFAULT;