提交 92c4c204 编写于 作者: A Andre Guedes 提交者: Gustavo Padovan

Bluetooth: Use GFP_KERNEL in mgmt_handlers

add_uuid and get_connections mgmt_handlers are executed by user
threads running in kernel-mode.
Signed-off-by: NAndre Guedes <aguedespe@gmail.com>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 9345d40c
...@@ -1268,7 +1268,7 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len) ...@@ -1268,7 +1268,7 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
goto failed; goto failed;
} }
uuid = kmalloc(sizeof(*uuid), GFP_ATOMIC); uuid = kmalloc(sizeof(*uuid), GFP_KERNEL);
if (!uuid) { if (!uuid) {
err = -ENOMEM; err = -ENOMEM;
goto failed; goto failed;
...@@ -1667,7 +1667,7 @@ static int get_connections(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -1667,7 +1667,7 @@ static int get_connections(struct sock *sk, struct hci_dev *hdev, void *data,
} }
rp_len = sizeof(*rp) + (i * sizeof(struct mgmt_addr_info)); rp_len = sizeof(*rp) + (i * sizeof(struct mgmt_addr_info));
rp = kmalloc(rp_len, GFP_ATOMIC); rp = kmalloc(rp_len, GFP_KERNEL);
if (!rp) { if (!rp) {
err = -ENOMEM; err = -ENOMEM;
goto unlock; goto unlock;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册