netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Ryazanov <ryazanov.s.a@gmail.com>
To: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: [PATCH net] netns: export get_net_ns_by_id()
Date: Thu, 13 May 2021 00:29:56 +0300	[thread overview]
Message-ID: <20210512212956.4727-1-ryazanov.s.a@gmail.com> (raw)

No one loadable module is able to obtain netns by id since the
corresponding function has not been exported. Export it to be able to
use netns id API in loadable modules too as already done for
peernet2id_alloc().

CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
---
 net/core/net_namespace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 43b6ac4c4439..0414406ed664 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -306,6 +306,7 @@ struct net *get_net_ns_by_id(const struct net *net, int id)
 
 	return peer;
 }
+EXPORT_SYMBOL_GPL(get_net_ns_by_id);
 
 /*
  * setup_net runs the initializers for the network namespace object.
-- 
2.26.3


             reply	other threads:[~2021-05-12 22:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12 21:29 Sergey Ryazanov [this message]
2021-05-14 19:14 ` [PATCH net] netns: export get_net_ns_by_id() Jakub Kicinski
2021-05-14 20:52   ` Sergey Ryazanov
2021-05-16 11:05     ` Leon Romanovsky
2021-05-16 13:47       ` Sergey Ryazanov
2021-05-17  7:18       ` Nicolas Dichtel

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=20210512212956.4727-1-ryazanov.s.a@gmail.com \
    --to=ryazanov.s.a@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    /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).