Skip to content

Commit 96a8f7f

Browse files
hdmdaviespcmoore
authored andcommitted
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>
1 parent 309c5fa commit 96a8f7f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

net/netlabel/netlabel_domainhash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ struct netlbl_domhsh_tbl {
5555
static DEFINE_SPINLOCK(netlbl_domhsh_lock);
5656
#define netlbl_domhsh_rcu_deref(p) \
5757
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;
6060

6161
/*
6262
* Domain Hash Table Helper Functions

net/netlabel/netlabel_unlabeled.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ struct netlbl_unlhsh_walk_arg {
116116
static DEFINE_SPINLOCK(netlbl_unlhsh_lock);
117117
#define netlbl_unlhsh_rcu_deref(p) \
118118
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;
121121

122122
/* Accept unlabeled packets flag */
123123
static u8 netlabel_unlabel_acceptflg;

0 commit comments

Comments
 (0)