From: Cheng Jian cj.chengjian@huawei.com
hulk inclusion category: bugfix bugzilla: 38261 CVE: NA
---------------------------
If we disable CONFIG_SMP, try_steal will lose its definition, resulting in a compile error as follows.
kernel/sched/fair.c: In function ‘pick_next_task_fair’: kernel/sched/fair.c:7001:15: error: implicit declaration of function ‘try_steal’ [-Werror=implicit-function-declaration] new_tasks = try_steal(rq, rf); ^~~~~~~~~
We can use allnoconfig to reproduce this problem.
Signed-off-by: Cheng Jian cj.chengjian@huawei.com Reviewed-by: Bin Li huawei.libin@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- kernel/sched/fair.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 97e956012a60..7258a270ea15 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3901,6 +3901,7 @@ static inline int idle_balance(struct rq *rq, struct rq_flags *rf)
static inline void rq_idle_stamp_update(struct rq *rq) {} static inline void rq_idle_stamp_clear(struct rq *rq) {} +static inline int try_steal(struct rq *this_rq, struct rq_flags *rf) { return 0; } static inline void overload_clear(struct rq *rq) {} static inline void overload_set(struct rq *rq) {}