On 09/18/2014 11:04 AM, David Hildenbrand wrote:
This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249.
We have to initialize at least the atomic_flags and the cmd_flags when
allocating storage for the requests.
Otherwise blk_mq_timeout_check() might dereference uninitialized pointers when
racing with the creation of a request.
Also move the reset of cmd_flags for the initializing code to the point where a
request is freed. So we will never end up with pending flush request indicators
that might trigger dereferences of invalid pointers in blk_mq_timeout_check().
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: David Hildenbrand <dahi@xxxxxxxxxxxxxxxxxx>
Acked-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
Can you please add
Reported-by: Paulo De Rezende Pinatti <ppinatti@xxxxxxxxxxxxxxxxxx>
Tested-by: Paulo De Rezende Pinatti <ppinatti@xxxxxxxxxxxxxxxxxx>
as Paulo did the testing work?
We thing this patch is fine and should go upstream.