]> git.baikalelectronics.ru Git - kernel.git/commit
block, bfq: use pointer entity->sched_data only if set
authorPaolo Valente <paolo.valente@linaro.org>
Tue, 9 May 2017 09:37:27 +0000 (11:37 +0200)
committerJens Axboe <axboe@fb.com>
Wed, 10 May 2017 13:39:43 +0000 (07:39 -0600)
commit854a6286d71b477aa6cf38853e5f3932a0b1f89a
tree52c407a83f2706d34e5ced556903bcb5939265dc
parent6ac855bb9f62b5cdc5867a65c58731a98585a3af
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: Tom Harrison <l12436.tw@gmail.com>
Tested-by: Tom Harrison <l12436.tw@gmail.com>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/bfq-wf2q.c