Fix buffer overflow in Marvell PCI/PCIe driver

Buffer overflow occured when more than one MSI was allocated.

Submitted by:    Wojciech Macek <wma@semihalf.com>
Obtained from:   Semihalf
This commit is contained in:
zbb 2014-12-07 21:02:45 +00:00
parent ffce896d6b
commit be64c52822

View File

@ -1171,7 +1171,7 @@ mv_pcib_alloc_msi(device_t dev, device_t child, int count,
for (i = start; i < start + count; i++) {
setbit(&sc->sc_msi_bitmap, i);
irqs[i] = MSI_IRQ + i;
*irqs++ = MSI_IRQ + i;
}
debugf("%s: start: %x count: %x\n", __func__, start, count);