diff options
author | andrew hendry <andrew.hendry@gmail.com> | 2010-09-14 13:31:38 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-14 20:34:52 -0700 |
commit | 90c27297a9bfb8ea11c0e3f73ad90c4c66e8501e (patch) | |
tree | 83c8cf0e020d7aa2f1f91374400723f2ad27df9e /net/x25/af_x25.c | |
parent | 25aa4efe4feb4150fe613169795df505c5018f2b (diff) | |
download | kernel_samsung_aries-90c27297a9bfb8ea11c0e3f73ad90c4c66e8501e.zip kernel_samsung_aries-90c27297a9bfb8ea11c0e3f73ad90c4c66e8501e.tar.gz kernel_samsung_aries-90c27297a9bfb8ea11c0e3f73ad90c4c66e8501e.tar.bz2 |
X.25 remove bkl in bind
Accept updates socket values in 3 lines so wrapped with lock_sock.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25/af_x25.c')
-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 f6a8f17..bd6fce3 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -688,7 +688,6 @@ static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) struct sockaddr_x25 *addr = (struct sockaddr_x25 *)uaddr; int len, i, rc = 0; - lock_kernel(); if (!sock_flag(sk, SOCK_ZAPPED) || addr_len != sizeof(struct sockaddr_x25) || addr->sx25_family != AF_X25) { @@ -704,12 +703,13 @@ static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) } } + lock_sock(sk); x25_sk(sk)->source_addr = addr->sx25_addr; x25_insert_socket(sk); sock_reset_flag(sk, SOCK_ZAPPED); + release_sock(sk); SOCK_DEBUG(sk, "x25_bind: socket is bound\n"); out: - unlock_kernel(); return rc; } |