x25: Fix sleep from timer on socket destroy.

If socket destuction gets delayed to a timer, we try to
lock_sock() from that timer which won't work.

Use bh_lock_sock() in that case.

Signed-off-by: David S. Miller <davem@davemloft.net>
Tested-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
David S. Miller
2009-06-16 05:40:30 -07:00
parent a1870b9cc2
commit 14ebaf81e1
3 changed files with 20 additions and 7 deletions

View File

@ -113,7 +113,7 @@ static void x25_heartbeat_expiry(unsigned long param)
(sk->sk_state == TCP_LISTEN &&
sock_flag(sk, SOCK_DEAD))) {
bh_unlock_sock(sk);
x25_destroy_socket(sk);
x25_destroy_socket_from_timer(sk);
return;
}
break;