Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bced4952 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres
Browse files

iommu: iommu-debug: Fix race with respect to test buffer allocation



When the buffer pointed to by test_virt_addr is allocated, there
is no synchronization with respect to checking if it is necessary
to allocate the buffer. This can lead to various adversarial
scenarios, where multiple concurrent allocations of the same
buffer can occur, resulting in memory leaks.

To avoid these scenarios, make the check and allocation of the
buffer atomic with respect to other accesses to test_virt_addr.

Change-Id: Ie7e05930042b0bbf4bec0a4f1f5b325970023a5a
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 1e976197
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment