Skip to contentSkip to conversation

Bluetooth: Use GFP_KERNEL for HCI socket allocations

PATCH In review Marcel Holtmann 2 participants 2 messages Feb 20, 2012

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/8 Bluetooth: Use GFP_KERNEL for HCI socket allocations

For all HCI socket allocations it is safe to use GFP_KERNEL since they are processed in process context now.

---
 net/bluetooth/hci_sock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/bluetooth/hci_sock.c +2 -2
index 9e854d9..43a0491 100644
@@ -138,7 +138,7 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb,
 		}
 
 clone:
-		nskb = skb_clone(skb, GFP_ATOMIC);
+		nskb = skb_clone(skb, GFP_KERNEL);
 		if (!nskb)
 			continue;
 
@@ -731,7 +731,7 @@ static int hci_sock_create(struct net *net, struct socket *sock, int protocol,
 
 	sock->ops = &hci_sock_ops;
 
-	sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hci_sk_proto);
+	sk = sk_alloc(net, PF_BLUETOOTH, GFP_KERNEL, &hci_sk_proto);
 	if (!sk)
 		return -ENOMEM;
 
Signature · 1 line
1.7.7.6
#1 lore raw

Hi Marcel,

Quoted 7 lines · Marcel Holtmann

For all HCI socket allocations it is safe to use GFP_KERNEL since they are processed in process context now.

---
 net/bluetooth/hci_sock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

All 8 patches have been applied to my bluetooth-next tree. Thanks.

Johan