Skip to content

Commit 81f2e8a

Browse files
committed
rxrpc: Don't use sk->sk_receive_queue.lock to guard socket state changes
Don't use sk->sk_receive_queue.lock to guard socket state changes as the socket mutex is sufficient. Signed-off-by: David Howells <[email protected]> cc: Marc Dionne <[email protected]> cc: [email protected]
1 parent 4041a8f commit 81f2e8a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

net/rxrpc/af_rxrpc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -812,14 +812,12 @@ static int rxrpc_shutdown(struct socket *sock, int flags)
812812

813813
lock_sock(sk);
814814

815-
spin_lock_bh(&sk->sk_receive_queue.lock);
816815
if (sk->sk_state < RXRPC_CLOSE) {
817816
sk->sk_state = RXRPC_CLOSE;
818817
sk->sk_shutdown = SHUTDOWN_MASK;
819818
} else {
820819
ret = -ESHUTDOWN;
821820
}
822-
spin_unlock_bh(&sk->sk_receive_queue.lock);
823821

824822
rxrpc_discard_prealloc(rx);
825823

@@ -872,9 +870,7 @@ static int rxrpc_release_sock(struct sock *sk)
872870
break;
873871
}
874872

875-
spin_lock_bh(&sk->sk_receive_queue.lock);
876873
sk->sk_state = RXRPC_CLOSE;
877-
spin_unlock_bh(&sk->sk_receive_queue.lock);
878874

879875
if (rx->local && rcu_access_pointer(rx->local->service) == rx) {
880876
write_lock(&rx->local->services_lock);

0 commit comments

Comments
 (0)