Skip to content

Commit 5fb1c2a

Browse files
frextriteKAGA-KOKO
authored andcommitted
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
1 parent 6e317c3 commit 5fb1c2a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎kernel/time/posix-timers.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ static struct k_itimer *__posix_timers_find(struct hlist_head *head,
121121
{
122122
struct k_itimer *timer;
123123

124-
hlist_for_each_entry_rcu(timer, head, t_hash) {
124+
hlist_for_each_entry_rcu(timer, head, t_hash,
125+
lockdep_is_held(&hash_lock)) {
125126
if ((timer->it_signal == sig) && (timer->it_id == id))
126127
return timer;
127128
}

0 commit comments

Comments
 (0)