Re: [PATCH BUGFIX] block, bfq: use pointer entity->sched_data only if set

From: Jens Axboe
Date: Tue May 09 2017 - 10:54:02 EST


On 05/09/2017 03:37 AM, Paolo Valente wrote:
> 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.

Added, thanks.

--
Jens Axboe