[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150529100621.GG28762@mwanda>
Date: Fri, 29 May 2015 13:06:21 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Riley Andrews <riandrews@...roid.com>
Cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arve Hjønnevåg <arve@...roid.com>,
devel@...verdev.osuosl.org
Subject: Re: [PATCH 03/13] android: binder: refactor binder_thread_write
This patch is ok.
Reviewed-by: Dan Carpenter <dan.carpenter@...cle.com>
On Thu, May 28, 2015 at 04:08:21PM -0700, Riley Andrews wrote:
> +static void binder_call_inc_dec_ref(struct binder_thread *thread,
> + uint32_t target, uint32_t cmd)
> +{
> + struct binder_proc *proc = thread->proc;
> + struct binder_ref *ref;
> + const char *debug_string;
> +
> + if (target == 0 && binder_context_mgr_node &&
> + (cmd == BC_INCREFS || cmd == BC_ACQUIRE)) {
> + ref = binder_get_ref_for_node(proc, binder_context_mgr_node);
> + if (ref->desc != target) {
> + binder_user_error("%d:%d tried to acquire reference to desc 0, got %d instead\n",
> + proc->pid, thread->pid, ref->desc);
> + return;
Presumably we never hit this error condition. In the original code we
printed an error and continued but now we bail on error. Presumably
this is a theoretical bug fix which doesn't affect real life so I will
allow it. But in the future don't mix behaviour changes with clean up
patches.
> + }
> + } else {
> + ref = binder_get_ref(proc, target);
> + }
> + if (!ref) {
In the original code this was "if (ref == NULL)". Please don't mix
these kinds of cleanups with moving code around because it makes it
harder for me to review. Do that in a separate patch.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists