summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-11-01 15:33:06 +0100
committerHirokazu Takata <takata@linux-m32r.org>2009-11-04 08:39:26 +0900
commit45cdd473301aae36e1f10664b9fe7ef5aad3f182 (patch)
treeaf1feedba66ea1364f9607806eef46f8aad613c2 /arch
parent337214e8c6b0c777713b2483749f9c03102a416c (diff)
downloadblackbird-op-linux-45cdd473301aae36e1f10664b9fe7ef5aad3f182.tar.gz
blackbird-op-linux-45cdd473301aae36e1f10664b9fe7ef5aad3f182.zip
m32r: Should index be positive?
Index `ipi_num' is signed, test whether it is negative to make sure we don't get a negative array element. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/m32r/kernel/smp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c
index 8a88f1f0a3e2..31cef20b2996 100644
--- a/arch/m32r/kernel/smp.c
+++ b/arch/m32r/kernel/smp.c
@@ -806,7 +806,7 @@ unsigned long send_IPI_mask_phys(cpumask_t physid_mask, int ipi_num,
if (mask & ~physids_coerce(phys_cpu_present_map))
BUG();
- if (ipi_num >= NR_IPIS)
+ if (ipi_num >= NR_IPIS || ipi_num < 0)
BUG();
mask <<= IPI_SHIFT;
OpenPOWER on IntegriCloud