Loading libs/binder/IPCThreadState.cpp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -635,6 +635,7 @@ void IPCThreadState::decWeakHandle(int32_t handle) status_t IPCThreadState::attemptIncStrongHandle(int32_t handle) status_t IPCThreadState::attemptIncStrongHandle(int32_t handle) { { #if HAS_BC_ATTEMPT_ACQUIRE LOG_REMOTEREFS("IPCThreadState::attemptIncStrongHandle(%d)\n", handle); LOG_REMOTEREFS("IPCThreadState::attemptIncStrongHandle(%d)\n", handle); mOut.writeInt32(BC_ATTEMPT_ACQUIRE); mOut.writeInt32(BC_ATTEMPT_ACQUIRE); mOut.writeInt32(0); // xxx was thread priority mOut.writeInt32(0); // xxx was thread priority Loading @@ -649,6 +650,11 @@ status_t IPCThreadState::attemptIncStrongHandle(int32_t handle) #endif #endif return result; return result; #else (void)handle; ALOGE("%s(%d): Not supported\n", __func__, handle); return INVALID_OPERATION; #endif } } void IPCThreadState::expungeHandle(int32_t handle, IBinder* binder) void IPCThreadState::expungeHandle(int32_t handle, IBinder* binder) Loading Loading @@ -898,6 +904,7 @@ status_t IPCThreadState::writeTransactionData(int32_t cmd, uint32_t binderFlags, { { binder_transaction_data tr; binder_transaction_data tr; tr.target.ptr = 0; /* Don't pass uninitialized stack data to a remote process */ tr.target.handle = handle; tr.target.handle = handle; tr.code = code; tr.code = code; tr.flags = binderFlags; tr.flags = binderFlags; Loading @@ -915,7 +922,7 @@ status_t IPCThreadState::writeTransactionData(int32_t cmd, uint32_t binderFlags, tr.flags |= TF_STATUS_CODE; tr.flags |= TF_STATUS_CODE; *statusBuffer = err; *statusBuffer = err; tr.data_size = sizeof(status_t); tr.data_size = sizeof(status_t); tr.data.ptr.buffer = reinterpret_cast<binder_uintptr_t>(statusBuffer); tr.data.ptr.buffer = reinterpret_cast<uintptr_t>(statusBuffer); tr.offsets_size = 0; tr.offsets_size = 0; tr.data.ptr.offsets = 0; tr.data.ptr.offsets = 0; } else { } else { Loading libs/binder/Parcel.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -165,6 +165,7 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, } } const int32_t handle = proxy ? proxy->handle() : 0; const int32_t handle = proxy ? proxy->handle() : 0; obj.type = BINDER_TYPE_HANDLE; obj.type = BINDER_TYPE_HANDLE; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = handle; obj.handle = handle; obj.cookie = 0; obj.cookie = 0; } else { } else { Loading Loading @@ -198,6 +199,7 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, } } const int32_t handle = proxy ? proxy->handle() : 0; const int32_t handle = proxy ? proxy->handle() : 0; obj.type = BINDER_TYPE_WEAK_HANDLE; obj.type = BINDER_TYPE_WEAK_HANDLE; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = handle; obj.handle = handle; obj.cookie = 0; obj.cookie = 0; } else { } else { Loading Loading @@ -749,6 +751,7 @@ status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership) flat_binder_object obj; flat_binder_object obj; obj.type = BINDER_TYPE_FD; obj.type = BINDER_TYPE_FD; obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = fd; obj.handle = fd; obj.cookie = takeOwnership ? 1 : 0; obj.cookie = takeOwnership ? 1 : 0; return writeObject(obj, true); return writeObject(obj, true); Loading Loading
libs/binder/IPCThreadState.cpp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -635,6 +635,7 @@ void IPCThreadState::decWeakHandle(int32_t handle) status_t IPCThreadState::attemptIncStrongHandle(int32_t handle) status_t IPCThreadState::attemptIncStrongHandle(int32_t handle) { { #if HAS_BC_ATTEMPT_ACQUIRE LOG_REMOTEREFS("IPCThreadState::attemptIncStrongHandle(%d)\n", handle); LOG_REMOTEREFS("IPCThreadState::attemptIncStrongHandle(%d)\n", handle); mOut.writeInt32(BC_ATTEMPT_ACQUIRE); mOut.writeInt32(BC_ATTEMPT_ACQUIRE); mOut.writeInt32(0); // xxx was thread priority mOut.writeInt32(0); // xxx was thread priority Loading @@ -649,6 +650,11 @@ status_t IPCThreadState::attemptIncStrongHandle(int32_t handle) #endif #endif return result; return result; #else (void)handle; ALOGE("%s(%d): Not supported\n", __func__, handle); return INVALID_OPERATION; #endif } } void IPCThreadState::expungeHandle(int32_t handle, IBinder* binder) void IPCThreadState::expungeHandle(int32_t handle, IBinder* binder) Loading Loading @@ -898,6 +904,7 @@ status_t IPCThreadState::writeTransactionData(int32_t cmd, uint32_t binderFlags, { { binder_transaction_data tr; binder_transaction_data tr; tr.target.ptr = 0; /* Don't pass uninitialized stack data to a remote process */ tr.target.handle = handle; tr.target.handle = handle; tr.code = code; tr.code = code; tr.flags = binderFlags; tr.flags = binderFlags; Loading @@ -915,7 +922,7 @@ status_t IPCThreadState::writeTransactionData(int32_t cmd, uint32_t binderFlags, tr.flags |= TF_STATUS_CODE; tr.flags |= TF_STATUS_CODE; *statusBuffer = err; *statusBuffer = err; tr.data_size = sizeof(status_t); tr.data_size = sizeof(status_t); tr.data.ptr.buffer = reinterpret_cast<binder_uintptr_t>(statusBuffer); tr.data.ptr.buffer = reinterpret_cast<uintptr_t>(statusBuffer); tr.offsets_size = 0; tr.offsets_size = 0; tr.data.ptr.offsets = 0; tr.data.ptr.offsets = 0; } else { } else { Loading
libs/binder/Parcel.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -165,6 +165,7 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, } } const int32_t handle = proxy ? proxy->handle() : 0; const int32_t handle = proxy ? proxy->handle() : 0; obj.type = BINDER_TYPE_HANDLE; obj.type = BINDER_TYPE_HANDLE; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = handle; obj.handle = handle; obj.cookie = 0; obj.cookie = 0; } else { } else { Loading Loading @@ -198,6 +199,7 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, } } const int32_t handle = proxy ? proxy->handle() : 0; const int32_t handle = proxy ? proxy->handle() : 0; obj.type = BINDER_TYPE_WEAK_HANDLE; obj.type = BINDER_TYPE_WEAK_HANDLE; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = handle; obj.handle = handle; obj.cookie = 0; obj.cookie = 0; } else { } else { Loading Loading @@ -749,6 +751,7 @@ status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership) flat_binder_object obj; flat_binder_object obj; obj.type = BINDER_TYPE_FD; obj.type = BINDER_TYPE_FD; obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = fd; obj.handle = fd; obj.cookie = takeOwnership ? 1 : 0; obj.cookie = takeOwnership ? 1 : 0; return writeObject(obj, true); return writeObject(obj, true); Loading