mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-07-26 13:57:59 +00:00
aefc6c8c3c
The psp tree added a patch to limit the beaglebone to 500MHz when powered by USB, which triggered conflicts in the patches. The 3.2.16 series has been rediffed as well, no functional changes. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
52 lines
1.7 KiB
Diff
52 lines
1.7 KiB
Diff
From b69f7a1d24573678da4e44e9f2f7028640a6d592 Mon Sep 17 00:00:00 2001
|
|
From: Johan Hovold <jhovold@gmail.com>
|
|
Date: Wed, 11 Apr 2012 11:24:35 +0200
|
|
Subject: [PATCH 11/68] Bluetooth: uart-ldisc: Fix memory leak
|
|
|
|
This is a partial, self-contained, minimal backport of commit
|
|
797fe796c4335b35d95d5326824513befdb5d1e9 upstream which fixes the memory
|
|
leak:
|
|
|
|
Bluetooth: uart-ldisc: Fix memory leak and remove destruct cb
|
|
|
|
We currently leak the hci_uart object if HCI_UART_PROTO_SET is never set
|
|
because the hci-destruct callback will then never be called. This fix
|
|
removes the hci-destruct callback and frees the driver internal private
|
|
hci_uart object directly on tty-close. We call hci_unregister_dev() here
|
|
so the hci-core will never call our callbacks again (except destruct).
|
|
Therefore, we can safely free the driver internal data right away and
|
|
set the destruct callback to NULL.
|
|
|
|
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>
|
|
Signed-off-by: Johan Hovold <jhovold@gmail.com>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
---
|
|
drivers/bluetooth/hci_ldisc.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
|
|
index 48ad2a7..36dafef 100644
|
|
--- a/drivers/bluetooth/hci_ldisc.c
|
|
+++ b/drivers/bluetooth/hci_ldisc.c
|
|
@@ -237,7 +237,6 @@ static void hci_uart_destruct(struct hci_dev *hdev)
|
|
return;
|
|
|
|
BT_DBG("%s", hdev->name);
|
|
- kfree(hdev->driver_data);
|
|
}
|
|
|
|
/* ------ LDISC part ------ */
|
|
@@ -316,6 +315,7 @@ static void hci_uart_tty_close(struct tty_struct *tty)
|
|
hci_free_dev(hdev);
|
|
}
|
|
}
|
|
+ kfree(hu);
|
|
}
|
|
}
|
|
|
|
--
|
|
1.7.10
|
|
|