From patchwork Mon Feb 17 21:58:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 24793 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F079F20143 for ; Mon, 17 Feb 2014 21:58:54 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id x10sf35439517pdj.8 for ; Mon, 17 Feb 2014 13:58:54 -0800 (PST) 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 :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=yRw4e41Psv8XEOduyIcSzrWba5BEUWVGPdGqFUQFoRg=; b=PPFNa9A7Yif4ZKdiee+E5Aav5GiugkRkvvGkU6ImgRwULEqfNqg3D32RmTj3GqJDap iMkpQGuH6N6FGSKRhua61Vjppob8J5wnDA+zFBEUARTTctFy2yjs09y65m1Q4vImZVfj DfVsqdX/6Z3THg9lGU9OpBx8wobJfzSUrPv09G2V2RKpGY4H5BG8E3i1tA+Z5Qcicupx s95YXbGx8M/FvASNYynXDALmSN8kyAErYl+MvphVtusMc4jNq0lNwBzk2FxThOe8VAOY 3oEeQxOLlF4PsDJjlHdxsxFoRjAkkzLA/drMCSnTqFXFCoP/OxJNFMg3O48YRVr+xXew PGjw== X-Gm-Message-State: ALoCoQkTPgKOPuqchoCgC7QiK2uv8q55qNKcDUzWVd1AVPtPG5XrFFv0tveMPwHw+dAwUNeDs58x X-Received: by 10.66.145.105 with SMTP id st9mr4632636pab.23.1392674334222; Mon, 17 Feb 2014 13:58:54 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.139 with SMTP id 11ls1140814qgn.84.gmail; Mon, 17 Feb 2014 13:58:54 -0800 (PST) X-Received: by 10.220.99.72 with SMTP id t8mr18726739vcn.10.1392674334038; Mon, 17 Feb 2014 13:58:54 -0800 (PST) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id si7si4825923vdc.24.2014.02.17.13.58.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Feb 2014 13:58:54 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id lf12so12503112vcb.3 for ; Mon, 17 Feb 2014 13:58:54 -0800 (PST) X-Received: by 10.52.185.196 with SMTP id fe4mr12137489vdc.27.1392674333953; Mon, 17 Feb 2014 13:58:53 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp169512vcz; Mon, 17 Feb 2014 13:58:53 -0800 (PST) X-Received: by 10.66.148.230 with SMTP id tv6mr5918389pab.155.1392674332849; Mon, 17 Feb 2014 13:58:52 -0800 (PST) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by mx.google.com with ESMTPS id ay1si16065750pbd.276.2014.02.17.13.58.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Feb 2014 13:58:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.177 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.192.177; Received: by mail-pd0-f177.google.com with SMTP id x10so15286328pdj.22 for ; Mon, 17 Feb 2014 13:58:52 -0800 (PST) X-Received: by 10.68.93.161 with SMTP id cv1mr29283762pbb.122.1392674332403; Mon, 17 Feb 2014 13:58:52 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id x5sm49045254pbw.26.2014.02.17.13.58.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Feb 2014 13:58:51 -0800 (PST) From: John Stultz To: LKML Cc: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Greg KH , Colin Cross , Android Kernel Team , John Stultz Subject: [PATCH 01/14] staging: binder: Fix death notifications Date: Mon, 17 Feb 2014 13:58:29 -0800 Message-Id: <1392674322-9036-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392674322-9036-1-git-send-email-john.stultz@linaro.org> References: <1392674322-9036-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Arve Hjønnevåg The change (008fa749e0fe5b2fffd20b7fe4891bb80d072c6a) that moved the node release code to a separate function broke death notifications in some cases. When it encountered a reference without a death notification request, it would skip looking at the remaining references, and therefore fail to send death notifications for them. Cc: Greg KH Cc: Colin Cross Cc: Arve Hjønnevåg Cc: Android Kernel Team Signed-off-by: Arve Hjønnevåg Signed-off-by: John Stultz --- drivers/staging/android/binder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index eaec1da..1432d95 100644 --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c @@ -2904,7 +2904,7 @@ static int binder_node_release(struct binder_node *node, int refs) refs++; if (!ref->death) - goto out; + continue; death++; @@ -2917,7 +2917,6 @@ static int binder_node_release(struct binder_node *node, int refs) BUG(); } -out: binder_debug(BINDER_DEBUG_DEAD_BINDER, "node %d now dead, refs %d, death %d\n", node->debug_id, refs, death);