Skip to content

Commit b8b0268

Browse files
yzkqfllpundiramit
authored andcommitted
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>
1 parent b9a1a57 commit b8b0268

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/android/binder.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ static void binder_transaction_priority(struct task_struct *task,
11891189
struct binder_priority node_prio,
11901190
bool inherit_rt)
11911191
{
1192-
struct binder_priority desired_prio;
1192+
struct binder_priority desired_prio = t->priority;
11931193

11941194
if (t->set_priority_called)
11951195
return;
@@ -1201,9 +1201,6 @@ static void binder_transaction_priority(struct task_struct *task,
12011201
if (!inherit_rt && is_rt_policy(desired_prio.sched_policy)) {
12021202
desired_prio.prio = NICE_TO_PRIO(0);
12031203
desired_prio.sched_policy = SCHED_NORMAL;
1204-
} else {
1205-
desired_prio.prio = t->priority.prio;
1206-
desired_prio.sched_policy = t->priority.sched_policy;
12071204
}
12081205

12091206
if (node_prio.prio < t->priority.prio ||

0 commit comments

Comments
 (0)