提交 45cdd473 编写于 作者: R Roel Kluin 提交者: Hirokazu Takata

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: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
上级 337214e8
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册