Skip to content

Commit

Permalink
Merge tag 'irqchip-4.13-2' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/maz/arm-platforms into irq/core

Merge second batch of irqchip updates for 4.13 from Marc Zyngier

- Potential out of bound access for GICv3
- Memory allocation gotcha in the Marvell GICP driver
- Fix openrisc interrupt acknowledgement
  • Loading branch information
KAGA-KOKO committed Jun 30, 2017
2 parents 425a17c + ca38701 commit f9632de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions drivers/irqchip/irq-gic-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
int enabled;
u64 val;

if (cpu >= nr_cpu_ids)
return -EINVAL;

if (gic_irq_in_rdist(d))
return -EINVAL;

Expand Down
4 changes: 2 additions & 2 deletions drivers/irqchip/irq-mvebu-gicp.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
}

gicp->spi_bitmap = devm_kzalloc(&pdev->dev,
BITS_TO_LONGS(gicp->spi_cnt),
GFP_KERNEL);
BITS_TO_LONGS(gicp->spi_cnt) * sizeof(long),
GFP_KERNEL);
if (!gicp->spi_bitmap)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion drivers/irqchip/irq-or1k-pic.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static struct or1k_pic_dev or1k_pic_level = {
.name = "or1k-PIC-level",
.irq_unmask = or1k_pic_unmask,
.irq_mask = or1k_pic_mask,
.irq_mask_ack = or1k_pic_mask,
.irq_mask_ack = or1k_pic_mask_ack,
},
.handle = handle_level_irq,
.flags = IRQ_LEVEL | IRQ_NOPROBE,
Expand Down

0 comments on commit f9632de

Please sign in to comment.