Linux bluetooth development
 help / color / mirror / Atom feed
From: David Herrmann <dh.herrmann@googlemail.com>
To: linux-bluetooth@vger.kernel.org
Cc: padovan@profusion.mobi, marcel@holtmann.org,
	David Herrmann <dh.herrmann@googlemail.com>
Subject: [PATCH] Bluetooth: hci-uart-h4: Use GFP_ATOMIC in open()
Date: Sat,  7 Jan 2012 15:19:38 +0100	[thread overview]
Message-ID: <1325945981-11330-2-git-send-email-dh.herrmann@googlemail.com> (raw)
In-Reply-To: <1325945981-11330-1-git-send-email-dh.herrmann@googlemail.com>

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_h4.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index 2fcd8b3..7483294 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -69,7 +69,7 @@ static int h4_open(struct hci_uart *hu)
 
 	BT_DBG("hu %p", hu);
 
-	h4 = kzalloc(sizeof(*h4), GFP_ATOMIC);
+	h4 = kzalloc(sizeof(*h4), GFP_KERNEL);
 	if (!h4)
 		return -ENOMEM;
 
-- 
1.7.8.1

  reply	other threads:[~2012-01-07 14:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07 14:19 [PATCH] Bluetooth: hci-uart-ll: Use GFP_ATOMIC in open() David Herrmann
2012-01-07 14:19 ` David Herrmann [this message]
2012-01-07 21:03   ` [PATCH] Bluetooth: hci-uart-h4: " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1325945981-11330-2-git-send-email-dh.herrmann@googlemail.com \
    --to=dh.herrmann@googlemail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=padovan@profusion.mobi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox