From: Eric Dumazet <eric.dumazet@gmail.com>
To: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Subject: [PATCH net-next 10/17] SUNRPC: add netns refcount tracker to struct gss_auth
Date: Mon, 6 Dec 2021 16:51:35 -0800 [thread overview]
Message-ID: <20211207005142.1688204-11-eric.dumazet@gmail.com> (raw)
In-Reply-To: <20211207005142.1688204-1-eric.dumazet@gmail.com>
From: Eric Dumazet <edumazet@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/sunrpc/auth_gss/auth_gss.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 5f42aa5fc612850b526c160ab5e5c75416862676..8eb7e8544815a8bc20a79b21b01e3ba110fc6b47 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -72,7 +72,8 @@ struct gss_auth {
struct gss_api_mech *mech;
enum rpc_gss_svc service;
struct rpc_clnt *client;
- struct net *net;
+ struct net *net;
+ netns_tracker ns_tracker;
/*
* There are two upcall pipes; dentry[1], named "gssd", is used
* for the new text-based upcall; dentry[0] is named after the
@@ -1013,7 +1014,8 @@ gss_create_new(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt)
goto err_free;
}
gss_auth->client = clnt;
- gss_auth->net = get_net(rpc_net_ns(clnt));
+ gss_auth->net = get_net_track(rpc_net_ns(clnt), &gss_auth->ns_tracker,
+ GFP_KERNEL);
err = -EINVAL;
gss_auth->mech = gss_mech_get_by_pseudoflavor(flavor);
if (!gss_auth->mech)
@@ -1068,7 +1070,7 @@ gss_create_new(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt)
err_put_mech:
gss_mech_put(gss_auth->mech);
err_put_net:
- put_net(gss_auth->net);
+ put_net_track(gss_auth->net, &gss_auth->ns_tracker);
err_free:
kfree(gss_auth->target_name);
kfree(gss_auth);
@@ -1084,7 +1086,7 @@ gss_free(struct gss_auth *gss_auth)
gss_pipe_free(gss_auth->gss_pipe[0]);
gss_pipe_free(gss_auth->gss_pipe[1]);
gss_mech_put(gss_auth->mech);
- put_net(gss_auth->net);
+ put_net_track(gss_auth->net, &gss_auth->ns_tracker);
kfree(gss_auth->target_name);
kfree(gss_auth);
--
2.34.1.400.ga245620fadb-goog
next prev parent reply other threads:[~2021-12-07 0:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 0:51 [PATCH net-next 00/17] net: netns refcount tracking series Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 01/17] net: add networking namespace refcount tracker Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 02/17] net: add netns refcount tracker to struct sock Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 03/17] net: add netns refcount tracker to struct seq_net_private Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 04/17] net: sched: add netns refcount tracker to struct tcf_exts Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 05/17] netfilter: nfnetlink: add netns refcount tracker to struct nfulnl_instance Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 06/17] l2tp: add netns refcount tracker to l2tp_dfs_seq_data Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 07/17] ppp: add netns refcount tracker Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 08/17] netfilter: nf_nat_masquerade: add netns refcount tracker to masq_dev_work Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 09/17] SUNRPC: add netns refcount tracker to struct svc_xprt Eric Dumazet
2021-12-07 0:51 ` Eric Dumazet [this message]
2021-12-07 0:51 ` [PATCH net-next 11/17] SUNRPC: add netns refcount tracker to struct rpc_xprt Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 12/17] net: initialize init_net earlier Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 13/17] net: add netns refcount tracker to struct nsproxy Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 14/17] vfs: add netns refcount tracker to struct fs_context Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 15/17] audit: add netns refcount tracker to struct audit_net Eric Dumazet
2021-12-07 14:40 ` Jakub Kicinski
2021-12-07 0:51 ` [PATCH net-next 16/17] audit: add netns refcount tracker to struct audit_reply Eric Dumazet
2021-12-07 0:51 ` [PATCH net-next 17/17] audit: add netns refcount tracker to struct audit_netlink_list Eric Dumazet
2021-12-09 20:03 ` [PATCH net-next 00/17] net: netns refcount tracking series Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211207005142.1688204-11-eric.dumazet@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).