diff mbox

[-next] rxrpc: Fix error handling in af_rxrpc_init()

Message ID 1468322477-32616-1-git-send-email-weiyj_lk@163.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

weiyj_lk@163.com July 12, 2016, 11:21 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

security initialized after alloc workqueue, so we should exit security
before destroy workqueue in the error handing.

Fixes: 648af7fca159 ("rxrpc: Absorb the rxkad security module")
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 net/rxrpc/af_rxrpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

David Miller July 12, 2016, 6:08 p.m. UTC | #1
From: weiyj_lk@163.com
Date: Tue, 12 Jul 2016 11:21:17 +0000

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> security initialized after alloc workqueue, so we should exit security
> before destroy workqueue in the error handing.
> 
> Fixes: 648af7fca159 ("rxrpc: Absorb the rxkad security module")
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied.
David Howells July 14, 2016, 2:19 p.m. UTC | #2
David Miller <davem@davemloft.net> wrote:

> > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> > 
> > security initialized after alloc workqueue, so we should exit security
> > before destroy workqueue in the error handing.
> > 
> > Fixes: 648af7fca159 ("rxrpc: Absorb the rxkad security module")
> > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Applied.

Thanks.

David
diff mbox

Patch

diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index d6e4e3b..88effad 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -766,9 +766,9 @@  error_key_type:
 error_sock:
 	proto_unregister(&rxrpc_proto);
 error_proto:
-	destroy_workqueue(rxrpc_workqueue);
-error_security:
 	rxrpc_exit_security();
+error_security:
+	destroy_workqueue(rxrpc_workqueue);
 error_work_queue:
 	kmem_cache_destroy(rxrpc_call_jar);
 error_call_jar: