mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
RxRPC: do not unlock unheld spinlock in rxrpc_connect_exclusive()
If rx->conn is not NULL, rxrpc_connect_exclusive() does not acquire the transport's client lock, but it still releases it. The patch adds locking of the spinlock to this path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: David Howells <[email protected]>
This commit is contained in:
parent
d8ec26d7f8
commit
8f22ba61b5
1 changed files with 2 additions and 0 deletions
|
|
@ -381,6 +381,8 @@ static int rxrpc_connect_exclusive(struct rxrpc_sock *rx,
|
|||
|
||||
rxrpc_assign_connection_id(conn);
|
||||
rx->conn = conn;
|
||||
} else {
|
||||
spin_lock(&trans->client_lock);
|
||||
}
|
||||
|
||||
/* we've got a connection with a free channel and we can now attach the
|
||||
|
|
|
|||
Loading…
Reference in a new issue