From: Alexey Khoroshilov Date: Sun, 26 Jan 2014 11:39:26 +0000 (+0000) Subject: RxRPC: do not unlock unheld spinlock in rxrpc_connect_exclusive() X-Git-Tag: v4.9.8~7020^2~6^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f22ba61b5d730a870cd6b10d299d23280d060fa;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: David Howells --- diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c index 4106ca9..7bf5b5b 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