Bluetooth: Use GFP_KERNEL in user context
authorGustavo F. Padovan <padovan@profusion.mobi>
Mon, 4 Apr 2011 21:56:53 +0000 (18:56 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Tue, 5 Apr 2011 16:03:10 +0000 (13:03 -0300)
The allocation in mgmt_control() code are in user context and not locked
by any spinlock, so it's not recommended the use of GFP_ATOMIC there.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/mgmt.c

index c322381..c304688 100644 (file)
@@ -1581,7 +1581,7 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen)
        if (msglen < sizeof(*hdr))
                return -EINVAL;
 
-       buf = kmalloc(msglen, GFP_ATOMIC);
+       buf = kmalloc(msglen, GFP_KERNEL);
        if (!buf)
                return -ENOMEM;