X.25 remove bkl in listen

Listen updates socket values and needs lock_sock.

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
andrew hendry 2010-09-14 13:31:16 +00:00 committed by David S. Miller
parent 55b1804c67
commit 25aa4efe4f
1 changed files with 2 additions and 2 deletions

View File

@ -507,14 +507,14 @@ static int x25_listen(struct socket *sock, int backlog)
struct sock *sk = sock->sk;
int rc = -EOPNOTSUPP;
lock_kernel();
lock_sock(sk);
if (sk->sk_state != TCP_LISTEN) {
memset(&x25_sk(sk)->dest_addr, 0, X25_ADDR_LEN);
sk->sk_max_ack_backlog = backlog;
sk->sk_state = TCP_LISTEN;
rc = 0;
}
unlock_kernel();
release_sock(sk);
return rc;
}