diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-11 21:58:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-11 21:58:16 -0400 |
commit | ce8453776d68982cfe93bcb28191af8ccad01f45 (patch) | |
tree | ace48f2f6d25733c11863b458e8f8e489534bf12 /net | |
parent | 0e6f76c70e53e55492e6d6bc8cbc5e04dab01213 (diff) |
Revert "Bluetooth: fix shutdown on SCO sockets"
This reverts commit f21ca5fff6e548833fa5ee8867239a8378623150.
Quoth Gustavo F. Padovan:
"Commit f21ca5fff6e548833fa5ee8867239a8378623150 can cause a NULL
dereference if we call shutdown in a bluetooth SCO socket and doesn't
wait the shutdown completion to call close(). Please revert it. I
may have a fix for it soon, but we don't have time anymore, so revert
is the way to go. ;)"
Requested-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/sco.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 94954c74f6ae..42fdffd1d76c 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -369,15 +369,6 @@ static void __sco_sock_close(struct sock *sk) | |||
369 | 369 | ||
370 | case BT_CONNECTED: | 370 | case BT_CONNECTED: |
371 | case BT_CONFIG: | 371 | case BT_CONFIG: |
372 | if (sco_pi(sk)->conn) { | ||
373 | sk->sk_state = BT_DISCONN; | ||
374 | sco_sock_set_timer(sk, SCO_DISCONN_TIMEOUT); | ||
375 | hci_conn_put(sco_pi(sk)->conn->hcon); | ||
376 | sco_pi(sk)->conn = NULL; | ||
377 | } else | ||
378 | sco_chan_del(sk, ECONNRESET); | ||
379 | break; | ||
380 | |||
381 | case BT_CONNECT: | 372 | case BT_CONNECT: |
382 | case BT_DISCONN: | 373 | case BT_DISCONN: |
383 | sco_chan_del(sk, ECONNRESET); | 374 | sco_chan_del(sk, ECONNRESET); |