diff options
| author | David S. Miller <davem@davemloft.net> | 2016-05-19 11:36:50 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-05-19 11:36:50 -0700 |
| commit | 87553aa5212f43d3d14b9b5d1dfba89f1a6e6f21 (patch) | |
| tree | 694ab01c605470329b19bf7ae06f2d411b8687d9 /net/tipc | |
| parent | e00be9e4d0ffcc0121606229f0aa4b246d6881d7 (diff) | |
| parent | b91083a45e4c41b8c952cf02ceb0ce16f0b1b9b1 (diff) | |
Merge branch 'tcp_bh_fixes'
Eric Dumazet says:
====================
net: block BH in TCP callbacks
Four layers using TCP stack were assuming sk_callback_lock could
be locked using read_lock() in their handlers because TCP stack
was running with BH disabled.
This is no longer the case. Since presumably the rest could
also depend on BH being disabled, just use read_lock_bh().
Then each layer might consider switching to RCU protection
and no longer depend on BH.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
| -rw-r--r-- | net/tipc/server.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tipc/server.c b/net/tipc/server.c index 7a0af2dc0406..272d20a795d5 100644 --- a/net/tipc/server.c +++ b/net/tipc/server.c @@ -138,28 +138,28 @@ static void sock_data_ready(struct sock *sk) { struct tipc_conn *con; - read_lock(&sk->sk_callback_lock); + read_lock_bh(&sk->sk_callback_lock); con = sock2con(sk); if (con && test_bit(CF_CONNECTED, &con->flags)) { conn_get(con); if (!queue_work(con->server->rcv_wq, &con->rwork)) conn_put(con); } - read_unlock(&sk->sk_callback_lock); + read_unlock_bh(&sk->sk_callback_lock); } static void sock_write_space(struct sock *sk) { struct tipc_conn *con; - read_lock(&sk->sk_callback_lock); + read_lock_bh(&sk->sk_callback_lock); con = sock2con(sk); if (con && test_bit(CF_CONNECTED, &con->flags)) { conn_get(con); if (!queue_work(con->server->send_wq, &con->swork)) conn_put(con); } - read_unlock(&sk->sk_callback_lock); + read_unlock_bh(&sk->sk_callback_lock); } static void tipc_register_callbacks(struct socket *sock, struct tipc_conn *con) |