Skip to content

Commit fdcd166

Browse files
David HerrmannJohan Hedberg
David Herrmann
authored and
Johan Hedberg
committed
Bluetooth: hci-uart-h4: Use GFP_ATOMIC in open()
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> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
1 parent 9eb648c commit fdcd166

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bluetooth/hci_h4.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static int h4_open(struct hci_uart *hu)
6969

7070
BT_DBG("hu %p", hu);
7171

72-
h4 = kzalloc(sizeof(*h4), GFP_ATOMIC);
72+
h4 = kzalloc(sizeof(*h4), GFP_KERNEL);
7373
if (!h4)
7474
return -ENOMEM;
7575

0 commit comments

Comments
 (0)