Thread (6 messages) 6 messages, 4 authors, 2012-01-30

Re: [PATCH 2/2] Bluetooth: Use GFP_KERNEL in hci_chan_create()

From: Ulisses Furquim <hidden>
Date: 2012-01-30 16:36:55

Hi Andre,

On Mon, Jan 30, 2012 at 10:22 AM, Andre Guedes
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
This function is called in process context only, so it should use
GFP_KERNEL to allocate memory.

Signed-off-by: Andre Guedes <redacted>
---
 net/bluetooth/hci_conn.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 9ec7b8e..7b38a0b 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -945,7 +945,7 @@ struct hci_chan *hci_chan_create(struct hci_conn *conn)
       BT_DBG("%s conn %p", hdev->name, conn);

-       chan = kzalloc(sizeof(struct hci_chan), GFP_ATOMIC);
+       chan = kzalloc(sizeof(struct hci_chan), GFP_KERNEL);
       if (!chan)
               return NULL;
The two patches to use GFP_KERNEL seem ok to me and that's the path
Padovan and Marcel wanted to go, of course, now that we run in process
context.

Best regards,

-- 
Ulisses Furquim
ProFUSION embedded systems
http://profusion.mobi
Mobile: +55 19 9250 0942
Skype: ulissesffs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help