projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4396f46
)
genirq/affinity: Use get/put_online_cpus around cpumask operations
author
Christoph Hellwig
<hch@lst.de>
Thu, 11 Aug 2016 14:06:45 +0000
(07:06 -0700)
committer
Thomas Gleixner
<tglx@linutronix.de>
Mon, 22 Aug 2016 09:22:44 +0000
(11:22 +0200)
Without locking out CPU mask operations we might end up with an inconsistent
view of the cpumask in the function.
Fixes:
5e385a6ef31f
: "genirq: Add a helper to spread an affinity mask for MSI/MSI-X vectors"
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link:
http://lkml.kernel.org/r/1470924405-25728-1-git-send-email-hch@lst.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/affinity.c
patch
|
blob
|
history
diff --git
a/kernel/irq/affinity.c
b/kernel/irq/affinity.c
index
f689593
..
32f6cfc
100644
(file)
--- a/
kernel/irq/affinity.c
+++ b/
kernel/irq/affinity.c
@@
-39,6
+39,7
@@
struct cpumask *irq_create_affinity_mask(unsigned int *nr_vecs)
return NULL;
}
+ get_online_cpus();
if (max_vecs >= num_online_cpus()) {
cpumask_copy(affinity_mask, cpu_online_mask);
*nr_vecs = num_online_cpus();
@@
-56,6
+57,7
@@
struct cpumask *irq_create_affinity_mask(unsigned int *nr_vecs)
}
*nr_vecs = vecs;
}
+ put_online_cpus();
return affinity_mask;
}