From: Marcel Holtmann <marcel@holtmann.org>
To: David Herrmann <dh.herrmann@googlemail.com>
Cc: linux-bluetooth@vger.kernel.org, padovan@profusion.mobi
Subject: Re: [PATCH 1/5] Bluetooth: Remove obsolete hci-destruct callback
Date: Thu, 29 Dec 2011 09:48:57 -0800 [thread overview]
Message-ID: <1325180937.1965.294.camel@aeonflux> (raw)
In-Reply-To: <1325173242-12264-2-git-send-email-dh.herrmann@googlemail.com>
Hi David,
> The destruct-callback is used by *all* drivers to remove their platform
> data only. However, all drivers call hci_unregister_dev() before this
> callback is executed. Therefore, there is no reason to keep platform
> data alive after the driver was unregistered. Hence, we can free platform data
> directly and then remove the hci-destruct callback entirely.
>
> Some drivers already depend on this behaviour, since they erroneously
> already free the data after calling hci_free_dev(). This patch makes all
> drivers behave that way and removes the callback entirely.
it is important to not end up with a race condition between sysfs and
hci_dev here. For example a cat /sys/class/bluetooth/hci0/name could
still have sysfs file open and we need to keep the memory around until
it gets destructed.
Regards
Marcel
next prev parent reply other threads:[~2011-12-29 17:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 15:40 [PATCH 0/5] Fix driver core registration David Herrmann
2011-12-29 15:40 ` [PATCH 1/5] Bluetooth: Remove obsolete hci-destruct callback David Herrmann
2011-12-29 17:48 ` Marcel Holtmann [this message]
2011-12-29 18:04 ` David Herrmann
2012-01-07 14:13 ` David Herrmann
2011-12-29 15:40 ` [PATCH 2/5] Bluetooth: Correctly acquire module reference David Herrmann
2011-12-29 15:40 ` [PATCH 3/5] Bluetooth: Remove HCI-owner field David Herrmann
2011-12-29 15:40 ` [PATCH 4/5] Bluetooth: Correctly take hci_dev->dev refcount David Herrmann
2011-12-29 15:40 ` [PATCH 5/5] Bluetooth: Remove __hci_dev_put/hold David Herrmann
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=1325180937.1965.294.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=dh.herrmann@googlemail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=padovan@profusion.mobi \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.