ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #03620
[PATCH][SAUCY][GROUPER] binder: search for receiving context pid in global namespace
If binder cannot find the receiving task in the sender's namespace it
will default to a null PID which thus breaks communication in our
container-based scenario. This patch extends binder to first look in the
senders namespace and if unsuccesfull search in the global namespace.
Signed-off-by: Ricardo Mendoza <ricardo.mendoza@xxxxxxxxxxxxx>
---
drivers/staging/android/binder.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index e13b4c4..3b35a23 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -2427,6 +2427,8 @@ retry:
struct task_struct *sender = t->from->proc->tsk;
tr.sender_pid = task_tgid_nr_ns(sender,
current->nsproxy->pid_ns);
+ if (tr.sender_pid == 0)
+ tr.sender_pid = task_tgid_nr(sender);
} else {
tr.sender_pid = 0;
}
--
1.8.3.2
Follow ups