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

Commit e4904ae0 authored by Blagovest Kolenichev's avatar Blagovest Kolenichev
Browse files

Revert "binder: Prevent context manager from incrementing ref 0"



This reverts commit c5665caf.

This is a preparation change for merging android-5.4.58 into
msm-5.4 branch. The reverted change is causing UI unresponsive
issue.

Change-Id: I00a837a8706c3625ef736a4de8ce501df233f9a0
Signed-off-by: default avatarBlagovest Kolenichev <bkolenichev@codeaurora.org>
parent ba99b3df
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -3143,12 +3143,6 @@ static void binder_transaction(struct binder_proc *proc,
			goto err_dead_binder;
		}
		e->to_node = target_node->debug_id;
		if (WARN_ON(proc == target_proc)) {
			return_error = BR_FAILED_REPLY;
			return_error_param = -EINVAL;
			return_error_line = __LINE__;
			goto err_invalid_target_handle;
		}
		if (security_binder_transaction(proc->tsk,
						target_proc->tsk) < 0) {
			return_error = BR_FAILED_REPLY;
@@ -3812,17 +3806,10 @@ static int binder_thread_write(struct binder_proc *proc,
				struct binder_node *ctx_mgr_node;
				mutex_lock(&context->context_mgr_node_lock);
				ctx_mgr_node = context->binder_context_mgr_node;
				if (ctx_mgr_node) {
					if (ctx_mgr_node->proc == proc) {
						binder_user_error("%d:%d context manager tried to acquire desc 0\n",
								  proc->pid, thread->pid);
						mutex_unlock(&context->context_mgr_node_lock);
						return -EINVAL;
					}
				if (ctx_mgr_node)
					ret = binder_inc_ref_for_node(
							proc, ctx_mgr_node,
							strong, NULL, &rdata);
				}
				mutex_unlock(&context->context_mgr_node_lock);
			}
			if (ret)