projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1322901
)
Bluetooth: Use GFP_KERNEL in user context
author
Gustavo F. Padovan
<padovan@profusion.mobi>
Mon, 4 Apr 2011 21:56:53 +0000
(18:56 -0300)
committer
Gustavo 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
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/mgmt.c
b/net/bluetooth/mgmt.c
index c32238163b72aa06a84f5091ab305edcf72a12b3..c304688252b81c243e9bbc59e84c1dd70740291d 100644
(file)
--- a/
net/bluetooth/mgmt.c
+++ b/
net/bluetooth/mgmt.c
@@
-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;