Skip to contentSkip to conversation

Bluetooth: Use GFP_KERNEL in hci_add_adv_entry()

PATCH In review Andre Guedes 3 participants 3 messages Jan 31, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Use GFP_KERNEL in hci_add_adv_entry()

This function is not called in interrupt context anymore, so it should use GFP_KERNEL to allocate memory.

---
 net/bluetooth/hci_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/bluetooth/hci_core.c +1 -1
index 91166db..45e2d2a 100644
@@ -1553,7 +1553,7 @@ int hci_add_adv_entry(struct hci_dev *hdev,
 	if (hci_find_adv_entry(hdev, &ev->bdaddr))
 		return 0;
 
-	entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
+	entry = kzalloc(sizeof(*entry), GFP_KERNEL);
 	if (!entry)
 		return -ENOMEM;
 
Signature · 1 line
1.7.9
#2 lore raw
In reply to Andre Guedes

Hi Andre,

Quoted 7 lines · Andre Guedes

This function is not called in interrupt context anymore, so it should use GFP_KERNEL to allocate memory.

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

The patch has been applied to my bluetooth-next tree. Thanks.

Johan