riscv: treat undefined exception codes as reserved
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>
Thu, 22 Nov 2018 10:26:21 +0000 (11:26 +0100)
committerAndes <uboot@andestech.com>
Mon, 26 Nov 2018 05:57:30 +0000 (13:57 +0800)
commite8b522b1df8b5874e08b53f6e5aef8a2c458446b
tree3cb9fc9d007445d6613de2304b4ec8966ba358fd
parent5a441736b7dda7fd4dde0a2417aeab59a9ef9424
riscv: treat undefined exception codes as reserved

Undefined exception codes currently lead to an out-of-bounds array
access. Prevent this by treating undefined exception codes as
"reserved".

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
arch/riscv/lib/interrupts.c