From: David Howells <dhowells@redhat.com>
Date: Fri, 23 Sep 2016 11:39:23 +0000 (+0100)
Subject: rxrpc: Make sure sendmsg() is woken on call completion
X-Git-Tag: v4.9-rc1~127^2~76^2~12
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c0d058c21c69b3685c3f1bb008aa11f1a5eaee7e;p=linux.git

rxrpc: Make sure sendmsg() is woken on call completion

Make sure that sendmsg() gets woken up if the call it is waiting for
completes abnormally.

Signed-off-by: David Howells <dhowells@redhat.com>
---

diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index b13754a6dd7a..808ab750dc6b 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -758,6 +758,7 @@ static inline bool __rxrpc_set_call_completion(struct rxrpc_call *call,
 		call->error = error;
 		call->completion = compl,
 		call->state = RXRPC_CALL_COMPLETE;
+		wake_up(&call->waitq);
 		return true;
 	}
 	return false;