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

Commit 46dfd401 authored by Andrew Bresticker's avatar Andrew Bresticker Committed by John Stultz
Browse files

CHROMIUM: android: Unconditionally remove callbacks in sync_fence_free()



Using fence->status to determine whether or not there are callbacks
remaining on the sync_fence is racy since fence->status may have been
decremented to 0 on another CPU before fence_check_cb_func() has
completed.  By unconditionally calling fence_remove_callback() for each
fence in the sync_fence, we guarantee that each callback has either
completed (since fence_remove_callback() grabs the fence lock) or been
removed.

BUG=chrome-os-partner:46382
TEST=Reboot cycle test on Smaug; no crashes seen.

Change-Id: I837180ef633aed3c5ae1e52e0d6ded838342b8fa
Signed-off-by: default avatarAndrew Bresticker <abrestic@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/305331


Reviewed-by: default avatarPuneet Kumar <puneetster@chromium.org>
parent 41576bbd
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