Linux backports project
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom.com>
To: "Luis R. Rodriguez" <mcgrof@kernel.org>
Cc: <backports@vger.kernel.org>, Arend van Spriel <arend@broadcom.com>
Subject: [PATCH V2] backport: add backport for get_net_ns_by_fd()
Date: Fri, 30 Jan 2015 21:52:56 +0100	[thread overview]
Message-ID: <1422651176-5433-1-git-send-email-arend@broadcom.com> (raw)

In mac80211-next a call to get_net_ns_by_fd() has been added in cfg80211
which resides in networking core. This function has been backported
such that it will always fail, ie. as it would when CONFIG_NET_NS
is not defined. The call was added by:

   commit 4b681c82d2f9bef121c912ffcaac89a004af3f2c
   Author: Vadim Kochan <vadim4j@gmail.com>
   Date: Mon Jan 12 16:34:05 2015 +0200

     nl80211: Allow set network namespace by fd

Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
This patch replaces the commit
"backport: add backport file for the next kernel release" which
has Message-ID: <1422648758-31361-2-git-send-email-arend@broadcom.com>

Changes:
 V2
  - solve backport using LINUX_BACKPORT macro (Johannes Berg)
---
 backport/backport-include/net/net_namespace.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/backport/backport-include/net/net_namespace.h b/backport/backport-include/net/net_namespace.h
index e83b103..8927af7 100644
--- a/backport/backport-include/net/net_namespace.h
+++ b/backport/backport-include/net/net_namespace.h
@@ -24,4 +24,10 @@ net_ieee802154_lowpan(struct net *net)
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) */
 #endif /* CPTCFG_IEEE802154_6LOWPAN */
 
+#define get_net_ns_by_fd	LINUX_BACKPORT(get_net_ns_by_fd)
+static inline struct net *get_net_ns_by_fd(int fd)
+{
+	return ERR_PTR(-EINVAL);
+}
+
 #endif	/* _COMPAT_NET_NET_NAMESPACE_H */
-- 
1.9.1


             reply	other threads:[~2015-01-30 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 20:52 Arend van Spriel [this message]
2015-01-30 22:40 ` [PATCH V2] backport: add backport for get_net_ns_by_fd() Hauke Mehrtens
2015-01-30 23:01   ` Arend van Spriel

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=1422651176-5433-1-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=backports@vger.kernel.org \
    --cc=mcgrof@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