Commit 6ca9531d authored by Ajay Dudani's avatar Ajay Dudani Committed by Iliyan Malchev
Browse files

gpu: ion: Fix race between ion_import and ion_free



If preemted during ion_free after the refcount is updated but
before the handle can be removed from the rb_tree, import
might find that handle in the tree and try to reuse it
when execution returns to free, the handle will be cleaned
up leaving the caller of import with a corrupt handle.
This patch modifies the locking to protect agains this race.

Change-Id: I31d18cc6398f0ca18e05cd919e2bcf86fa18d568
CRs-Fixed: 385283
Signed-off-by: default avatarRebecca Schultz Zavin <rebecca@android.com>
[lauraa@codeaurora.org: Whitespace change and move unlock]
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>

Signed-off-by: default avatarAjay Dudani <adudani@codeaurora.org>
parent da2f5f20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment