Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci-uart-ll: Use GFP_ATOMIC in open()
@ 2012-01-07 14:19 David Herrmann
  2012-01-07 14:19 ` [PATCH] Bluetooth: hci-uart-h4: " David Herrmann
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: David Herrmann @ 2012-01-07 14:19 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: padovan, marcel, David Herrmann

The uart_proto open() callback is not called in atomic context so we can safely
sleep here. The caller hci_uart_set_proto() in hci_ldisc.c is an ioctl() handler
and therefore can sleep.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
---
 drivers/bluetooth/hci_ll.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 7e4b435..b874c0e 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -125,7 +125,7 @@ static int ll_open(struct hci_uart *hu)
 
 	BT_DBG("hu %p", hu);
 
-	ll = kzalloc(sizeof(*ll), GFP_ATOMIC);
+	ll = kzalloc(sizeof(*ll), GFP_KERNEL);
 	if (!ll)
 		return -ENOMEM;
 
-- 
1.7.8.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-01-08 20:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-07 14:19 [PATCH] Bluetooth: hci-uart-ll: Use GFP_ATOMIC in open() David Herrmann
2012-01-07 14:19 ` [PATCH] Bluetooth: hci-uart-h4: " David Herrmann
2012-01-07 21:03   ` Marcel Holtmann
2012-01-08 20:36   ` Johan Hedberg
2012-01-07 14:19 ` [PATCH] Bluetooth: hci-uart-bcsp: " David Herrmann
2012-01-07 21:03   ` Marcel Holtmann
2012-01-08 20:36   ` Johan Hedberg
2012-01-07 14:19 ` [PATCH] Bluetooth: hci-uart-ath: " David Herrmann
2012-01-07 21:04   ` Marcel Holtmann
2012-01-08 20:36   ` Johan Hedberg
2012-01-07 14:19 ` [PATCH] Bluetooth: dtl1: Fix memleak in probe() David Herrmann
2012-01-07 21:04   ` Marcel Holtmann
2012-01-08 20:37   ` Johan Hedberg
2012-01-07 21:03 ` [PATCH] Bluetooth: hci-uart-ll: Use GFP_ATOMIC in open() Marcel Holtmann
2012-01-08 20:34 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox