Skip to content

Commit

Permalink
rcu: fix sparse errors in rcutorture.c
Browse files Browse the repository at this point in the history
Add the sparse __rcu address-space identifier and make a couple of
variables static.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  • Loading branch information
Paul E. McKenney committed Sep 23, 2010
1 parent 53ecfba commit 0ddea0e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions kernel/rcutorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ struct rcu_torture {
};

static LIST_HEAD(rcu_torture_freelist);
static struct rcu_torture *rcu_torture_current;
static struct rcu_torture __rcu *rcu_torture_current;
static long rcu_torture_current_version;
static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
static DEFINE_SPINLOCK(rcu_torture_lock);
Expand Down Expand Up @@ -153,8 +153,10 @@ int rcutorture_runnable = RCUTORTURE_RUNNABLE_INIT;
#define FULLSTOP_SHUTDOWN 1 /* System shutdown with rcutorture running. */
#define FULLSTOP_RMMOD 2 /* Normal rmmod of rcutorture. */
static int fullstop = FULLSTOP_RMMOD;
DEFINE_MUTEX(fullstop_mutex); /* Protect fullstop transitions and spawning */
/* of kthreads. */
/*
* Protect fullstop transitions and spawning of kthreads.
*/
static DEFINE_MUTEX(fullstop_mutex);

/*
* Detect and respond to a system shutdown.
Expand Down Expand Up @@ -737,7 +739,8 @@ rcu_torture_writer(void *arg)
continue;
rp->rtort_pipe_count = 0;
udelay(rcu_random(&rand) & 0x3ff);
old_rp = rcu_torture_current;
old_rp = rcu_dereference_check(rcu_torture_current,
current == writer_task);
rp->rtort_mbtest = 1;
rcu_assign_pointer(rcu_torture_current, rp);
smp_wmb(); /* Mods to old_rp must follow rcu_assign_pointer() */
Expand Down

0 comments on commit 0ddea0e

Please sign in to comment.