• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/unix/

Lines Matching refs:other

57  *		other the moment one end closes.
329 static void unix_dgram_disconnected(struct sock *sk, struct sock *other)
339 if (!sock_flag(other, SOCK_DEAD) && unix_peer(other) == sk) {
340 other->sk_err = ECONNRESET;
341 other->sk_error_report(other);
946 struct sock *other;
961 other = unix_find_other(net, sunaddr, alen, sock->type, hash, &err);
962 if (!other)
965 unix_state_double_lock(sk, other);
968 if (sock_flag(other, SOCK_DEAD)) {
969 unix_state_double_unlock(sk, other);
970 sock_put(other);
975 if (!unix_may_send(sk, other))
978 err = security_unix_may_send(sk->sk_socket, other->sk_socket);
986 other = NULL;
987 unix_state_double_lock(sk, other);
995 unix_peer(sk) = other;
996 unix_state_double_unlock(sk, other);
998 if (other != old_peer)
1002 unix_peer(sk) = other;
1003 unix_state_double_unlock(sk, other);
1008 unix_state_double_unlock(sk, other);
1009 sock_put(other);
1014 static long unix_wait_for_peer(struct sock *other, long timeo)
1016 struct unix_sock *u = unix_sk(other);
1022 sched = !sock_flag(other, SOCK_DEAD) &&
1023 !(other->sk_shutdown & RCV_SHUTDOWN) &&
1024 unix_recvq_full(other);
1026 unix_state_unlock(other);
1043 struct sock *other = NULL;
1080 other = unix_find_other(net, sunaddr, addr_len, sk->sk_type, hash, &err);
1081 if (!other)
1085 unix_state_lock(other);
1088 if (sock_flag(other, SOCK_DEAD)) {
1089 unix_state_unlock(other);
1090 sock_put(other);
1095 if (other->sk_state != TCP_LISTEN)
1097 if (other->sk_shutdown & RCV_SHUTDOWN)
1100 if (unix_recvq_full(other)) {
1105 timeo = unix_wait_for_peer(other, timeo);
1110 sock_put(other);
1120 state. other is TCP_LISTEN, if sk is TCP_LISTEN we
1144 unix_state_unlock(other);
1145 sock_put(other);
1149 err = security_unix_stream_connect(sock, other->sk_socket, newsk);
1164 otheru = unix_sk(other);
1177 copy_peercred(sk, other);
1189 spin_lock(&other->sk_receive_queue.lock);
1190 __skb_queue_tail(&other->sk_receive_queue, skb);
1191 spin_unlock(&other->sk_receive_queue.lock);
1192 unix_state_unlock(other);
1193 other->sk_data_ready(other, 0);
1194 sock_put(other);
1198 if (other)
1199 unix_state_unlock(other);
1205 if (other)
1206 sock_put(other);
1397 struct sock *other = NULL;
1425 other = unix_peer_get(sk);
1426 if (!other)
1456 if (!other) {
1461 other = unix_find_other(net, sunaddr, namelen, sk->sk_type,
1463 if (other == NULL)
1467 unix_state_lock(other);
1469 if (!unix_may_send(sk, other))
1472 if (sock_flag(other, SOCK_DEAD)) {
1477 unix_state_unlock(other);
1478 sock_put(other);
1482 if (unix_peer(sk) == other) {
1486 unix_dgram_disconnected(sk, other);
1487 sock_put(other);
1493 other = NULL;
1500 if (other->sk_shutdown & RCV_SHUTDOWN)
1504 err = security_unix_may_send(sk->sk_socket, other->sk_socket);
1509 if (unix_peer(other) != sk && unix_recvq_full(other)) {
1515 timeo = unix_wait_for_peer(other, timeo);
1524 skb_queue_tail(&other->sk_receive_queue, skb);
1525 if (max_level > unix_sk(other)->recursion_level)
1526 unix_sk(other)->recursion_level = max_level;
1527 unix_state_unlock(other);
1528 other->sk_data_ready(other, len);
1529 sock_put(other);
1534 unix_state_unlock(other);
1538 if (other)
1539 sock_put(other);
1550 struct sock *other = NULL;
1576 other = unix_peer(sk);
1577 if (!other)
1634 unix_state_lock(other);
1636 if (sock_flag(other, SOCK_DEAD) ||
1637 (other->sk_shutdown & RCV_SHUTDOWN))
1640 skb_queue_tail(&other->sk_receive_queue, skb);
1641 if (max_level > unix_sk(other)->recursion_level)
1642 unix_sk(other)->recursion_level = max_level;
1643 unix_state_unlock(other);
1644 other->sk_data_ready(other, size);
1654 unix_state_unlock(other);
1960 struct sock *other;
1967 other = unix_peer(sk);
1968 if (other)
1969 sock_hold(other);
1973 if (other &&
1982 unix_state_lock(other);
1983 other->sk_shutdown |= peer_mode;
1984 unix_state_unlock(other);
1985 other->sk_state_change(other);
1987 sk_wake_async(other, SOCK_WAKE_WAITD, POLL_HUP);
1989 sk_wake_async(other, SOCK_WAKE_WAITD, POLL_IN);
1991 if (other)
1992 sock_put(other);
2066 * we set writable also when the other side has shut down the
2078 struct sock *sk = sock->sk, *other;
2109 other = unix_peer_get(sk);
2110 if (other) {
2111 if (unix_peer(other) != sk) {
2112 sock_poll_wait(file, &unix_sk(other)->peer_wait,
2114 if (unix_recvq_full(other))
2118 sock_put(other);
2334 /* Earlier than device_initcall() so that other drivers invoking