Skip to content

Commit

Permalink
rxrpc: Access socket accept queue under right lock
Browse files Browse the repository at this point in the history
The socket's accept queue (socket->acceptq) should be accessed under
socket->call_lock, not under the connection lock.

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Jul 6, 2016
1 parent dee4636 commit 30b515f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/rxrpc/call_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,15 +1089,15 @@ void rxrpc_process_call(struct work_struct *work)

if (call->state == RXRPC_CALL_SERVER_SECURING) {
_debug("securing");
write_lock(&call->conn->lock);
write_lock(&call->socket->call_lock);
if (!test_bit(RXRPC_CALL_RELEASED, &call->flags) &&
!test_bit(RXRPC_CALL_EV_RELEASE, &call->events)) {
_debug("not released");
call->state = RXRPC_CALL_SERVER_ACCEPTING;
list_move_tail(&call->accept_link,
&call->socket->acceptq);
}
write_unlock(&call->conn->lock);
write_unlock(&call->socket->call_lock);
read_lock(&call->state_lock);
if (call->state < RXRPC_CALL_COMPLETE)
set_bit(RXRPC_CALL_EV_POST_ACCEPT, &call->events);
Expand Down

0 comments on commit 30b515f

Please sign in to comment.