public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 09/11] Bluetooth: Fix leaking blacklist when unregistering a hci device
Date: Tue,  4 Jan 2011 12:08:50 +0200	[thread overview]
Message-ID: <1294135732-26765-9-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1294135732-26765-1-git-send-email-johan.hedberg@gmail.com>

From: Johan Hedberg <johan.hedberg@nokia.com>

The blacklist should be freed before the hci device gets unregistered.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
---
 net/bluetooth/hci_core.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index c03e6c9..f01dcea 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1085,6 +1085,10 @@ int hci_unregister_dev(struct hci_dev *hdev)
 
 	destroy_workqueue(hdev->workqueue);
 
+	hci_dev_lock_bh(hdev);
+	hci_blacklist_clear(hdev);
+	hci_dev_unlock_bh(hdev);
+
 	__hci_dev_put(hdev);
 
 	return 0;
-- 
1.7.2.3


  parent reply	other threads:[~2011-01-04 10:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 10:08 [PATCH 01/11] Bluetooth: Implement automatic setup procedure for local adapters johan.hedberg
2011-01-04 10:08 ` [PATCH 02/11] Bluetooth: Add support for management powered event johan.hedberg
2011-01-04 10:08 ` [PATCH 03/11] Bluetooth: Add support for set_powered management command johan.hedberg
2011-01-04 10:08 ` [PATCH 04/11] Bluetooth: Add support for set_discoverable " johan.hedberg
2011-01-04 10:08 ` [PATCH 05/11] Bluetooth: Add set_connectable " johan.hedberg
2011-01-04 10:08 ` [PATCH 06/11] Bluetooth: Unify mode related management messages to a single struct johan.hedberg
2011-01-04 10:08 ` [PATCH 07/11] Bluetooth: Add flag to track managment controlled adapters johan.hedberg
2011-01-04 10:08 ` [PATCH 08/11] Bluetooth: Implement set_pairable managment command johan.hedberg
2011-01-04 10:08 ` johan.hedberg [this message]
2011-01-17 18:25   ` [PATCH 09/11] Bluetooth: Fix leaking blacklist when unregistering a hci device Gustavo F. Padovan
2011-01-04 10:08 ` [PATCH 10/11] Bluetooth: Implement UUID handling through the management interface johan.hedberg
2011-01-25  9:12   ` [PATCH 10/11 v2] " johan.hedberg
2011-01-04 10:08 ` [PATCH 11/11] Bluetooth: Implement debugfs support for listing UUIDs johan.hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294135732-26765-9-git-send-email-johan.hedberg@gmail.com \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox