* [B.A.T.M.A.N.] [PATCH] batman-adv: Deactivate __ro_after_init for kernels < 4.10
@ 2016-11-01 6:17 Sven Eckelmann
2016-11-01 7:12 ` Linus Lüssing
2016-11-01 7:32 ` [B.A.T.M.A.N.] " Sven Eckelmann
0 siblings, 2 replies; 3+ messages in thread
From: Sven Eckelmann @ 2016-11-01 6:17 UTC (permalink / raw)
To: b.a.t.m.a.n
The pre-4.10 kernels must write to batadv_netlink_family after the family
was registered. Thus disabling __ro_after_init for now is required on these
kernels.
Fixes: c776b4a071d8 ("batman-adv: genetlink: mark families as __ro_after_init")
Reported-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
compat-include/linux/cache.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/compat-include/linux/cache.h b/compat-include/linux/cache.h
index 93dff58..7b7069a 100644
--- a/compat-include/linux/cache.h
+++ b/compat-include/linux/cache.h
@@ -24,11 +24,13 @@
#include <linux/version.h>
#include_next <linux/cache.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
-#ifndef __ro_after_init
-#define __ro_after_init
+/* hack for netlink.c which marked the family ops as ro */
+#ifdef __ro_after_init
+#undef __ro_after_init
#endif
+#define __ro_after_init
#endif /* < KERNEL_VERSION(4, 6, 0) */
--
2.10.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Deactivate __ro_after_init for kernels < 4.10
2016-11-01 6:17 [B.A.T.M.A.N.] [PATCH] batman-adv: Deactivate __ro_after_init for kernels < 4.10 Sven Eckelmann
@ 2016-11-01 7:12 ` Linus Lüssing
2016-11-01 7:32 ` [B.A.T.M.A.N.] " Sven Eckelmann
1 sibling, 0 replies; 3+ messages in thread
From: Linus Lüssing @ 2016-11-01 7:12 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Tue, Nov 01, 2016 at 07:17:50AM +0100, Sven Eckelmann wrote:
> The pre-4.10 kernels must write to batadv_netlink_family after the family
> was registered. Thus disabling __ro_after_init for now is required on these
> kernels.
>
> Fixes: c776b4a071d8 ("batman-adv: genetlink: mark families as __ro_after_init")
> Reported-by: Linus Lüssing <linus.luessing@c0d3.blue>
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
That seems to work, thanks! :)
Tested-by: Linus Lüssing <linus.luessing@c0d3.blue>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Deactivate __ro_after_init for kernels < 4.10
2016-11-01 6:17 [B.A.T.M.A.N.] [PATCH] batman-adv: Deactivate __ro_after_init for kernels < 4.10 Sven Eckelmann
2016-11-01 7:12 ` Linus Lüssing
@ 2016-11-01 7:32 ` Sven Eckelmann
1 sibling, 0 replies; 3+ messages in thread
From: Sven Eckelmann @ 2016-11-01 7:32 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 779 bytes --]
On Dienstag, 1. November 2016 07:17:50 CET Sven Eckelmann wrote:
> The pre-4.10 kernels must write to batadv_netlink_family after the family
> was registered. Thus disabling __ro_after_init for now is required on these
> kernels.
>
> Fixes: c776b4a071d8 ("batman-adv: genetlink: mark families as __ro_after_init")
> Reported-by: Linus Lüssing <linus.luessing@c0d3.blue>
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> Tested-by: Linus Lüssing <linus.luessing@c0d3.blue>
> ---
> compat-include/linux/cache.h | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Applied in 83e3cb32617d07a33fb43faa0957b91b3ac622c5 [1].
Kind regards,
Sven
[1] https://git.open-mesh.org/batman-adv.git/commit/83e3cb32617d07a33fb43faa0957b91b3ac622c5
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-01 7:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-01 6:17 [B.A.T.M.A.N.] [PATCH] batman-adv: Deactivate __ro_after_init for kernels < 4.10 Sven Eckelmann
2016-11-01 7:12 ` Linus Lüssing
2016-11-01 7:32 ` [B.A.T.M.A.N.] " Sven Eckelmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox