Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1466186
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] Bluetooth: hci_ldisc: don't release resources in hci_uart_init_work() |
| Date | 2016-08-19 09:40 +0200 |
| Message-ID | <s7Mzh-2Fi-75@gated-at.bofh.it> (permalink) |
| References | <s7Mzf-2Fi-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This is done in hci_uart_tty_close() and can lead to double cleanup if
proto->close() is not tracking the closed/open state.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
drivers/bluetooth/hci_ldisc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index de7f7f1f995c..27f73294edcb 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -190,9 +190,7 @@ static void hci_uart_init_work(struct work_struct *work)
err = hci_register_dev(hu->hdev);
if (err < 0) {
BT_ERR("Can't register HCI device");
- hci_free_dev(hu->hdev);
- hu->hdev = NULL;
- hu->proto->close(hu);
+ return;
}
set_bit(HCI_UART_REGISTERED, &hu->flags);
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/4] Bluetooth: hci_uart: various fixes Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-08-19 09:40 +0200 [PATCH 1/4] Bluetooth: hci_ldisc: fix a race in the hdev closing path Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-08-19 09:40 +0200 [PATCH 2/4] Bluetooth: hci_h5: fix a race in the closing path Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-08-19 09:40 +0200 [PATCH 3/4] Bluetooth: hci_ldisc: don't release resources in hci_uart_init_work() Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-08-19 09:40 +0200
csiph-web