s390/pci: fix out of bounds access during irq setup
authorSebastian Ott <sebott@linux.ibm.com>
Mon, 13 Aug 2018 09:26:46 +0000 (11:26 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 16 Aug 2018 12:49:12 +0000 (14:49 +0200)
commit866f3576a72b2233a76dffb80290f8086dc49e17
treea20cbde9b2a668998578cf23f145f489e99e5fca
parent2395103b3fbf2553d94a64ac3e29595cb040474b
s390/pci: fix out of bounds access during irq setup

During interrupt setup we allocate interrupt vectors, walk the list of msi
descriptors, and fill in the message data. Requesting more interrupts than
supported on s390 can lead to an out of bounds access.

When we restrict the number of interrupts we should also stop walking the
msi list after all supported interrupts are handled.

Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Ott <sebott@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/pci/pci.c