linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gustavo Padovan <padovan@profusion.mobi>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 05/12] Bluetooth: Don't use *_bh locks anymore
Date: Tue, 27 Dec 2011 15:37:25 -0200	[thread overview]
Message-ID: <20111227173725.GD8298@joana> (raw)
In-Reply-To: <1324583358.1965.225.camel@aeonflux>

Hi Marcel,

* Marcel Holtmann <marcel@holtmann.org> [2011-12-22 11:49:18 -0800]:

> Hi Gustavo,
> 
> > Those locks are not shared between interrupt and process context anymore,
> > so remove the part that disable interruption. We are stiff safe because
> > preeption is disabled.
> > 
> > Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> > ---
> >  net/bluetooth/l2cap_core.c |   24 ++++++++++++------------
> >  1 files changed, 12 insertions(+), 12 deletions(-)
> 
> any reason why this can not be converted into RCU usage?

Yes, when the element is added to the list its psm and cid both equals to 0.
In a following call the psm or cid is set, but at this point, we can't let a
reader read an old version of these value, this may cause two socket to
succeed on trying to connect to the same psm for example. spin lock is the
only safe choice here I think.

	Gustavo

  parent reply	other threads:[~2011-12-27 17:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 18:56 [PATCH 01/12] Bluetooth: convert SCO socket timeout function to workqueue Gustavo F. Padovan
2011-12-22 18:56 ` [PATCH 02/12] Bluetooth: Change SCO conn lock to mutex Gustavo F. Padovan
2011-12-22 18:56   ` [PATCH 03/12] Bluetooth: Use only mutex lock_sock() in SCO Gustavo F. Padovan
2011-12-22 18:56     ` [PATCH 04/12] Bluetooth: add debug output to l2cap_ack_timeout() Gustavo F. Padovan
2011-12-22 18:56       ` [PATCH 05/12] Bluetooth: Don't use *_bh locks anymore Gustavo F. Padovan
2011-12-22 18:56         ` [PATCH 06/12] Bluetooth: Remove *_bh locks from SCO Gustavo F. Padovan
2011-12-22 18:56           ` [PATCH 07/12] Bluetooth: Remove lock from inquiry_cache Gustavo F. Padovan
2011-12-22 18:56             ` [PATCH 08/12] Bluetooth: Remove local_bh_disable() from hci_sock.c Gustavo F. Padovan
2011-12-22 18:56               ` [PATCH 09/12] Bluetooth: remove *_bh usage from hci_dev_list and hci_cb_list Gustavo F. Padovan
2011-12-22 18:56                 ` [PATCH 10/12] Bluetooth: Don't disable interrupt when locking the queue Gustavo F. Padovan
2011-12-22 18:56                   ` [PATCH 11/12] Bluetooth: Remove *_bh from socket list lock Gustavo F. Padovan
2011-12-22 18:56                     ` [PATCH 12/12] Bluetooth: Don't disable interruptions on RFCOMM Gustavo F. Padovan
2011-12-22 19:48                       ` Marcel Holtmann
2011-12-22 19:47                   ` [PATCH 10/12] Bluetooth: Don't disable interrupt when locking the queue Marcel Holtmann
2011-12-22 19:45                 ` [PATCH 09/12] Bluetooth: remove *_bh usage from hci_dev_list and hci_cb_list Marcel Holtmann
2011-12-22 19:49                   ` Gustavo Padovan
2011-12-22 19:44               ` [PATCH 08/12] Bluetooth: Remove local_bh_disable() from hci_sock.c Marcel Holtmann
2011-12-22 19:43             ` [PATCH 07/12] Bluetooth: Remove lock from inquiry_cache Marcel Holtmann
2011-12-22 19:49         ` [PATCH 05/12] Bluetooth: Don't use *_bh locks anymore Marcel Holtmann
2011-12-22 19:54           ` Ulisses Furquim
2011-12-27 17:37           ` Gustavo Padovan [this message]
2011-12-22 19:42       ` [PATCH 04/12] Bluetooth: add debug output to l2cap_ack_timeout() Marcel Holtmann

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=20111227173725.GD8298@joana \
    --to=padovan@profusion.mobi \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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;
as well as URLs for NNTP newsgroup(s).