Skip to contentSkip to conversation

Bluetooth: Use GFP_KERNEL when cloning SKB in a workqueue

PATCH In review Marcel Holtmann 3 participants 3 messages Sep 4, 2013 – Sep 10, 2013

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Use GFP_KERNEL when cloning SKB in a workqueue

There is no need to use GFP_ATOMIC with skb_clone() when the code is executed in a workqueue.

---
 net/bluetooth/hci_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/hci_core.c +1 -1
index 1b86c78..4dbb6cb 100644
@@ -3537,7 +3537,7 @@ static void hci_cmd_work(struct work_struct *work)
 
 		kfree_skb(hdev->sent_cmd);
 
-		hdev->sent_cmd = skb_clone(skb, GFP_ATOMIC);
+		hdev->sent_cmd = skb_clone(skb, GFP_KERNEL);
 		if (hdev->sent_cmd) {
 			atomic_dec(&hdev->cmd_cnt);
 			hci_send_frame(skb);
Signature · 1 line
1.8.3.1