Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sched_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Borislav Petkov:
"Fix a NULL-ptr dereference when recalculating a sched entity's weight"

* tag 'sched_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/fair: Fix fault in reweight_entity

+6 -5
+6 -5
kernel/sched/core.c
··· 1214 1214 } 1215 1215 #endif 1216 1216 1217 - static void set_load_weight(struct task_struct *p, bool update_load) 1217 + static void set_load_weight(struct task_struct *p) 1218 1218 { 1219 + bool update_load = !(READ_ONCE(p->__state) & TASK_NEW); 1219 1220 int prio = p->static_prio - MAX_RT_PRIO; 1220 1221 struct load_weight *load = &p->se.load; 1221 1222 ··· 4407 4406 p->static_prio = NICE_TO_PRIO(0); 4408 4407 4409 4408 p->prio = p->normal_prio = p->static_prio; 4410 - set_load_weight(p, false); 4409 + set_load_weight(p); 4411 4410 4412 4411 /* 4413 4412 * We don't need the reset flag anymore after the fork. It has ··· 6922 6921 put_prev_task(rq, p); 6923 6922 6924 6923 p->static_prio = NICE_TO_PRIO(nice); 6925 - set_load_weight(p, true); 6924 + set_load_weight(p); 6926 6925 old_prio = p->prio; 6927 6926 p->prio = effective_prio(p); 6928 6927 ··· 7213 7212 */ 7214 7213 p->rt_priority = attr->sched_priority; 7215 7214 p->normal_prio = normal_prio(p); 7216 - set_load_weight(p, true); 7215 + set_load_weight(p); 7217 7216 } 7218 7217 7219 7218 /* ··· 9446 9445 #endif 9447 9446 } 9448 9447 9449 - set_load_weight(&init_task, false); 9448 + set_load_weight(&init_task); 9450 9449 9451 9450 /* 9452 9451 * The boot idle thread does lazy MMU switching as well: