linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/core: Remove BUG_ON()
@ 2019-02-14  6:42 Huang Zijiang
  2019-02-14 10:19 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Huang Zijiang @ 2019-02-14  6:42 UTC (permalink / raw)
  To: mingo; +Cc: peterz, linux-kernel, wang.yi59, Huang Zijiang

pick_next_task is never return NULL because idle task
will return when cpu is idle.

Signed-off-by: Huang Zijiang <huang.zijiang@zte.com.cn>
---
 kernel/sched/core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index dbe9a3f..1de1a85 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5624,7 +5624,6 @@ static void migrate_tasks(struct rq *dead_rq, struct rq_flags *rf)
  * 		 * pick_next_task() assumes pinned rq->lock:
  * 		 		 */
 		next = pick_next_task(rq, &fake_task, rf);
-		BUG_ON(!next);
 		put_prev_task(rq, next);
 
 		/*
-- 
1.8.3.1


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

* Re: [PATCH] sched/core: Remove BUG_ON()
  2019-02-14  6:42 [PATCH] sched/core: Remove BUG_ON() Huang Zijiang
@ 2019-02-14 10:19 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2019-02-14 10:19 UTC (permalink / raw)
  To: Huang Zijiang; +Cc: mingo, linux-kernel, wang.yi59

On Thu, Feb 14, 2019 at 02:42:37PM +0800, Huang Zijiang wrote:
> pick_next_task is never return NULL because idle task
> will return when cpu is idle.

And to be sure it does; we have that BUG_ON :-)

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

end of thread, other threads:[~2019-02-14 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14  6:42 [PATCH] sched/core: Remove BUG_ON() Huang Zijiang
2019-02-14 10:19 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).