Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -687,14 +687,14 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
{
	struct pending_cmd *cmd;

	cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
	cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
	if (!cmd)
		return NULL;

	cmd->opcode = opcode;
	cmd->index = hdev->id;

	cmd->param = kmalloc(len, GFP_ATOMIC);
	cmd->param = kmalloc(len, GFP_KERNEL);
	if (!cmd->param) {
		kfree(cmd);
		return NULL;