Staging: android: binder: Fix death notifications
authorArve Hjønnevåg <arve@android.com>
Sat, 8 Feb 2014 01:46:21 +0000 (17:46 -0800)
committerArve Hjønnevåg <arve@android.com>
Fri, 14 Feb 2014 04:29:04 +0000 (20:29 -0800)
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.

Change-Id: I12083a50709ccc30ba11a5f4d9eeb5f0ff4471c6
Signed-off-by: Arve Hjønnevåg <arve@android.com>
drivers/staging/android/binder.c

index a1931c0262303c5115fb50cb6c52eba313b336f5..6aec8509d7b0560debaa2adb5dab29a5dda5f0b3 100644 (file)
@@ -2941,7 +2941,7 @@ static int binder_node_release(struct binder_node *node, int refs)
                refs++;
 
                if (!ref->death)
-                       goto out;
+                       continue;
 
                death++;
 
@@ -2954,7 +2954,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);