aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorAndre Guedes <aguedespe@gmail.com>2012-06-07 18:05:45 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-06-18 23:53:37 -0400
commit12b9456502d421a8272615fb641349eb2013b6d8 (patch)
tree520cbb58cb915faac60f26eaee85243079c5b5b1 /net/bluetooth
parent92c4c2049762dc0ef2b152df8c787051db1cdf60 (diff)
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: Andre Guedes <aguedespe@gmail.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 86590c653232..41b5192bc041 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -687,14 +687,14 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
687{ 687{
688 struct pending_cmd *cmd; 688 struct pending_cmd *cmd;
689 689
690 cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC); 690 cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
691 if (!cmd) 691 if (!cmd)
692 return NULL; 692 return NULL;
693 693
694 cmd->opcode = opcode; 694 cmd->opcode = opcode;
695 cmd->index = hdev->id; 695 cmd->index = hdev->id;
696 696
697 cmd->param = kmalloc(len, GFP_ATOMIC); 697 cmd->param = kmalloc(len, GFP_KERNEL);
698 if (!cmd->param) { 698 if (!cmd->param) {
699 kfree(cmd); 699 kfree(cmd);
700 return NULL; 700 return NULL;