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

Skip to content
Commit 6071b9f6 authored by liyong's avatar liyong Committed by Vadim Caen
Browse files

fix:exchange ownership of file descriptor for PlanesLockGuard

Bug:356786915

When you pass a fence to AHardwareBuffer_lockPlanes, it implies the transfer of ownership of that fence. You should not directly use fence->get()
because doing so may retain ownership of the fence in your code, leading to potential issues like undefined behavior or race conditions.

pid: 14994, tid: 15396, name: virtual_camera  >>> /system/bin/virtual_camera <<<
uid: 1000
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'fdsan: failed to exchange ownership of file descriptor: fd 38 is owned by unique_fd 0x73dc21b9bc, was expected to be unowned'
    x0  0000000000000000  x1  0000000000003c24  x2  0000000000000006  x3  00000073d25c1340
    x4  7271646d766e1f64  x5  7271646d766e1f64  x6  7271646d766e1f64  x7  7f7f7f7f7f7f7f7f
    x8  00000000000000f0  x9  b1f219c4442dae44  x10 000000003b9ac9ff  x11 0000000000000000
    x12 0000000066a9ec66  x13 000000007fffffff  x14 00000000000bd1c0  x15 0000000e214b74d3
    x16 000000745c92dce8  x17 000000745c9164c0  x18 00000073d1d9c000  x19 0000000000003a92
    x20 0000000000003c24  x21 00000073d25c1f80  x22 0000000000000003  x23 00000073d25c1138
    x24 00000073d25c1430  x25 00000073d25c10b0  x26 00000073d25c1070  x27 ffffff80ffffffc8
    x28 b4000073dc21b2e0  x29 00000073d25c13d0
    lr  000000745c8baed8  sp  00000073d25c0ff0  pc  000000745c8baefc  pst 0000000000001000
(cherry picked from https://partner-android-review.googlesource.com/q/commit:f086a2c997f007c52bd329efbbaaef09d4a6d23d)
Merged-In: Iab622594932049cdc08d33f50bc817b056e2e577
Change-Id: Iab622594932049cdc08d33f50bc817b056e2e577
Flag: EXEMPT bugfix
(cherry picked from commit b71bdfc2)
(cherry picked from commit e8395771)
parent f3ace5d8
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