ANDROID: binder: fix node sched policy calculation
authorGanesh Mahendran <opensource.ganesh@gmail.com>
Tue, 26 Sep 2017 09:56:25 +0000 (17:56 +0800)
committerDanny Wood <danwood76@gmail.com>
Tue, 8 Oct 2019 13:56:55 +0000 (14:56 +0100)
We should use FLAT_BINDER_FLAG_SCHED_POLICY_MASK as
the mask to calculate sched policy.

Change-Id: Ic252fd7c68495830690130d792802c02f99fc8fc
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
drivers/android/binder.c

index d52494a1742ece69fb6932f0cdf918e50ad04f4c..796b4297ddde438240c3dc9c8b66db54873c51b3 100644 (file)
@@ -1310,7 +1310,7 @@ static struct binder_node *binder_init_node_ilocked(
        node->cookie = cookie;
        node->work.type = BINDER_WORK_NODE;
        priority = flags & FLAT_BINDER_FLAG_PRIORITY_MASK;
-       node->sched_policy = (flags & FLAT_BINDER_FLAG_PRIORITY_MASK) >>
+       node->sched_policy = (flags & FLAT_BINDER_FLAG_SCHED_POLICY_MASK) >>
                FLAT_BINDER_FLAG_SCHED_POLICY_SHIFT;
        node->min_priority = to_kernel_prio(node->sched_policy, priority);
        node->accept_fds = !!(flags & FLAT_BINDER_FLAG_ACCEPTS_FDS);