Skip to content

Commit

Permalink
Bluetooth: Use GFP_KERNEL in user context
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gustavo F. Padovan committed Apr 5, 2011
1 parent 1322901 commit e63a15e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e63a15e

Please sign in to comment.