Bluetooth: hci-uart-ll: Use GFP_ATOMIC in open()
PATCH 1/1 Bluetooth: hci-uart-ll: 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.
--- drivers/bluetooth/hci_ll.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/bluetooth/hci_ll.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.8.1
PATCH 1/1 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.
--- drivers/bluetooth/hci_h4.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/bluetooth/hci_h4.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.8.1
PATCH 1/1 Bluetooth: hci-uart-bcsp: Use GFP_ATOMIC in open()
In reply to David HerrmannThe 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.
--- drivers/bluetooth/hci_bcsp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/bluetooth/hci_bcsp.c +1 -1
@@ -692,7 +692,7 @@ static int bcsp_open(struct hci_uart *hu)BT_DBG ("hu %p" , hu); - bcsp =kzalloc (sizeof (*bcsp),GFP_ATOMIC ); + bcsp =kzalloc (sizeof (*bcsp),GFP_KERNEL );if (!bcsp)return -ENOMEM ;
Signature · 1 line
1.7.8.1
PATCH 1/1 Bluetooth: hci-uart-ath: Use GFP_ATOMIC in open()
In reply to David HerrmannThe 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.
--- drivers/bluetooth/hci_ath.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/bluetooth/hci_ath.c +1 -1
@@ -112,7 +112,7 @@ static int ath_open(struct hci_uart *hu)BT_DBG ("hu %p" , hu); - ath =kzalloc (sizeof (*ath),GFP_ATOMIC ); + ath =kzalloc (sizeof (*ath),GFP_KERNEL );if (!ath)return -ENOMEM ;
Signature · 1 line
1.7.8.1
PATCH 1/1 Bluetooth: dtl1: Fix memleak in probe()
In reply to David HerrmannWe currently leak the driver info structure if dtl1_config fails. If we add a kfree() to dtl1_release to fix this, then dtl1_release and dtl1_detach are identical so this merges both functions.
--- drivers/bluetooth/dtl1_cs.c | 20 +++----------------- 1 files changed, 3 insertions(+), 17 deletions(-)
drivers/bluetooth/dtl1_cs.c +3 -17
@@ -83,9 +83,6 @@ typedef struct dtl1_info_t {static int dtl1_config (struct pcmcia_device *link); -static void dtl1_release (struct pcmcia_device *link); - -static void dtl1_detach (struct pcmcia_device *p_dev);/* Transmit states */
@@ -579,8 +576,8 @@ static void dtl1_detach(struct pcmcia_device *link) {dtl1_info_t *info = link->priv; -dtl1_release (link); - +dtl1_close (info); +pcmcia_disable_device (link);kfree (info); }
@@ -619,21 +616,10 @@ static int dtl1_config(struct pcmcia_device *link)return 0 ; failed: -dtl1_release (link); +dtl1_detach (link);return -ENODEV ; } - -static void dtl1_release (struct pcmcia_device *link) -{ -dtl1_info_t *info = link->priv; - -dtl1_close (info); - -pcmcia_disable_device (link); -} - -static const struct pcmcia_device_id dtl1_ids[] = {PCMCIA_DEVICE_PROD_ID12 ("Nokia Mobile Phones" ,"DTL-1" ,0xe1bfdd64 ,0xe168480d ),PCMCIA_DEVICE_PROD_ID12 ("Nokia Mobile Phones" ,"DTL-4" ,0xe1bfdd64 ,0x9102bc82 ),
Signature · 1 line
1.7.8.1
Hi David,
Quoted 8 lines
The
uart_protoopen()callback is not called in atomic context so we can safely sleep here. The callerhci_uart_set_proto()inhci_ldisc.cis anioctl()handler and therefore can sleep.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/hci_ll.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Regards
Marcel
Re: [PATCH] Bluetooth: hci-uart-h4: Use GFP_ATOMIC in open()
In reply to David HerrmannHi David,
Quoted 8 lines
The
uart_protoopen()callback is not called in atomic context so we can safely sleep here. The callerhci_uart_set_proto()inhci_ldisc.cis an ioctl-handler and therefore can sleep.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/hci_h4.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Regards
Marcel
Re: [PATCH] Bluetooth: hci-uart-bcsp: Use GFP_ATOMIC in open()
In reply to David HerrmannHi David,
Quoted 8 lines
The
uart_protoopen()callback is not called in atomic context so we can safely sleep here. The callerhci_uart_set_proto()inhci_ldisc.cis an ioctl-handler and therefore can sleep.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/hci_bcsp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Regards
Marcel
Re: [PATCH] Bluetooth: hci-uart-ath: Use GFP_ATOMIC in open()
In reply to David HerrmannHi David,
Quoted 8 lines
The
uart_protoopen()callback is not called in atomic context so we can safely sleep here. The callerhci_uart_set_proto()inhci_ldisc.cis an ioctl-handler and therefore can sleep.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/hci_ath.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Regards
Marcel
Re: [PATCH] Bluetooth: dtl1: Fix memleak in probe()
In reply to David HerrmannHi David,
Quoted 8 lines
We currently leak the driver info structure if
dtl1_configfails. If we add akfree()todtl1_releaseto fix this, thendtl1_releaseanddtl1_detachare identical so this merges both functions.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/dtl1_cs.c | 20 +++----------------- 1 files changed, 3 insertions(+), 17 deletions(-)
Regards
Marcel
Johan Hedberg
AppliedHi David,
Quoted 8 lines · David Herrmann
The
uart_protoopen()callback is not called in atomic context so we can safely sleep here. The callerhci_uart_set_proto()inhci_ldisc.cis anioctl()handler and therefore can sleep.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/hci_ll.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied to my bluetooth-next tree. Thanks.
Johan
Johan Hedberg
AppliedRe: [PATCH] Bluetooth: hci-uart-h4: Use GFP_ATOMIC in open()
In reply to David HerrmannHi David,
Quoted 8 lines · David Herrmann
The
uart_protoopen()callback is not called in atomic context so we can safely sleep here. The callerhci_uart_set_proto()inhci_ldisc.cis an ioctl-handler and therefore can sleep.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/hci_h4.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied to my bluetooth-next tree. Thanks.
Johan
Johan Hedberg
AppliedRe: [PATCH] Bluetooth: hci-uart-bcsp: Use GFP_ATOMIC in open()
In reply to David HerrmannHi David,
Quoted 8 lines · David Herrmann
The
uart_protoopen()callback is not called in atomic context so we can safely sleep here. The callerhci_uart_set_proto()inhci_ldisc.cis an ioctl-handler and therefore can sleep.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/hci_bcsp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied to my bluetooth-next tree. Thanks.
Johan
Johan Hedberg
AppliedRe: [PATCH] Bluetooth: hci-uart-ath: Use GFP_ATOMIC in open()
In reply to David HerrmannHi David,
Quoted 8 lines · David Herrmann
The
uart_protoopen()callback is not called in atomic context so we can safely sleep here. The callerhci_uart_set_proto()inhci_ldisc.cis an ioctl-handler and therefore can sleep.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/hci_ath.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied to my bluetooth-next tree. Thanks.
Johan
Johan Hedberg
AppliedRe: [PATCH] Bluetooth: dtl1: Fix memleak in probe()
In reply to David HerrmannHi David,
Quoted 8 lines · David Herrmann
We currently leak the driver info structure if
dtl1_configfails. If we add akfree()todtl1_releaseto fix this, thendtl1_releaseanddtl1_detachare identical so this merges both functions.Signed-off-by David Herrmann <[email protected]>--- drivers/bluetooth/dtl1_cs.c | 20 +++----------------- 1 files changed, 3 insertions(+), 17 deletions(-)
Applied to my bluetooth-next tree. Thanks.
Johan