summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
author Jim Shargo <jshargo@google.com> 2025-03-05 17:38:19 +0000
committer Jim Shargo <jshargo@google.com> 2025-03-10 19:11:04 +0000
commitfd4edb2e928c378259d120628ec6ea7332651653 (patch)
treecddd8f8ed28bf0cc417de39376942721573b3529 /services/surfaceflinger/RegionSamplingThread.cpp
parentb61e79d3868206e14fcedbd37c54918370702165 (diff)
BufferQueue: Fix deadlock in setMaxAcquiredBufferCount
Uncovered this while testing. The deadlock happens when: - ConsumerBase::setMaxAcquiredBufferCount locks itself - Calls IGBC::setMaxAcquiredBufferCount, which can call ConsumerListener::onBuffersReleased - Which, in ConsumerBase, will take the lock again Instead of this, we add a callback to be called instead of the IConsumerListener. This callback is called on the same stack, with the lock held, so that we can resolve everything atomically. Bug: b/393639203 Flag: EXEMPT small cleanup Test: new test Change-Id: Iddd8f902d1fd0aeed6aac095eaa6c0b870ffff70
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
0 files changed, 0 insertions, 0 deletions