[PATCH RFC 6/9] auth_gss: shut down gssproxy rpc_clnt in net pre_exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With a coming change to rpc_xprt's not holding a reference to the netns,
it will be necessary to shut down the gssp_clnt in pre_exit rather than
the netns exit routine.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
 include/linux/sunrpc/svcauth_gss.h | 1 +
 net/sunrpc/auth_gss/auth_gss.c     | 6 ++++++
 net/sunrpc/auth_gss/svcauth_gss.c  | 7 ++++++-
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h
index f09c82b0a7aefed0b4ce6ab60258a2d34cea8e27..0dfda2f25f7fdb16a6bc9e537399548e47dfde56 100644
--- a/include/linux/sunrpc/svcauth_gss.h
+++ b/include/linux/sunrpc/svcauth_gss.h
@@ -19,6 +19,7 @@
 int gss_svc_init(void);
 void gss_svc_shutdown(void);
 int gss_svc_init_net(struct net *net);
+void gss_svc_pre_shutdown_net(struct net *net);
 void gss_svc_shutdown_net(struct net *net);
 struct auth_domain *svcauth_gss_register_pseudoflavor(u32 pseudoflavor,
 						      char *name);
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 369310909fc98596c8a06db8ac3c976a719ca7b2..78571776f446e2097bf25642c182d57546502803 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -2242,9 +2242,15 @@ static __net_exit void rpcsec_gss_exit_net(struct net *net)
 	gss_svc_shutdown_net(net);
 }
 
+static __net_exit void rpcsec_gss_pre_exit_net(struct net *net)
+{
+	gss_svc_pre_shutdown_net(net);
+}
+
 static struct pernet_operations rpcsec_gss_net_ops = {
 	.init = rpcsec_gss_init_net,
 	.exit = rpcsec_gss_exit_net,
+	.pre_exit = rpcsec_gss_pre_exit_net,
 };
 
 /*
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 73a90ad873fb9da659ba76184b2e2a0e5324ce0d..624e88be6eb3163b131902c4800e4842e4c0808e 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -2102,11 +2102,16 @@ gss_svc_init_net(struct net *net)
 	return rv;
 }
 
+void
+gss_svc_pre_shutdown_net(struct net *net)
+{
+	destroy_use_gss_proxy_proc_entry(net);
+}
+
 void
 gss_svc_shutdown_net(struct net *net)
 {
 	destroy_krb5_enctypes_proc_entry(net);
-	destroy_use_gss_proxy_proc_entry(net);
 	rsi_cache_destroy_net(net);
 	rsc_cache_destroy_net(net);
 }

-- 
2.48.1





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux