diff options
author | andrew hendry <andrew.hendry@gmail.com> | 2010-09-14 15:31:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-15 05:34:52 +0200 |
commit | 25aa4efe4feb4150fe613169795df505c5018f2b (patch) | |
tree | 51e1ec30fe45d8ba6c30245d5d74a121e38032c8 | |
parent | net/irda: Use static const char * const where possible (diff) | |
download | linux-25aa4efe4feb4150fe613169795df505c5018f2b.tar.xz linux-25aa4efe4feb4150fe613169795df505c5018f2b.zip |
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>
-rw-r--r-- | net/x25/af_x25.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 5e86d4e97dce..f6a8f175b4f5 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -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; } |