aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 8e02550ff3e8..deb82e35a107 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1193,7 +1193,7 @@ out_free:
1193 * an endpoint that is multi-homed. Much like sctp_bindx() this call 1193 * an endpoint that is multi-homed. Much like sctp_bindx() this call
1194 * allows a caller to specify multiple addresses at which a peer can be 1194 * allows a caller to specify multiple addresses at which a peer can be
1195 * reached. The way the SCTP stack uses the list of addresses to set up 1195 * reached. The way the SCTP stack uses the list of addresses to set up
1196 * the association is implementation dependant. This function only 1196 * the association is implementation dependent. This function only
1197 * specifies that the stack will try to make use of all the addresses in 1197 * specifies that the stack will try to make use of all the addresses in
1198 * the list when needed. 1198 * the list when needed.
1199 * 1199 *
@@ -2928,7 +2928,6 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva
2928 unsigned int optlen) 2928 unsigned int optlen)
2929{ 2929{
2930 struct sctp_sock *sp; 2930 struct sctp_sock *sp;
2931 struct sctp_endpoint *ep;
2932 struct sctp_association *asoc = NULL; 2931 struct sctp_association *asoc = NULL;
2933 struct sctp_setpeerprim prim; 2932 struct sctp_setpeerprim prim;
2934 struct sctp_chunk *chunk; 2933 struct sctp_chunk *chunk;
@@ -2936,7 +2935,6 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva
2936 int err; 2935 int err;
2937 2936
2938 sp = sctp_sk(sk); 2937 sp = sctp_sk(sk);
2939 ep = sp->ep;
2940 2938
2941 if (!sctp_addip_enable) 2939 if (!sctp_addip_enable)
2942 return -EPERM; 2940 return -EPERM;
@@ -6102,15 +6100,16 @@ static void __sctp_write_space(struct sctp_association *asoc)
6102 wake_up_interruptible(&asoc->wait); 6100 wake_up_interruptible(&asoc->wait);
6103 6101
6104 if (sctp_writeable(sk)) { 6102 if (sctp_writeable(sk)) {
6105 if (sk_sleep(sk) && waitqueue_active(sk_sleep(sk))) 6103 wait_queue_head_t *wq = sk_sleep(sk);
6106 wake_up_interruptible(sk_sleep(sk)); 6104
6105 if (wq && waitqueue_active(wq))
6106 wake_up_interruptible(wq);
6107 6107
6108 /* Note that we try to include the Async I/O support 6108 /* Note that we try to include the Async I/O support
6109 * here by modeling from the current TCP/UDP code. 6109 * here by modeling from the current TCP/UDP code.
6110 * We have not tested with it yet. 6110 * We have not tested with it yet.
6111 */ 6111 */
6112 if (sock->wq->fasync_list && 6112 if (!(sk->sk_shutdown & SEND_SHUTDOWN))
6113 !(sk->sk_shutdown & SEND_SHUTDOWN))
6114 sock_wake_async(sock, 6113 sock_wake_async(sock,
6115 SOCK_WAKE_SPACE, POLL_OUT); 6114 SOCK_WAKE_SPACE, POLL_OUT);
6116 } 6115 }