mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
fix(sdei): fix a crash when attempting to bind more events than are available
You can only bind a limited number of events in each range. If you attempt to bind more, it was crashing. This patch makes it return an error code instead. Change-Id: Ib19f0f0780959ded244d45349d9d6c8607255c15 Signed-off-by: Charlie Bareham <charlie.bareham@arm.com>
This commit is contained in:
parent
8fb91783ff
commit
4096bd66c7
1 changed files with 3 additions and 1 deletions
|
@ -744,7 +744,9 @@ static int sdei_interrupt_bind(unsigned int intr_num)
|
|||
return SDEI_ENOMEM;
|
||||
|
||||
/* The returned mapping must be dynamic */
|
||||
assert(is_map_dynamic(map));
|
||||
if (!is_map_dynamic(map)) {
|
||||
return SDEI_ENOMEM;
|
||||
}
|
||||
|
||||
/*
|
||||
* We cannot assert for bound maps here, as we might be racing
|
||||
|
|
Loading…
Add table
Reference in a new issue