summaryrefslogtreecommitdiffstats
path: root/lib/locking-selftest-mutex.h
diff options
context:
space:
mode:
authorShanker Donthineni <shankerd@codeaurora.org>2016-03-09 22:10:49 -0600
committerMarc Zyngier <marc.zyngier@arm.com>2016-05-11 10:12:12 +0100
commit466b7d168881f477ec8ddcc42d4206618acccf18 (patch)
tree96b415b03152d355262d9722d53d6e6c9bc81a4d /lib/locking-selftest-mutex.h
parent8cb17b5ed0177d1b613aadd53c7e570b81625728 (diff)
downloadblackbird-obmc-linux-466b7d168881f477ec8ddcc42d4206618acccf18.tar.gz
blackbird-obmc-linux-466b7d168881f477ec8ddcc42d4206618acccf18.zip
irqchip/gicv3-its: Don't allow devices whose ID is outside range
We are not checking whether the requested device identifier fits into the device table memory or not. The function its_create_device() assumes that enough memory has been allocated for whole DevID space (reported by ITS_TYPER.Devbits) during the ITS probe() and continues to initialize ITS hardware. This assumption is not perfect, sometimes we reduce memory size either because of its size crossing MAX_ORDER-1 or BASERn max size limit. The MAPD command fails if 'Device ID' is outside of device table range. Add a simple validation check to avoid MAPD failures since we are not handling ITS command errors. This change also helps to return an error -ENOMEM instead of success to caller. Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'lib/locking-selftest-mutex.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud