Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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


authored by

Amol Grover and committed by
Thomas Gleixner
5fb1c2a5 6e317c32

+2 -1
+2 -1
kernel/time/posix-timers.c
··· 121 121 { 122 122 struct k_itimer *timer; 123 123 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)) { 125 126 if ((timer->it_signal == sig) && (timer->it_id == id)) 126 127 return timer; 127 128 }