@@ -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);
@@ -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,
};
/*
@@ -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);
}
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@kernel.org> --- 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(-)