* Patch "genirq/ipi: Fixup checks against nr_cpu_ids" has been added to the 4.12-stable tree
@ 2017-08-20 19:01 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-08-20 19:01 UTC (permalink / raw)
To: adobriyan, gregkh, tglx; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
genirq/ipi: Fixup checks against nr_cpu_ids
to the 4.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
genirq-ipi-fixup-checks-against-nr_cpu_ids.patch
and it can be found in the queue-4.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 8fbbe2d7cc478d1544f41f2271787c993c23a4f6 Mon Sep 17 00:00:00 2001
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Sat, 19 Aug 2017 12:57:51 +0300
Subject: genirq/ipi: Fixup checks against nr_cpu_ids
From: Alexey Dobriyan <adobriyan@gmail.com>
commit 8fbbe2d7cc478d1544f41f2271787c993c23a4f6 upstream.
Valid CPU ids are [0, nr_cpu_ids-1] inclusive.
Fixes: 3b8e29a82dd1 ("genirq: Implement ipi_send_mask/single()")
Fixes: f9bce791ae2a ("genirq: Add a new function to get IPI reverse mapping")
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170819095751.GB27864@avx2
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/irq/ipi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/irq/ipi.c
+++ b/kernel/irq/ipi.c
@@ -165,7 +165,7 @@ irq_hw_number_t ipi_get_hwirq(unsigned i
struct irq_data *data = irq_get_irq_data(irq);
struct cpumask *ipimask = data ? irq_data_get_affinity_mask(data) : NULL;
- if (!data || !ipimask || cpu > nr_cpu_ids)
+ if (!data || !ipimask || cpu >= nr_cpu_ids)
return INVALID_HWIRQ;
if (!cpumask_test_cpu(cpu, ipimask))
@@ -195,7 +195,7 @@ static int ipi_send_verify(struct irq_ch
if (!chip->ipi_send_single && !chip->ipi_send_mask)
return -EINVAL;
- if (cpu > nr_cpu_ids)
+ if (cpu >= nr_cpu_ids)
return -EINVAL;
if (dest) {
Patches currently in stable-queue which might be from adobriyan@gmail.com are
queue-4.12/genirq-ipi-fixup-checks-against-nr_cpu_ids.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-20 19:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-20 19:01 Patch "genirq/ipi: Fixup checks against nr_cpu_ids" has been added to the 4.12-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).