Bluetooth: Use GFP_KERNEL in mgmt_handlers
authorAndre Guedes <aguedespe@gmail.com>
Thu, 7 Jun 2012 22:05:44 +0000 (19:05 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Tue, 19 Jun 2012 03:53:37 +0000 (00:53 -0300)
add_uuid and get_connections mgmt_handlers are executed by user
threads running in kernel-mode.

Signed-off-by: Andre Guedes <aguedespe@gmail.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/mgmt.c

index eff610d5081ac98b0984d979a9264eda7ca1ff4f..86590c6532321c5b88053d241e5bb246e89c7dcb 100644 (file)
@@ -1268,7 +1268,7 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
                goto failed;
        }
 
-       uuid = kmalloc(sizeof(*uuid), GFP_ATOMIC);
+       uuid = kmalloc(sizeof(*uuid), GFP_KERNEL);
        if (!uuid) {
                err = -ENOMEM;
                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 = kmalloc(rp_len, GFP_ATOMIC);
+       rp = kmalloc(rp_len, GFP_KERNEL);
        if (!rp) {
                err = -ENOMEM;
                goto unlock;