summaryrefslogtreecommitdiff
path: root/kernel/time
diff options
context:
space:
mode:
authorAmol Grover <frextrite@gmail.com>2020-02-16 13:13:30 +0530
committerThomas Gleixner <tglx@linutronix.de>2020-02-17 20:12:19 +0100
commit5fb1c2a5bbf79ccca8d17cf97f66085be5808027 (patch)
treea3bd43ae2ceb5e728ddce3def0bc9cf72780c65e /kernel/time
parent6e317c32fd39a13e4854a27958d5e35d15d196be (diff)
posix-timers: Pass lockdep expression to RCU lists
head is traversed using hlist_for_each_entry_rcu outside an RCU read-side critical section but under the protection of hash_lock. Hence, add corresponding lockdep expression to silence false-positive lockdep warnings, and harden RCU lists. [ tglx: Removed the macro and put the condition right where it's used ] Signed-off-by: Amol Grover <frextrite@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200216074330.GA14025@workstation-portable
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/posix-timers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index ff0eb30de346..07709ac30439 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -121,7 +121,8 @@ static struct k_itimer *__posix_timers_find(struct hlist_head *head,
{
struct k_itimer *timer;
- hlist_for_each_entry_rcu(timer, head, t_hash) {
+ hlist_for_each_entry_rcu(timer, head, t_hash,
+ lockdep_is_held(&hash_lock)) {
if ((timer->it_signal == sig) && (timer->it_id == id))
return timer;
}