lkml.org 
[lkml]   [2019]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ata: fix a race condition when internal cmd time out
From
Date
Hi, Sergei

Thanks for the review.

On 2019/2/16 15:45, Sergei Shtylyov wrote:
> Hello!
>
> On 16.02.2019 6:42, Jason Yan wrote:
>
>> For internal cmds, we will unmap DMA memory associated with the cmd
>> before we abort the cmd. If DMA transfering data before the aborting,
>
>    Transferring.
>
>> bus error will occured.
>
>    Occur.
>
>> ata_exec_internal_sg
>>    ->ata_port_freeze if timeout
>>      ->ata_qc_complete
>>        ->ata_sg_clean
>>                                        dma transfering data = bus error
>>    ->ap->ops->post_internal_cmd
>>      ->sas_ata_post_internal
>>        ->sas_ata_internal_abort
>>          ->abort the cmd
>>
>> Fix this by move post_internal_cmd() before unmapping the DMA memory
>
>    Moving.
>
>> when time out. Notice that we have to set ATA_QCFLAG_FAILED flag before
>> calling post_internal_cmd() so that the aborting will work.
>>
>> Reported-by: luojian <luojian5@huawei.com>
>> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> [...]
>
> MBR, Sergei
>
>

\
 
 \ /
  Last update: 2019-02-16 09:45    [W:0.042 / U:0.304 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site