mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
rxrpc: Use call->peer rather than call->conn->params.peer
Use call->peer rather than call->conn->params.peer to avoid the possibility of call->conn being NULL and, whilst we're at it, check it for NULL before we access it. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
parent
fff72429c2
commit
f4fdb3525b
1 changed files with 5 additions and 3 deletions
|
@ -514,9 +514,11 @@ void rxrpc_release_call(struct rxrpc_call *call)
|
||||||
*/
|
*/
|
||||||
_debug("RELEASE CALL %p (%d CONN %p)", call, call->debug_id, conn);
|
_debug("RELEASE CALL %p (%d CONN %p)", call, call->debug_id, conn);
|
||||||
|
|
||||||
spin_lock(&conn->params.peer->lock);
|
if (call->peer) {
|
||||||
hlist_del_init(&call->error_link);
|
spin_lock(&call->peer->lock);
|
||||||
spin_unlock(&conn->params.peer->lock);
|
hlist_del_init(&call->error_link);
|
||||||
|
spin_unlock(&call->peer->lock);
|
||||||
|
}
|
||||||
|
|
||||||
write_lock_bh(&rx->call_lock);
|
write_lock_bh(&rx->call_lock);
|
||||||
if (!list_empty(&call->accept_link)) {
|
if (!list_empty(&call->accept_link)) {
|
||||||
|
|
Loading…
Reference in a new issue