Skip to content

Commit ca589ea

Browse files
Peter ZijlstraVasily Gorbik
authored andcommitted
s390/idle: fix suspicious RCU usage
After commit eb1f002 ("lockdep,trace: Expose tracepoints") the lock tracepoints are visible to lockdep and RCU-lockdep is finding a bunch more RCU violations that were previously hidden. Switch the idle->seqcount over to using raw_write_*() to avoid the lockdep annotation and thus the lock tracepoints. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent 856deb8 commit ca589ea

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎arch/s390/kernel/idle.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@ void enabled_wait(void)
3939
local_irq_restore(flags);
4040

4141
/* Account time spent with enabled wait psw loaded as idle time. */
42-
/* XXX seqcount has tracepoints that require RCU */
43-
write_seqcount_begin(&idle->seqcount);
42+
raw_write_seqcount_begin(&idle->seqcount);
4443
idle_time = idle->clock_idle_exit - idle->clock_idle_enter;
4544
idle->clock_idle_enter = idle->clock_idle_exit = 0ULL;
4645
idle->idle_time += idle_time;
4746
idle->idle_count++;
4847
account_idle_time(cputime_to_nsecs(idle_time));
49-
write_seqcount_end(&idle->seqcount);
48+
raw_write_seqcount_end(&idle->seqcount);
5049
}
5150
NOKPROBE_SYMBOL(enabled_wait);
5251

0 commit comments

Comments
 (0)