Fix binder transaction crash with ril

Change-Id: I8a494229220588cf1e6ea84ff89920740dd9102c
This commit is contained in:
Florian Leeber 2021-05-11 00:13:50 +02:00
parent 068b69ec9a
commit b786492b70

View file

@ -2798,7 +2798,15 @@ static bool binder_proc_transaction(struct binder_transaction *t,
if (oneway) {
BUG_ON(thread);
if (node->has_async_transaction) {
pending_async = true;
if (!strcmp(proc->context->name, "hwbinder")) {
// Halium: possible libgbinder bug workaround
pr_info("%d has pending async transaction, but still adding a new transaction to todo list (gbinder bug workaround)\n",
proc->pid);
} else {
pr_info("%d not applying gbinder workaround, context %s is not hwbinder\n",
proc->pid, proc->context->name);
pending_async = true;
}
} else {
node->has_async_transaction = true;
}
@ -3663,7 +3671,8 @@ static int binder_thread_write(struct binder_proc *proc,
buf_node = buffer->target_node;
binder_node_inner_lock(buf_node);
BUG_ON(!buf_node->has_async_transaction);
// Halium: possible libgbinder bug workaround
/*BUG_ON(!buf_node->has_async_transaction);*/
BUG_ON(buf_node->proc != proc);
w = binder_dequeue_work_head_ilocked(
&buf_node->async_todo);