Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rxrpc: Access socket accept queue under right lock

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>

+2 -2
+2 -2
net/rxrpc/call_event.c
··· 1089 1089 1090 1090 if (call->state == RXRPC_CALL_SERVER_SECURING) { 1091 1091 _debug("securing"); 1092 - write_lock(&call->conn->lock); 1092 + write_lock(&call->socket->call_lock); 1093 1093 if (!test_bit(RXRPC_CALL_RELEASED, &call->flags) && 1094 1094 !test_bit(RXRPC_CALL_EV_RELEASE, &call->events)) { 1095 1095 _debug("not released"); ··· 1097 1097 list_move_tail(&call->accept_link, 1098 1098 &call->socket->acceptq); 1099 1099 } 1100 - write_unlock(&call->conn->lock); 1100 + write_unlock(&call->socket->call_lock); 1101 1101 read_lock(&call->state_lock); 1102 1102 if (call->state < RXRPC_CALL_COMPLETE) 1103 1103 set_bit(RXRPC_CALL_EV_POST_ACCEPT, &call->events);