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 c32238163b72aa06a84f5091ab305edcf72a12b3..c304688252b81c243e9bbc59e84c1dd70740291d 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;