Re: [PATCH] sched/cpupri: fix the task priority BUG_ON checks

2021-04-06 Thread Dietmar Eggemann
On 26/03/2021 04:15, Zeng Tao wrote: > The BUG_ON checks are intended to check if the task priotity is valid, > but in the function convert_prio, if the task priority is not valid, it > will be converted to an uninitialized stack variable. Fix it by moving > the BUG_ON checks to the default branch

[PATCH] sched/cpupri: fix the task priority BUG_ON checks

2021-03-25 Thread Zeng Tao
The BUG_ON checks are intended to check if the task priotity is valid, but in the function convert_prio, if the task priority is not valid, it will be converted to an uninitialized stack variable. Fix it by moving the BUG_ON checks to the default branch of convert_prio. Fixes: 934fc3314b39