Merge remote-tracking branch into HEAD
* keystone/mirror-android12-5.10: FROMGIT: regmap-irq: Update interrupt clear register for proper reset UPSTREAM: iommu: Fix potential use-after-free during probe BACKPORT: sched/fair: Fix fault in reweight_entity Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com> Change-Id: Iac3289d4210c2ee0279872c83d1acb93023088a7
This commit is contained in:
@@ -880,8 +880,9 @@ int tg_nop(struct task_group *tg, void *data)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void set_load_weight(struct task_struct *p, bool update_load)
|
||||
static void set_load_weight(struct task_struct *p)
|
||||
{
|
||||
bool update_load = !(READ_ONCE(p->state) & TASK_NEW);
|
||||
int prio = p->static_prio - MAX_RT_PRIO;
|
||||
struct load_weight *load = &p->se.load;
|
||||
|
||||
@@ -3484,7 +3485,7 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)
|
||||
p->static_prio = NICE_TO_PRIO(0);
|
||||
|
||||
p->prio = p->normal_prio = p->static_prio;
|
||||
set_load_weight(p, false);
|
||||
set_load_weight(p);
|
||||
|
||||
/*
|
||||
* We don't need the reset flag anymore after the fork. It has
|
||||
@@ -5252,7 +5253,7 @@ void set_user_nice(struct task_struct *p, long nice)
|
||||
put_prev_task(rq, p);
|
||||
|
||||
p->static_prio = NICE_TO_PRIO(nice);
|
||||
set_load_weight(p, true);
|
||||
set_load_weight(p);
|
||||
old_prio = p->prio;
|
||||
p->prio = effective_prio(p);
|
||||
|
||||
@@ -5426,7 +5427,7 @@ static void __setscheduler_params(struct task_struct *p,
|
||||
*/
|
||||
p->rt_priority = attr->sched_priority;
|
||||
p->normal_prio = normal_prio(p);
|
||||
set_load_weight(p, true);
|
||||
set_load_weight(p);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7569,7 +7570,7 @@ void __init sched_init(void)
|
||||
atomic_set(&rq->nr_iowait, 0);
|
||||
}
|
||||
|
||||
set_load_weight(&init_task, false);
|
||||
set_load_weight(&init_task);
|
||||
|
||||
/*
|
||||
* The boot idle thread does lazy MMU switching as well:
|
||||
|
||||
Reference in New Issue
Block a user