|
@@ -2217,7 +2217,7 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
|
|
debug_id, (u64)fda->num_fds);
|
|
debug_id, (u64)fda->num_fds);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- fd_array = (u32 *)(parent_buffer + fda->parent_offset);
|
|
|
|
|
|
+ fd_array = (u32 *)(parent_buffer + (uintptr_t)fda->parent_offset);
|
|
for (fd_index = 0; fd_index < fda->num_fds; fd_index++)
|
|
for (fd_index = 0; fd_index < fda->num_fds; fd_index++)
|
|
task_close_fd(proc, fd_array[fd_index]);
|
|
task_close_fd(proc, fd_array[fd_index]);
|
|
} break;
|
|
} break;
|
|
@@ -2326,7 +2326,6 @@ static int binder_translate_handle(struct flat_binder_object *fp,
|
|
(u64)node->ptr);
|
|
(u64)node->ptr);
|
|
binder_node_unlock(node);
|
|
binder_node_unlock(node);
|
|
} else {
|
|
} else {
|
|
- int ret;
|
|
|
|
struct binder_ref_data dest_rdata;
|
|
struct binder_ref_data dest_rdata;
|
|
|
|
|
|
binder_node_unlock(node);
|
|
binder_node_unlock(node);
|
|
@@ -2442,7 +2441,7 @@ static int binder_translate_fd_array(struct binder_fd_array_object *fda,
|
|
*/
|
|
*/
|
|
parent_buffer = parent->buffer -
|
|
parent_buffer = parent->buffer -
|
|
binder_alloc_get_user_buffer_offset(&target_proc->alloc);
|
|
binder_alloc_get_user_buffer_offset(&target_proc->alloc);
|
|
- fd_array = (u32 *)(parent_buffer + fda->parent_offset);
|
|
|
|
|
|
+ fd_array = (u32 *)(parent_buffer + (uintptr_t)fda->parent_offset);
|
|
if (!IS_ALIGNED((unsigned long)fd_array, sizeof(u32))) {
|
|
if (!IS_ALIGNED((unsigned long)fd_array, sizeof(u32))) {
|
|
binder_user_error("%d:%d parent offset not aligned correctly.\n",
|
|
binder_user_error("%d:%d parent offset not aligned correctly.\n",
|
|
proc->pid, thread->pid);
|
|
proc->pid, thread->pid);
|
|
@@ -2508,7 +2507,7 @@ static int binder_fixup_parent(struct binder_transaction *t,
|
|
proc->pid, thread->pid);
|
|
proc->pid, thread->pid);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
- parent_buffer = (u8 *)(parent->buffer -
|
|
|
|
|
|
+ parent_buffer = (u8 *)((uintptr_t)parent->buffer -
|
|
binder_alloc_get_user_buffer_offset(
|
|
binder_alloc_get_user_buffer_offset(
|
|
&target_proc->alloc));
|
|
&target_proc->alloc));
|
|
*(binder_uintptr_t *)(parent_buffer + bp->parent_offset) = bp->buffer;
|
|
*(binder_uintptr_t *)(parent_buffer + bp->parent_offset) = bp->buffer;
|
|
@@ -3083,6 +3082,7 @@ static void binder_transaction(struct binder_proc *proc,
|
|
err_dead_proc_or_thread:
|
|
err_dead_proc_or_thread:
|
|
return_error = BR_DEAD_REPLY;
|
|
return_error = BR_DEAD_REPLY;
|
|
return_error_line = __LINE__;
|
|
return_error_line = __LINE__;
|
|
|
|
+ binder_dequeue_work(proc, tcomplete);
|
|
err_translate_failed:
|
|
err_translate_failed:
|
|
err_bad_object_type:
|
|
err_bad_object_type:
|
|
err_bad_offset:
|
|
err_bad_offset:
|