Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netlabel: Mark rcu pointers with __rcu.

This fixes sparse errors of the form:
incompatible types in comparison expression (different address spaces)

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>

authored by

Huw Davies and committed by
Paul Moore
96a8f7f8 309c5fad

+4 -4
+2 -2
net/netlabel/netlabel_domainhash.c
··· 55 55 static DEFINE_SPINLOCK(netlbl_domhsh_lock); 56 56 #define netlbl_domhsh_rcu_deref(p) \ 57 57 rcu_dereference_check(p, lockdep_is_held(&netlbl_domhsh_lock)) 58 - static struct netlbl_domhsh_tbl *netlbl_domhsh; 59 - static struct netlbl_dom_map *netlbl_domhsh_def; 58 + static struct netlbl_domhsh_tbl __rcu *netlbl_domhsh; 59 + static struct netlbl_dom_map __rcu *netlbl_domhsh_def; 60 60 61 61 /* 62 62 * Domain Hash Table Helper Functions
+2 -2
net/netlabel/netlabel_unlabeled.c
··· 116 116 static DEFINE_SPINLOCK(netlbl_unlhsh_lock); 117 117 #define netlbl_unlhsh_rcu_deref(p) \ 118 118 rcu_dereference_check(p, lockdep_is_held(&netlbl_unlhsh_lock)) 119 - static struct netlbl_unlhsh_tbl *netlbl_unlhsh; 120 - static struct netlbl_unlhsh_iface *netlbl_unlhsh_def; 119 + static struct netlbl_unlhsh_tbl __rcu *netlbl_unlhsh; 120 + static struct netlbl_unlhsh_iface __rcu *netlbl_unlhsh_def; 121 121 122 122 /* Accept unlabeled packets flag */ 123 123 static u8 netlabel_unlabel_acceptflg;