block, bfq: use pointer entity->sched_data only if set
In the function __bfq_deactivate_entity, the pointer entity->sched_data could happen to be used before being properly initialized. This led to a NULL pointer dereference. This commit fixes this bug by just using this pointer only where it is safe to do so. Reported-by: NTom Harrison <l12436.tw@gmail.com> Tested-by: NTom Harrison <l12436.tw@gmail.com> Signed-off-by: NPaolo Valente <paolo.valente@linaro.org> Signed-off-by: NJens Axboe <axboe@fb.com>
Showing
想要评论请 注册 或 登录