]> git.baikalelectronics.ru Git - arm-tf.git/commit
xlat v2: Correctly unmap regions on map error
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Fri, 5 Jan 2018 11:30:36 +0000 (11:30 +0000)
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Wed, 10 Jan 2018 15:39:37 +0000 (15:39 +0000)
commit96abc22b94b9871c77993be845e75af60f7ed3d9
tree47224f1c65d836dafe0b1b9ea5cae30aad358227
parent210d8d8b8a00b91399f2227840e15bfaafd024a2
xlat v2: Correctly unmap regions on map error

`mm_cursor` doesn't have the needed data because the `memmove()` that
is called right before it overwrites that information. In order to get
the information of the region that was being mapped, `mm` has to be used
instead (like it is done to fill the fields of `unmap_mm`).

If the incorrect information is read, this check isn't reliable and
`xlat_tables_unmap_region` may be requested to unmap memory that isn't
mapped at all, triggering assertions.

Change-Id: I602d4ac83095d4e5dac9deb34aa5d00d00e6c289
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
lib/xlat_tables_v2/xlat_tables_internal.c