commit 5f5221252624a2e1c37edaf30b60c6f96086cb2f Author: Corcodel Marian Date: Wed Jul 6 10:55:30 2016 +0300 Check for NULL pointer on update_cfs_shares. This run embedded as run oneline. diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6dd76e0..157468f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2509,16 +2509,20 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, static inline int throttled_hierarchy(struct cfs_rq *cfs_rq); -static void update_cfs_shares(struct cfs_rq *cfs_rq) +static inline void update_cfs_shares(struct cfs_rq *cfs_rq) { struct task_group *tg; struct sched_entity *se; long shares; tg = cfs_rq->tg; - se = tg->se[cpu_of(rq_of(cfs_rq))]; - if (!se || throttled_hierarchy(cfs_rq)) + if (!tg->se[cpu_of(rq_of(cfs_rq))] || + throttled_hierarchy(cfs_rq)) { + tg = NULL; return; + } + + se = tg->se[cpu_of(rq_of(cfs_rq))]; #ifndef CONFIG_SMP if (likely(se->load.weight == tg->shares)) return;