From: Arve Hjønnevåg Date: Mon, 17 Feb 2014 21:58:29 +0000 (-0800) Subject: staging: binder: Fix death notifications X-Git-Tag: v3.10.33~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3a59abff46afb06daadec59c80d07dd0b1053cf;p=platform%2Fkernel%2Flinux-stable.git staging: binder: Fix death notifications commit e194fd8a5d8e0a7eeed239a8534460724b62fe2d upstream. 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: Colin Cross Cc: Android Kernel Team Signed-off-by: Arve Hjønnevåg Signed-off-by: John Stultz Signed-off-by: Jeremy Compostella Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index 1567ac2..0fce5fc 100644 --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c @@ -2902,7 +2902,7 @@ static int binder_node_release(struct binder_node *node, int refs) refs++; if (!ref->death) - goto out; + continue; death++; @@ -2915,7 +2915,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);