* [PATCH 0/2] Bluetooth: Fix regressions for 3.0 @ 2011-07-16 4:30 Gustavo F. Padovan [not found] ` <1310790621-28510-1-git-send-email-padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Gustavo F. Padovan @ 2011-07-16 4:30 UTC (permalink / raw) To: davem-fT/PcQaiUtIeIZ0/mPfg9Q Cc: linville-2XuSBdqkA4R54TAoqtyWWQ, netdev-u79uwXL29TY76Z2rM5mHXA, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, Gustavo F. Padovan From: "Gustavo F. Padovan" <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> Gustavo F. Padovan (1): Bluetooth: Fix regression in L2CAP connection procedure Ilia Kolomisnky (1): Bluetooth: Fix crash with incoming L2CAP connections net/bluetooth/l2cap_core.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) -- 1.7.6 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1310790621-28510-1-git-send-email-padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org>]
* [PATCH 1/2] Bluetooth: Fix regression in L2CAP connection procedure [not found] ` <1310790621-28510-1-git-send-email-padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> @ 2011-07-16 4:30 ` Gustavo F. Padovan 2011-07-16 4:30 ` [PATCH 2/2] Bluetooth: Fix crash with incoming L2CAP connections Gustavo F. Padovan 2011-07-16 17:15 ` [PATCH 0/2] Bluetooth: Fix regressions for 3.0 David Miller 1 sibling, 1 reply; 5+ messages in thread From: Gustavo F. Padovan @ 2011-07-16 4:30 UTC (permalink / raw) To: davem-fT/PcQaiUtIeIZ0/mPfg9Q Cc: linville-2XuSBdqkA4R54TAoqtyWWQ, netdev-u79uwXL29TY76Z2rM5mHXA, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, Gustavo F. Padovan From: "Gustavo F. Padovan" <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> Caused by the following commit, partially revert it. commit 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95 Author: Gustavo F. Padovan <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> Date: Thu Jun 30 16:11:30 2011 -0300 Bluetooth: Fix regression with incoming L2CAP connections PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that ( probably after the df3c3931e commit ) the l2cap connection could not be established in case when the "Auth Complete" HCI event does not arive before the initiator send "Configuration request", in which case l2cap replies with "Command rejected" since the channel is still in BT_CONNECT2 state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Signed-off-by: Gustavo F. Padovan <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> --- net/bluetooth/l2cap_core.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index ebff14c..4fbf67e 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -2323,8 +2323,7 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr sk = chan->sk; - if ((bt_sk(sk)->defer_setup && sk->sk_state != BT_CONNECT2) || - (!bt_sk(sk)->defer_setup && sk->sk_state != BT_CONFIG)) { + if (sk->sk_state != BT_CONFIG && sk->sk_state != BT_CONNECT2) { struct l2cap_cmd_rej rej; rej.reason = cpu_to_le16(0x0002); -- 1.7.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] Bluetooth: Fix crash with incoming L2CAP connections 2011-07-16 4:30 ` [PATCH 1/2] Bluetooth: Fix regression in L2CAP connection procedure Gustavo F. Padovan @ 2011-07-16 4:30 ` Gustavo F. Padovan 0 siblings, 0 replies; 5+ messages in thread From: Gustavo F. Padovan @ 2011-07-16 4:30 UTC (permalink / raw) To: davem; +Cc: linville, netdev, linux-bluetooth, Ilia Kolomisnky From: Ilia Kolomisnky <iliak@ti.com> Another regression fix considering incomming l2cap connections with defer_setup enabled. In situations when incomming connection is extracted with l2cap_sock_accept, it's bt_sock info will have 'parent' member zerroed, but 'parent' may be used unconditionally in l2cap_conn_start() and l2cap_security_cfm() when defer_setup is enabled. Backtrace: [<bf02d5ac>] (l2cap_security_cfm+0x0/0x2ac [bluetooth]) from [<bf01f01c>] (hci_event_pac ket+0xc2c/0x4aa4 [bluetooth]) [<bf01e3f0>] (hci_event_packet+0x0/0x4aa4 [bluetooth]) from [<bf01a844>] (hci_rx_task+0x cc/0x27c [bluetooth]) [<bf01a778>] (hci_rx_task+0x0/0x27c [bluetooth]) from [<c008eee4>] (tasklet_action+0xa0/ 0x15c) [<c008ee44>] (tasklet_action+0x0/0x15c) from [<c008f38c>] (__do_softirq+0x98/0x130) r7:00000101 r6:00000018 r5:00000001 r4:efc46000 [<c008f2f4>] (__do_softirq+0x0/0x130) from [<c008f524>] (do_softirq+0x4c/0x58) [<c008f4d8>] (do_softirq+0x0/0x58) from [<c008f5e0>] (run_ksoftirqd+0xb0/0x1b4) r4:efc46000 r3:00000001 [<c008f530>] (run_ksoftirqd+0x0/0x1b4) from [<c009f2a8>] (kthread+0x84/0x8c) r7:00000000 r6:c008f530 r5:efc47fc4 r4:efc41f08 [<c009f224>] (kthread+0x0/0x8c) from [<c008cc84>] (do_exit+0x0/0x5f0) Signed-off-by: Ilia Kolomisnky <iliak@ti.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> --- net/bluetooth/l2cap_core.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 4fbf67e..7705e26 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -620,7 +620,8 @@ static void l2cap_conn_start(struct l2cap_conn *conn) struct sock *parent = bt_sk(sk)->parent; rsp.result = cpu_to_le16(L2CAP_CR_PEND); rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND); - parent->sk_data_ready(parent, 0); + if (parent) + parent->sk_data_ready(parent, 0); } else { sk->sk_state = BT_CONFIG; @@ -4009,7 +4010,8 @@ static int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) struct sock *parent = bt_sk(sk)->parent; res = L2CAP_CR_PEND; stat = L2CAP_CS_AUTHOR_PEND; - parent->sk_data_ready(parent, 0); + if (parent) + parent->sk_data_ready(parent, 0); } else { sk->sk_state = BT_CONFIG; res = L2CAP_CR_SUCCESS; -- 1.7.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] Bluetooth: Fix regressions for 3.0 [not found] ` <1310790621-28510-1-git-send-email-padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> 2011-07-16 4:30 ` [PATCH 1/2] Bluetooth: Fix regression in L2CAP connection procedure Gustavo F. Padovan @ 2011-07-16 17:15 ` David Miller [not found] ` <20110716.101518.1007939482226184514.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: David Miller @ 2011-07-16 17:15 UTC (permalink / raw) To: padovan-Y3ZbgMPKUGA34EUeqzHoZw Cc: linville-2XuSBdqkA4R54TAoqtyWWQ, netdev-u79uwXL29TY76Z2rM5mHXA, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA From: "Gustavo F. Padovan" <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> Date: Sat, 16 Jul 2011 01:30:19 -0300 > From: "Gustavo F. Padovan" <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> > > Gustavo F. Padovan (1): > Bluetooth: Fix regression in L2CAP connection procedure > > Ilia Kolomisnky (1): > Bluetooth: Fix crash with incoming L2CAP connections > > net/bluetooth/l2cap_core.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) John I'm going to apply these directly so I can get them to Linus in time for 3.0-final. Thanks Gustavo. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20110716.101518.1007939482226184514.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>]
* Re: [PATCH 0/2] Bluetooth: Fix regressions for 3.0 [not found] ` <20110716.101518.1007939482226184514.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> @ 2011-07-17 16:46 ` John W. Linville 0 siblings, 0 replies; 5+ messages in thread From: John W. Linville @ 2011-07-17 16:46 UTC (permalink / raw) To: David Miller Cc: padovan-Y3ZbgMPKUGA34EUeqzHoZw, netdev-u79uwXL29TY76Z2rM5mHXA, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA On Sat, Jul 16, 2011 at 10:15:18AM -0700, David Miller wrote: > From: "Gustavo F. Padovan" <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> > Date: Sat, 16 Jul 2011 01:30:19 -0300 > > > From: "Gustavo F. Padovan" <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> > > > > Gustavo F. Padovan (1): > > Bluetooth: Fix regression in L2CAP connection procedure > > > > Ilia Kolomisnky (1): > > Bluetooth: Fix crash with incoming L2CAP connections > > > > net/bluetooth/l2cap_core.c | 9 +++++---- > > 1 files changed, 5 insertions(+), 4 deletions(-) > > John I'm going to apply these directly so I can get them to > Linus in time for 3.0-final. > > Thanks Gustavo. Yup, looks great -- thanks! -- John W. Linville Someday the world will need a hero, and you linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-17 16:46 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-07-16 4:30 [PATCH 0/2] Bluetooth: Fix regressions for 3.0 Gustavo F. Padovan [not found] ` <1310790621-28510-1-git-send-email-padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org> 2011-07-16 4:30 ` [PATCH 1/2] Bluetooth: Fix regression in L2CAP connection procedure Gustavo F. Padovan 2011-07-16 4:30 ` [PATCH 2/2] Bluetooth: Fix crash with incoming L2CAP connections Gustavo F. Padovan 2011-07-16 17:15 ` [PATCH 0/2] Bluetooth: Fix regressions for 3.0 David Miller [not found] ` <20110716.101518.1007939482226184514.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> 2011-07-17 16:46 ` John W. Linville
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).