This is a note to let you know that I've just added the patch titled
[PATCH] Bluetooth: uart-ldisc: Fix memory leak
to the 3.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
bluetooth-uart-ldisc-fix-memory-leak.patch
and it can be found in the queue-3.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 501dac2851c5bf1edf158adc4deb15e10c59bb04 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Wed, 11 Apr 2012 11:24:35 +0200
Subject: [PATCH] Bluetooth: uart-ldisc: Fix memory leak
From: Johan Hovold <[email protected]>
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 <[email protected]>
Acked-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/bluetooth/hci_ldisc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -237,7 +237,6 @@ static void hci_uart_destruct(struct hci
return;
BT_DBG("%s", hdev->name);
- kfree(hdev->driver_data);
}
/* ------ LDISC part ------ */
@@ -316,6 +315,7 @@ static void hci_uart_tty_close(struct tt
hci_free_dev(hdev);
}
}
+ kfree(hu);
}
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.0/bluetooth-uart-ldisc-fix-memory-leak.patch
queue-3.0/bluetooth-hci_ldisc-fix-null-pointer-dereference-on-tty_close.patch
queue-3.0/usb-serial-fix-race-between-probe-and-open.patch
queue-3.0/bluetooth-hci_core-fix-null-pointer-dereference-at.patch
queue-3.0/usb-pl2303-fix-dtr-rts-being-raised-on-baud-rate-change.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html