diff options
author | Russell Currey <ruscur@russell.cc> | 2017-08-10 16:58:38 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-08-11 16:37:14 +1000 |
commit | 3e4cd293c9690b06e437b404b1f032a280630dc3 (patch) | |
tree | bf6851a43f455a987fb3c2243af128f5e7039dda /hw/xive.c | |
parent | 2c67c7bc4a780f46253c6947dbfce29a9a1f7efa (diff) | |
download | talos-skiboot-3e4cd293c9690b06e437b404b1f032a280630dc3.tar.gz talos-skiboot-3e4cd293c9690b06e437b404b1f032a280630dc3.zip |
xive: Check for valid PIR index when decoding
This fixes an unlikely but possible assert() fail on kdump.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/xive.c')
-rw-r--r-- | hw/xive.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -601,6 +601,8 @@ static bool xive_decode_vp(uint32_t vp, uint32_t *blk, uint32_t *idx, /* PIR case */ if (((vp >> 30) & 1) == 0) { + if (find_cpu_by_pir(index) == NULL) + return false; if (blk) *blk = PIR2VP_BLK(index); if (idx) @@ -656,6 +658,8 @@ static bool xive_decode_vp(uint32_t vp, uint32_t *blk, uint32_t *idx, /* PIR case */ if (((vp >> 30) & 1) == 0) { + if (find_cpu_by_pir(index) == NULL) + return false; if (blk) *blk = PIR2VP_BLK(index); if (idx) |