lkml.org 
[lkml]   [2021]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched/deadline: fix BUG_ON() ENQUEUE_REPLENISH check
Date
From: Tom Rix <trix@redhat.com>

When the BUG_ON check for (flags != ENQUEUE_REPLENISH) was created, the
flag was set to ENQUEUE_REPLENISH in rt_mutex_setprio(), now it is or-ed
in. So the checking logic needs to change.

Fixes: 1de64443d755 ("sched/core: Fix task and run queue sched_info::run_delay inconsistencies")
Signed-off-by: Tom Rix <trix@redhat.com>
---
kernel/sched/deadline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 1508d126e88b..f50d20b7fe7c 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1561,7 +1561,7 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags)
* the throttle.
*/
p->dl.dl_throttled = 0;
- BUG_ON(!is_dl_boosted(&p->dl) || flags != ENQUEUE_REPLENISH);
+ BUG_ON(!is_dl_boosted(&p->dl) || !(flags & ENQUEUE_REPLENISH));
return;
}

--
2.27.0
\
 
 \ /
  Last update: 2021-02-06 21:52    [W:0.044 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site