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

Commit e6e21530 authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

Camera: Fix race condition in Camera3BufferManager

detachBuffer is called with mLock temporarily released, which causes
race condition with getBufferForStream() when the last buffer is being
dequeued at the same time.

Address the race by modifying attachedBufferCount before releasing the
lock, and changing it back if detachBuffer fails to detach any buffer.

Flag: EXEMPT bugfix
Test: run testSurfaceSet in a loop
Bug: 421657430
Change-Id: I9086aa386f1a41a717d10b93a58fa7766eb1c02a
parent beeccee2
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