From patchwork Sun Sep 6 16:00:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Victor Chong X-Patchwork-Id: 53197 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 8FD7F22B05 for ; Sun, 6 Sep 2015 16:00:58 +0000 (UTC) Received: by lbbmp1 with SMTP id mp1sf19107880lbb.2 for ; Sun, 06 Sep 2015 09:00:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:content-type:content-transfer-encoding:sender :precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=nADWL5svdGgO7iXwfC3soveTCSWHX6yispG6C/zcOac=; b=Nis+L9gTulovsuSKI+KIssTfLGwLR6+5Jvfjx6bdoVClPNRIpJGexbRutU+IqmOksJ HyUlTc6iYNxEm6iIPjZRHPB44sVNLbdNZzff/AKsXXy4OBTQfNpvkhDe0gSXJERzzC5H 4diixnjQY92vKjdikSig3WSOe6M8XkBFr4gqyD3LeL8A9Xq9n4cos39p/a+pOfirQTuB sR+mrr1R890gvookmU2MqezZ7Bf9R/7md3Hc7TbqHM5ljWsRiHa9d7A2s3DCzUZ8erEX RKimZ0s/ELRLwoTDLwW1reKTE2AaRPMKHUq38NNmHNwJzR4Uh7ij9eMhxqyDKmJfNfwc BYdg== X-Gm-Message-State: ALoCoQnMSOKA5lWFAEmp41YkPXX4g7vOsipAK2soePmviEKyS87jIGrhGSQCI0bIOPvUie0J+ROl X-Received: by 10.152.21.233 with SMTP id y9mr3783807lae.5.1441555257001; Sun, 06 Sep 2015 09:00:57 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.242.163 with SMTP id wr3ls46563lac.105.gmail; Sun, 06 Sep 2015 09:00:56 -0700 (PDT) X-Received: by 10.152.121.70 with SMTP id li6mr13114469lab.98.1441555256656; Sun, 06 Sep 2015 09:00:56 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id e1si8105888lbs.96.2015.09.06.09.00.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2015 09:00:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lanb10 with SMTP id b10so38883911lan.3 for ; Sun, 06 Sep 2015 09:00:56 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr13068984lbb.36.1441555256502; Sun, 06 Sep 2015 09:00:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.181.71 with SMTP id du7csp116536lbc; Sun, 6 Sep 2015 09:00:55 -0700 (PDT) X-Received: by 10.67.30.232 with SMTP id kh8mr34975290pad.36.1441555255472; Sun, 06 Sep 2015 09:00:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sa6si15587861pbb.26.2015.09.06.09.00.54; Sun, 06 Sep 2015 09:00:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752432AbbIFQAw (ORCPT + 28 others); Sun, 6 Sep 2015 12:00:52 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:36403 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbbIFQAl (ORCPT ); Sun, 6 Sep 2015 12:00:41 -0400 Received: by wicgb1 with SMTP id gb1so22067841wic.1 for ; Sun, 06 Sep 2015 09:00:40 -0700 (PDT) X-Received: by 10.194.90.244 with SMTP id bz20mr6417738wjb.59.1441555240358; Sun, 06 Sep 2015 09:00:40 -0700 (PDT) Received: from hackbox.linaro.org ([81.128.185.36]) by smtp.gmail.com with ESMTPSA id wx9sm15411443wjb.6.2015.09.06.09.00.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Sep 2015 09:00:39 -0700 (PDT) From: Victor Chong To: gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Puck Chen , Victor Chong Subject: [PATCH RFC 0/0] drivers: android: binder crash issue Date: Sun, 6 Sep 2015 17:00:25 +0100 Message-Id: <1441555225-8631-1-git-send-email-victor.chong@linaro.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: victor.chong@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Puck Chen We find that the binder aborts when doing some asynchronous transferring, e.g. when a phone call comes in. If there are asynchronous requests in binder system, and new requests coming, the asynchronous requests may insert into the new requests queue. In this scene, the asynchronous request will affect the corresponding order of the new requests. So we think that the asynchronous requests should be added to proc struct instead of thread’s todo list. Please let me know, if some things wrong in my opinion. Signed-off-by: Victor Chong --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 6607f3c..db4a0b5 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -1922,7 +1922,7 @@ static int binder_thread_write(struct binder_proc *proc, if (list_empty(&buffer->target_node->async_todo)) buffer->target_node->has_async_transaction = 0; else - list_move_tail(buffer->target_node->async_todo.next, &thread->todo); + list_move_tail(buffer->target_node->async_todo.next, &proc->todo); } trace_binder_transaction_buffer_release(buffer); binder_transaction_buffer_release(proc, buffer, NULL);