public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Deactivate __ro_after_init for kernels < 4.10
Date: Tue,  1 Nov 2016 07:17:50 +0100	[thread overview]
Message-ID: <20161101061750.15995-1-sven@narfation.org> (raw)

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


             reply	other threads:[~2016-11-01  6:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-01  6:17 Sven Eckelmann [this message]
2016-11-01  7:12 ` [B.A.T.M.A.N.] [PATCH] batman-adv: Deactivate __ro_after_init for kernels < 4.10 Linus Lüssing
2016-11-01  7:32 ` [B.A.T.M.A.N.] " Sven Eckelmann

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=20161101061750.15995-1-sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.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