All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] backport: small copy&paste error fixed
@ 2015-01-30 20:12 Arend van Spriel
  2015-01-30 20:12 ` [PATCH 2/2] backport: add backport file for the next kernel release Arend van Spriel
  2015-02-22  2:06 ` [PATCH 1/2] backport: small copy&paste error fixed Hauke Mehrtens
  0 siblings, 2 replies; 6+ messages in thread
From: Arend van Spriel @ 2015-01-30 20:12 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: backports, Arend van Spriel

Changed the version number in the file header comment.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 backport/compat/backport-3.19.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backport/compat/backport-3.19.c b/backport/compat/backport-3.19.c
index c633f38..0b59bef 100644
--- a/backport/compat/backport-3.19.c
+++ b/backport/compat/backport-3.19.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2014  Hauke Mehrtens <hauke@hauke-m.de>
  *
- * Backport functionality introduced in Linux 3.18.
+ * Backport functionality introduced in Linux 3.19.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] backport: add backport file for the next kernel release
  2015-01-30 20:12 [PATCH 1/2] backport: small copy&paste error fixed Arend van Spriel
@ 2015-01-30 20:12 ` Arend van Spriel
  2015-01-30 20:21   ` Johannes Berg
  2015-02-22  2:06 ` [PATCH 1/2] backport: small copy&paste error fixed Hauke Mehrtens
  1 sibling, 1 reply; 6+ messages in thread
From: Arend van Spriel @ 2015-01-30 20:12 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: backports, Arend van Spriel

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>
---
 backport/compat/Makefile        |  1 +
 backport/compat/backport-3.20.c | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 backport/compat/backport-3.20.c

diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index 3d905ed..b6f1d12 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -25,6 +25,7 @@ compat-$(CPTCFG_KERNEL_3_15) += backport-3.15.o
 compat-$(CPTCFG_KERNEL_3_17) += backport-3.17.o
 compat-$(CPTCFG_KERNEL_3_18) += backport-3.18.o
 compat-$(CPTCFG_KERNEL_3_19) += backport-3.19.o
+compat-$(CPTCFG_KERNEL_3_20) += backport-3.20.o
 
 compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_CCM) += crypto-ccm.o
 compat-$(CPTCFG_BPAUTO_BUILD_DMA_SHARED_HELPERS) += dma-shared-helpers.o
diff --git a/backport/compat/backport-3.20.c b/backport/compat/backport-3.20.c
new file mode 100644
index 0000000..ce119fd
--- /dev/null
+++ b/backport/compat/backport-3.20.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2014  Hauke Mehrtens <hauke@hauke-m.de>
+ *
+ * Backport functionality introduced in Linux 3.19.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/export.h>
+#include <linux/net.h>
+
+struct net *get_net_ns_by_fd(int fd)
+{
+	return ERR_PTR(-EINVAL);
+}
+EXPORT_SYMBOL_GPL(get_net_ns_by_fd);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] backport: add backport file for the next kernel release
  2015-01-30 20:12 ` [PATCH 2/2] backport: add backport file for the next kernel release Arend van Spriel
@ 2015-01-30 20:21   ` Johannes Berg
  2015-01-30 20:28     ` Arend van Spriel
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2015-01-30 20:21 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: Luis R. Rodriguez, backports

On Fri, 2015-01-30 at 21:12 +0100, Arend van Spriel wrote:

> --- /dev/null
> +++ b/backport/compat/backport-3.20.c
> @@ -0,0 +1,17 @@
> +/*
> + * Copyright (c) 2014  Hauke Mehrtens <hauke@hauke-m.de>

Speaking of copy/paste errors ... :)

> + * Backport functionality introduced in Linux 3.19.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +#include <linux/export.h>
> +#include <linux/net.h>
> +
> +struct net *get_net_ns_by_fd(int fd)
> +{
> +	return ERR_PTR(-EINVAL);
> +}
> +EXPORT_SYMBOL_GPL(get_net_ns_by_fd);

Interesting approach - you're relying on a previously existing
definition in some existing header file I guess? But does it always
exist?

I think it'd probably be better to have this in
backports-include/net/net_namespace.h, like so:

#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);
}

because that not only saves the huge EXPORT_SYMBOL thing (that's like a
few hundred bytes IIRC!) but also makes sure that the definition is
always really there?

Anyway as long as this was there on 3.0 already both approaches work, of
course.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] backport: add backport file for the next kernel release
  2015-01-30 20:21   ` Johannes Berg
@ 2015-01-30 20:28     ` Arend van Spriel
  0 siblings, 0 replies; 6+ messages in thread
From: Arend van Spriel @ 2015-01-30 20:28 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Luis R. Rodriguez, backports

On 01/30/15 21:21, Johannes Berg wrote:
> On Fri, 2015-01-30 at 21:12 +0100, Arend van Spriel wrote:
>
>> --- /dev/null
>> +++ b/backport/compat/backport-3.20.c
>> @@ -0,0 +1,17 @@
>> +/*
>> + * Copyright (c) 2014  Hauke Mehrtens<hauke@hauke-m.de>
>
> Speaking of copy/paste errors ... :)

Hah! :-D Will fix that and the year.

>> + * Backport functionality introduced in Linux 3.19.

And this one.

>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +#include<linux/export.h>
>> +#include<linux/net.h>
>> +
>> +struct net *get_net_ns_by_fd(int fd)
>> +{
>> +	return ERR_PTR(-EINVAL);
>> +}
>> +EXPORT_SYMBOL_GPL(get_net_ns_by_fd);
>
> Interesting approach - you're relying on a previously existing
> definition in some existing header file I guess? But does it always
> exist?
>
> I think it'd probably be better to have this in
> backports-include/net/net_namespace.h, like so:
>
> #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);
> }

This was indeed the trick that I was looking for.

> because that not only saves the huge EXPORT_SYMBOL thing (that's like a
> few hundred bytes IIRC!) but also makes sure that the definition is
> always really there?

Is that a question? Guess not. I will make a V2.

Regards,
Arend

> Anyway as long as this was there on 3.0 already both approaches work, of
> course.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] backport: small copy&paste error fixed
  2015-01-30 20:12 [PATCH 1/2] backport: small copy&paste error fixed Arend van Spriel
  2015-01-30 20:12 ` [PATCH 2/2] backport: add backport file for the next kernel release Arend van Spriel
@ 2015-02-22  2:06 ` Hauke Mehrtens
  2015-02-22  7:36   ` Arend van Spriel
  1 sibling, 1 reply; 6+ messages in thread
From: Hauke Mehrtens @ 2015-02-22  2:06 UTC (permalink / raw)
  To: Arend van Spriel, Luis R. Rodriguez; +Cc: backports

On 01/30/2015 09:12 PM, Arend van Spriel wrote:
> Changed the version number in the file header comment.
> 
> Signed-off-by: Arend van Spriel <arend@broadcom.com>
> ---
>  backport/compat/backport-3.19.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/backport/compat/backport-3.19.c b/backport/compat/backport-3.19.c
> index c633f38..0b59bef 100644
> --- a/backport/compat/backport-3.19.c
> +++ b/backport/compat/backport-3.19.c
> @@ -1,7 +1,7 @@
>  /*
>   * Copyright (c) 2014  Hauke Mehrtens <hauke@hauke-m.de>
>   *
> - * Backport functionality introduced in Linux 3.18.
> + * Backport functionality introduced in Linux 3.19.
>   *
>   * This program is free software; you can redistribute it and/or modify
>   * it under the terms of the GNU General Public License version 2 as
> 

Thank you for the patch, it was applied to backports, somehow I missed
the second one I will take care of it later.

Hauke

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] backport: small copy&paste error fixed
  2015-02-22  2:06 ` [PATCH 1/2] backport: small copy&paste error fixed Hauke Mehrtens
@ 2015-02-22  7:36   ` Arend van Spriel
  0 siblings, 0 replies; 6+ messages in thread
From: Arend van Spriel @ 2015-02-22  7:36 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: Luis R. Rodriguez, backports

On 02/22/15 03:06, Hauke Mehrtens wrote:
> On 01/30/2015 09:12 PM, Arend van Spriel wrote:
>> Changed the version number in the file header comment.
>>
>> Signed-off-by: Arend van Spriel<arend@broadcom.com>
>> ---
>>   backport/compat/backport-3.19.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/backport/compat/backport-3.19.c b/backport/compat/backport-3.19.c
>> index c633f38..0b59bef 100644
>> --- a/backport/compat/backport-3.19.c
>> +++ b/backport/compat/backport-3.19.c
>> @@ -1,7 +1,7 @@
>>   /*
>>    * Copyright (c) 2014  Hauke Mehrtens<hauke@hauke-m.de>
>>    *
>> - * Backport functionality introduced in Linux 3.18.
>> + * Backport functionality introduced in Linux 3.19.
>>    *
>>    * This program is free software; you can redistribute it and/or modify
>>    * it under the terms of the GNU General Public License version 2 as
>>
>
> Thank you for the patch, it was applied to backports, somehow I missed
> the second one I will take care of it later.

I think I cause confusion renaming the patch subject to "backport: add 
backport for get_net_ns_by_fd()" [1].

Regards,
Arend

[1] http://mid.gmane.org/1422659632-8673-1-git-send-email-arend@broadcom.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-22  7:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-30 20:12 [PATCH 1/2] backport: small copy&paste error fixed Arend van Spriel
2015-01-30 20:12 ` [PATCH 2/2] backport: add backport file for the next kernel release Arend van Spriel
2015-01-30 20:21   ` Johannes Berg
2015-01-30 20:28     ` Arend van Spriel
2015-02-22  2:06 ` [PATCH 1/2] backport: small copy&paste error fixed Hauke Mehrtens
2015-02-22  7:36   ` Arend van Spriel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.