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

Commit 92c4c204 authored by Andre Guedes's avatar Andre Guedes Committed by Gustavo Padovan
Browse files

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: default avatarAndre Guedes <aguedespe@gmail.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 9345d40c
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -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,
	}
	}


	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;