Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f78f5b90 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()



This commit renames rcu_lockdep_assert() to RCU_LOCKDEP_WARN() for
consistency with the WARN() series of macros.  This also requires
inverting the sense of the conditional, which this commit also does.

Reported-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: default avatarIngo Molnar <mingo@kernel.org>
parent 46f00d18
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -883,7 +883,7 @@ All: lockdep-checked RCU-protected pointer access

	rcu_access_pointer
	rcu_dereference_raw
	rcu_lockdep_assert
	RCU_LOCKDEP_WARN
	rcu_sleep_check
	RCU_NONIDLE

+3 −3
Original line number Diff line number Diff line
@@ -54,8 +54,8 @@ static DEFINE_MUTEX(mce_chrdev_read_mutex);

#define rcu_dereference_check_mce(p) \
({ \
	rcu_lockdep_assert(rcu_read_lock_sched_held() || \
			   lockdep_is_held(&mce_chrdev_read_mutex), \
	RCU_LOCKDEP_WARN(!rcu_read_lock_sched_held() && \
			 !lockdep_is_held(&mce_chrdev_read_mutex), \
			 "suspicious rcu_dereference_check_mce() usage"); \
	smp_load_acquire(&(p)); \
})
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ enum ctx_state ist_enter(struct pt_regs *regs)
	preempt_count_add(HARDIRQ_OFFSET);

	/* This code is a bit fragile.  Test it. */
	rcu_lockdep_assert(rcu_is_watching(), "ist_enter didn't work");
	RCU_LOCKDEP_WARN(!rcu_is_watching(), "ist_enter didn't work");

	return prev_state;
}
+2 −2
Original line number Diff line number Diff line
@@ -110,8 +110,8 @@ static DEFINE_MUTEX(dev_opp_list_lock);

#define opp_rcu_lockdep_assert()					\
do {									\
	rcu_lockdep_assert(rcu_read_lock_held() ||			\
				lockdep_is_held(&dev_opp_list_lock),	\
	RCU_LOCKDEP_WARN(!rcu_read_lock_held() &&			\
				!lockdep_is_held(&dev_opp_list_lock),	\
			   "Missing rcu_read_lock() or "		\
			   "dev_opp_list_lock protection");		\
} while (0)
+2 −2
Original line number Diff line number Diff line
@@ -86,8 +86,8 @@ static inline struct file *__fcheck_files(struct files_struct *files, unsigned i

static inline struct file *fcheck_files(struct files_struct *files, unsigned int fd)
{
	rcu_lockdep_assert(rcu_read_lock_held() ||
			   lockdep_is_held(&files->file_lock),
	RCU_LOCKDEP_WARN(!rcu_read_lock_held() &&
			   !lockdep_is_held(&files->file_lock),
			   "suspicious rcu_dereference_check() usage");
	return __fcheck_files(files, fd);
}
Loading