From: Jason Yan <yanaijie@huawei.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
<linux-ide@vger.kernel.org>, <tj@kernel.org>, <axboe@kernel.dk>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ata: fix a race condition when internal cmd time out
Date: Sat, 16 Feb 2019 16:43:49 +0800 [thread overview]
Message-ID: <98d269d2-da80-fdd4-13c3-84e2868c05d3@huawei.com> (raw)
In-Reply-To: <63bc665b-4f5f-0845-9767-825925ead80a@cogentembedded.com>
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
>
>
prev parent reply other threads:[~2019-02-16 8:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-16 3:42 Jason Yan
2019-02-16 7:45 ` Sergei Shtylyov
2019-02-16 8:43 ` Jason Yan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98d269d2-da80-fdd4-13c3-84e2868c05d3@huawei.com \
--to=yanaijie@huawei.com \
--cc=axboe@kernel.dk \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®