aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/ar-connection.c
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2014-01-26 11:39:26 +0000
committerDavid Howells <dhowells@redhat.com>2014-01-26 11:39:51 +0000
commit8f22ba61b5d730a870cd6b10d299d23280d060fa (patch)
tree98df624f76f1f249509274cc2496e7e62e8a69a4 /net/rxrpc/ar-connection.c
parentLinux 3.13 (diff)
downloadlinux-dev-8f22ba61b5d730a870cd6b10d299d23280d060fa.tar.xz
linux-dev-8f22ba61b5d730a870cd6b10d299d23280d060fa.zip
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 <khoroshilov@ispras.ru> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/ar-connection.c')
-rw-r--r--net/rxrpc/ar-connection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c
index 4106ca95ec86..7bf5b5b9e8b9 100644
--- a/net/rxrpc/ar-connection.c
+++ b/net/rxrpc/ar-connection.c
@@ -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