* [RFC] Bluetooth: Do not attempt to send dlci disconnect when in BT_CONFIG.
@ 2014-06-06 10:19 Kiran Kumar Raparthy
2014-06-06 10:46 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Kiran Kumar Raparthy @ 2014-06-06 10:19 UTC (permalink / raw)
To: linux-kernel
Cc: Nick Pelly, Marcel Holtmann, Gustavo Padovan, Johan Hedberg,
David S. Miller, Peter Hurley, Seung-Woo Kim, linux-bluetooth,
netdev, Android Kernel Team, John Stultz, Kiran Raparthy
From: Nick Pelly <npelly@google.com>
Do not attempt to send dlci disconnect when in BT_CONFIG.
This fixes a bug where shutdown() and close() on a rfcomm socket during ACL
connection would not cause HCI Create Connection Cancel.
This is one of the number of patches from the Android AOSP common.git tree,
which is used on almost all Android devices. so I wanted to submit it for
review to see if it should go upstream.
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Nick Pelly <npelly@google.com>
Cc: linux-bluetooth@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Android Kernel Team <kernel-team@android.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Nick Pelly <npelly@google.com>
[kiran: Added context to commit message]
Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org>
---
net/bluetooth/rfcomm/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index cf62026..6a531e7 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -456,7 +456,6 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err)
switch (d->state) {
case BT_CONNECT:
- case BT_CONFIG:
case BT_OPEN:
case BT_CONNECT2:
if (test_and_clear_bit(RFCOMM_DEFER_SETUP, &d->flags)) {
--
1.8.2.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [RFC] Bluetooth: Do not attempt to send dlci disconnect when in BT_CONFIG.
2014-06-06 10:19 [RFC] Bluetooth: Do not attempt to send dlci disconnect when in BT_CONFIG Kiran Kumar Raparthy
@ 2014-06-06 10:46 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2014-06-06 10:46 UTC (permalink / raw)
To: Kiran Kumar Raparthy
Cc: linux-kernel, Nick Pelly, Gustavo F. Padovan, Johan Hedberg,
David S. Miller, Peter Hurley, Seung-Woo Kim, linux-bluetooth,
netdev, Android Kernel Team, John Stultz
Hi Kiran,
> Do not attempt to send dlci disconnect when in BT_CONFIG.
>
> This fixes a bug where shutdown() and close() on a rfcomm socket during ACL
> connection would not cause HCI Create Connection Cancel.
>
> This is one of the number of patches from the Android AOSP common.git tree,
> which is used on almost all Android devices. so I wanted to submit it for
> review to see if it should go upstream.
>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Cc: Gustavo Padovan <gustavo@padovan.org>
> Cc: Johan Hedberg <johan.hedberg@gmail.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Peter Hurley <peter@hurleysoftware.com>
> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> Cc: Nick Pelly <npelly@google.com>
> Cc: linux-bluetooth@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: Android Kernel Team <kernel-team@android.com>
> Cc: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Nick Pelly <npelly@google.com>
> [kiran: Added context to commit message]
> Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org>
> ---
> net/bluetooth/rfcomm/core.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
> index cf62026..6a531e7 100644
> --- a/net/bluetooth/rfcomm/core.c
> +++ b/net/bluetooth/rfcomm/core.c
> @@ -456,7 +456,6 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err)
>
> switch (d->state) {
> case BT_CONNECT:
> - case BT_CONFIG:
> case BT_OPEN:
> case BT_CONNECT2:
> if (test_and_clear_bit(RFCOMM_DEFER_SETUP, &d->flags)) {
you can include traces and a test program that will demonstrate this behavior. I am hearing about this one for the first time. Nobody else has indicated an issue like this before.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-06 10:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-06 10:19 [RFC] Bluetooth: Do not attempt to send dlci disconnect when in BT_CONFIG Kiran Kumar Raparthy
2014-06-06 10:46 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®