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 <[email protected]>
---
 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


-- 
Mailing list: https://launchpad.net/~ubuntu-phone
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-phone
More help   : https://help.launchpad.net/ListHelp

Reply via email to