Add __rcu annotations for the rcu protected bat_priv::curr_gw pointer to allow sparse checking.
Signed-off-by: Linus Lüssing linus.luessing@ascom.ch --- compat.h | 6 ++++++ types.h | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/batman-adv/compat.h b/batman-adv/compat.h index a76d0be..4e89049 100644 --- a/batman-adv/compat.h +++ b/batman-adv/compat.h @@ -270,4 +270,10 @@ int bat_seq_printf(struct seq_file *m, const char *f, ...);
#endif /* < KERNEL_VERSION(2, 6, 33) */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + +#define __rcu + +#endif /* < KERNEL_VERSION(2, 6, 36) */ + #endif /* _NET_BATMAN_ADV_COMPAT_H_ */ diff --git a/batman-adv/types.h b/batman-adv/types.h index 4ae11c3..4dc5854 100644 --- a/batman-adv/types.h +++ b/batman-adv/types.h @@ -171,7 +171,7 @@ struct bat_priv { struct delayed_work hna_work; struct delayed_work orig_work; struct delayed_work vis_work; - struct gw_node *curr_gw; + struct gw_node __rcu *curr_gw; /* rcu protected pointer */ struct vis_info *my_vis_info; };