提交 b340c733 编写于 作者: X Xie XiuQi

sched: fix unsigned check error

hulk inclusion
category: bugfix
bugzilla: 4586
CVE: NA

period is unsigned int, so this check is error, so this check
is useless. Fix it.
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 677bae68
...@@ -2018,7 +2018,7 @@ static u64 numa_get_avg_runtime(struct task_struct *p, u64 *period) ...@@ -2018,7 +2018,7 @@ static u64 numa_get_avg_runtime(struct task_struct *p, u64 *period)
*period = now - p->last_task_numa_placement; *period = now - p->last_task_numa_placement;
/* Avoid backward, and prevent potential divide error */ /* Avoid backward, and prevent potential divide error */
if (*period < 0) if ((s64)*period < 0)
*period = 0; *period = 0;
} else { } else {
delta = p->se.avg.load_sum; delta = p->se.avg.load_sum;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册