Commit 12b94565 authored by Andre Guedes's avatar Andre Guedes Committed by Gustavo Padovan

Bluetooth: Use GFP_KERNEL in mgmt_pending_add

We are allowed to sleep in mgmt_pending_add, so we should use
GFP_KERNEL for memory allocations instead of GFP_ATOMIC.
Signed-off-by: default avatarAndre Guedes <aguedespe@gmail.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 92c4c204
...@@ -687,14 +687,14 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode, ...@@ -687,14 +687,14 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
{ {
struct pending_cmd *cmd; struct pending_cmd *cmd;
cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC); cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) if (!cmd)
return NULL; return NULL;
cmd->opcode = opcode; cmd->opcode = opcode;
cmd->index = hdev->id; cmd->index = hdev->id;
cmd->param = kmalloc(len, GFP_ATOMIC); cmd->param = kmalloc(len, GFP_KERNEL);
if (!cmd->param) { if (!cmd->param) {
kfree(cmd); kfree(cmd);
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment