aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-02-17 22:26:36 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-22 13:19:31 -0500
commiteaefd1105bc431ef329599e307a07f2a36ae7872 (patch)
tree658eeed417654c8f6015d4d5f957f5a1b5e9521f /net/sctp/socket.c
parent04cfa852ff8dab923640500ee850d19e75bacabc (diff)
net: add __rcu annotations to sk_wq and wq
Add proper RCU annotations/verbs to sk_wq and wq members Fix __sctp_write_space() sk_sleep() abuse (and sock->wq access) Fix sunrpc sk_sleep() abuse too Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 8e02550ff3e8..b53b2ebbb198 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -6102,15 +6102,16 @@ static void __sctp_write_space(struct sctp_association *asoc)
6102 wake_up_interruptible(&asoc->wait); 6102 wake_up_interruptible(&asoc->wait);
6103 6103
6104 if (sctp_writeable(sk)) { 6104 if (sctp_writeable(sk)) {
6105 if (sk_sleep(sk) && waitqueue_active(sk_sleep(sk))) 6105 wait_queue_head_t *wq = sk_sleep(sk);
6106 wake_up_interruptible(sk_sleep(sk)); 6106
6107 if (wq && waitqueue_active(wq))
6108 wake_up_interruptible(wq);
6107 6109
6108 /* Note that we try to include the Async I/O support 6110 /* Note that we try to include the Async I/O support
6109 * here by modeling from the current TCP/UDP code. 6111 * here by modeling from the current TCP/UDP code.
6110 * We have not tested with it yet. 6112 * We have not tested with it yet.
6111 */ 6113 */
6112 if (sock->wq->fasync_list && 6114 if (!(sk->sk_shutdown & SEND_SHUTDOWN))
6113 !(sk->sk_shutdown & SEND_SHUTDOWN))
6114 sock_wake_async(sock, 6115 sock_wake_async(sock,
6115 SOCK_WAKE_SPACE, POLL_OUT); 6116 SOCK_WAKE_SPACE, POLL_OUT);
6116 } 6117 }