diff options
| author | Ganesh Mahendran <opensource.ganesh@gmail.com> | 2017-09-27 15:12:25 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-09-28 21:41:08 +0200 |
| commit | 77b89a02f332ca44498e8c292b62f5a6d0faa06e (patch) | |
| tree | 56465cc61373591a1226abb3beb3c69e73f77133 /drivers/android/binder.c | |
| parent | ecfc7f7c6620cbf468a97503cf6cdfb0e1ada476 (diff) | |
ANDROID: binder: init desired_prio.sched_policy before use it
In function binder_transaction_priority(), we access
desired_prio before initialzing it.
This patch fix this.
Change-Id: I9d14d50f9a128010476a65b52631630899a44633
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
Diffstat (limited to 'drivers/android/binder.c')
| -rw-r--r-- | drivers/android/binder.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index bd3e83b19..cb9505fb1 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -1188,7 +1188,7 @@ static void binder_transaction_priority(struct task_struct *task, bool inherit_rt) { bool inherit_fifo = t->buffer->target_node->proc->context->inherit_fifo_prio; - struct binder_priority desired_prio; + struct binder_priority desired_prio = t->priority; if (t->set_priority_called) return; @@ -1200,9 +1200,6 @@ static void binder_transaction_priority(struct task_struct *task, if (!inherit_rt && is_rt_policy(desired_prio.sched_policy) && !inherit_fifo) { desired_prio.prio = NICE_TO_PRIO(0); desired_prio.sched_policy = SCHED_NORMAL; - } else { - desired_prio.prio = t->priority.prio; - desired_prio.sched_policy = t->priority.sched_policy; } if (node_prio.prio < t->priority.prio || |
