summaryrefslogtreecommitdiff
path: root/kernel/irq/proc.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-12-10 22:25:41 +0300
committerThomas Gleixner <tglx@linutronix.de>2020-12-15 18:19:30 +0300
commit9e42ad10cedf0632fc39860381375806092212bd (patch)
tree869b44fb4351939487b8d5a47ec4057357ff19da /kernel/irq/proc.c
parent3e2380123fb96987ce958f623207010c667ffa7c (diff)
downloadlinux-9e42ad10cedf0632fc39860381375806092212bd.tar.xz
genirq: Annotate irq stats data races
Both the per cpu stats and the accumulated count are accessed lockless and can be concurrently modified. That's intentional and the stats are a rough estimate anyway. Annotate them with data_race(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20201210194043.067097663@linutronix.de
Diffstat (limited to 'kernel/irq/proc.c')
-rw-r--r--kernel/irq/proc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 72513ed2a5fc..98138788cb04 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -488,9 +488,10 @@ int show_interrupts(struct seq_file *p, void *v)
if (!desc || irq_settings_is_hidden(desc))
goto outsparse;
- if (desc->kstat_irqs)
+ if (desc->kstat_irqs) {
for_each_online_cpu(j)
- any_count |= *per_cpu_ptr(desc->kstat_irqs, j);
+ any_count |= data_race(*per_cpu_ptr(desc->kstat_irqs, j));
+ }
if ((!desc->action || irq_desc_is_chained(desc)) && !any_count)
goto outsparse;