diff options
author | David S. Miller <davem@davemloft.net> | 2019-03-02 15:54:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-02 15:54:35 -0500 |
commit | 9eb359140cd307f8a14f61c19b155ffca5291057 (patch) | |
tree | 22d5143608ef1744ca4b7025414777defe8bcca5 /net/tipc | |
parent | cf29576fee6016fa7004262cb98f57a2269178f1 (diff) | |
parent | 07f12b26e21ab359261bf75cfcb424fdc7daeb6d (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/socket.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 8c81db337431..e482b342bfa8 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -379,11 +379,13 @@ static int tipc_sk_sock_err(struct socket *sock, long *timeout) | |||
379 | 379 | ||
380 | #define tipc_wait_for_cond(sock_, timeo_, condition_) \ | 380 | #define tipc_wait_for_cond(sock_, timeo_, condition_) \ |
381 | ({ \ | 381 | ({ \ |
382 | DEFINE_WAIT_FUNC(wait_, woken_wake_function); \ | ||
382 | struct sock *sk_; \ | 383 | struct sock *sk_; \ |
383 | int rc_; \ | 384 | int rc_; \ |
384 | \ | 385 | \ |
385 | while ((rc_ = !(condition_))) { \ | 386 | while ((rc_ = !(condition_))) { \ |
386 | DEFINE_WAIT_FUNC(wait_, woken_wake_function); \ | 387 | /* coupled with smp_wmb() in tipc_sk_proto_rcv() */ \ |
388 | smp_rmb(); \ | ||
387 | sk_ = (sock_)->sk; \ | 389 | sk_ = (sock_)->sk; \ |
388 | rc_ = tipc_sk_sock_err((sock_), timeo_); \ | 390 | rc_ = tipc_sk_sock_err((sock_), timeo_); \ |
389 | if (rc_) \ | 391 | if (rc_) \ |
@@ -1983,6 +1985,8 @@ static void tipc_sk_proto_rcv(struct sock *sk, | |||
1983 | return; | 1985 | return; |
1984 | case SOCK_WAKEUP: | 1986 | case SOCK_WAKEUP: |
1985 | tipc_dest_del(&tsk->cong_links, msg_orignode(hdr), 0); | 1987 | tipc_dest_del(&tsk->cong_links, msg_orignode(hdr), 0); |
1988 | /* coupled with smp_rmb() in tipc_wait_for_cond() */ | ||
1989 | smp_wmb(); | ||
1986 | tsk->cong_link_cnt--; | 1990 | tsk->cong_link_cnt--; |
1987 | wakeup = true; | 1991 | wakeup = true; |
1988 | break; | 1992 | break; |