msm: kgsl: prevent kgsl_get_pagetable from returning a destroyed pt
A race condition exists between kref_get_pagetable and
kref_put_pagetable such that is is possible to put the last
reference to a pagetable slightly before it has been removed
from the list. By checking kref_get_unless_zero we can determine
if the last reference has already been released. This is safe
because the list is protected by a ptlock.
Change-Id: If6a75e9ca0dec6a12bda5739f835c936a4c3a3b4
Signed-off-by:
Jeff Boody <jboody@codeaurora.org>
Loading
Please register or sign in to comment