mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/core: remove check of p->sched_class
@ 2014-12-29  6:41 Yao Dongdong
  2015-01-06 10:44 ` Peter Zijlstra
  2015-01-14 14:02 ` [tip:sched/core] sched/core: Remove " tip-bot for Yao Dongdong
  0 siblings, 2 replies; 3+ messages in thread
From: Yao Dongdong @ 2014-12-29  6:41 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, lizefan

Search all usage of p->sched_class in sched/core.c, no one check it
before use, so it seems that every task must belong to one sched_class.

Signed-off-by: Yao Dongdong <yaodongdong@huawei.com>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b5797b7..bdab49b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4740,7 +4740,7 @@ static struct rq *move_queued_task(struct task_struct *p, int new_cpu)
 
 void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
 {
-	if (p->sched_class && p->sched_class->set_cpus_allowed)
+	if (p->sched_class->set_cpus_allowed)
 		p->sched_class->set_cpus_allowed(p, new_mask);
 
 	cpumask_copy(&p->cpus_allowed, new_mask);
-- 
2.1.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-14 14:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-29  6:41 [PATCH] sched/core: remove check of p->sched_class Yao Dongdong
2015-01-06 10:44 ` Peter Zijlstra
2015-01-14 14:02 ` [tip:sched/core] sched/core: Remove " tip-bot for Yao Dongdong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®