qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>, shaju.abraham@nutanix.com
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] Fix Guest VM crash due to iSCSI Sense Key error
Date: Fri, 12 Jul 2019 12:44:54 -0400	[thread overview]
Message-ID: <ead0d49b-dcc0-9ace-870e-f7bd23819434@redhat.com> (raw)
In-Reply-To: <20190711122436.GH13422@stefanha-x1.localdomain>



On 7/11/19 8:24 AM, Stefan Hajnoczi wrote:
> On Sun, Jul 07, 2019 at 07:55:03PM -0700, shaju.abraham@nutanix.com wrote:
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> CCing John Snow, IDE maintainer.
> 
> You can use scripts/get_maintainer.pl -f hw/ide/core.c to find out who
> to send patches to.
> 
> Stefan
> 

ACK, I'll investigate this for the next rc.

--js

>> From: Shaju Abraham <shaju.abraham@nutanix.com>
>>
>> During the  IDE DMA transfer for a ISCSI target,when libiscsi encounters
>> a SENSE KEY error, it sets the task->sense to  the value "COMMAND ABORTED".
>> The function iscsi_translate_sense() later translaters this error to -ECANCELED
>> and this value is passed to the callback function. In the case of  IDE DMA read
>> or write, the callback function returns immediately if the value of the ret
>> argument is -ECANCELED.
>> Later when ide_cancel_dma_sync() function is invoked  the assertion
>> "s->bus->dma->aiocb == ((void *)0)" fails and the qemu process gets terminated.
>> Fix the issue by making the value of s->bus->dma->aiocb = NULL when
>> -ECANCELED is passed to the callback.
>>
>> Signed-off-by: Shaju Abraham <shaju.abraham@nutanix.com>
>> ---
>>  hw/ide/core.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/ide/core.c b/hw/ide/core.c
>> index 6afadf8..78ea357 100644
>> --- a/hw/ide/core.c
>> +++ b/hw/ide/core.c
>> @@ -841,6 +841,7 @@ static void ide_dma_cb(void *opaque, int ret)
>>      bool stay_active = false;
>>  
>>      if (ret == -ECANCELED) {
>> +        s->bus->dma->aiocb = NULL;
>>          return;
>>      }
>>  
>> -- 
>> 1.9.4
>>
>>

-- 
—js


  reply	other threads:[~2019-07-12 16:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08  2:55 [Qemu-devel] [PATCH] Fix Guest VM crash due to iSCSI Sense Key error shaju.abraham
2019-07-11 12:24 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2019-07-12 16:44   ` John Snow [this message]
2019-07-26  0:58 ` [Qemu-devel] " John Snow
2019-07-26 20:18   ` John Snow
2019-07-29 10:09     ` Stefan Hajnoczi
2019-07-29 19:45       ` John Snow
2019-07-29 21:32         ` Paolo Bonzini
2019-07-29 21:37           ` John Snow
2019-07-29 21:49             ` Paolo Bonzini
2019-08-13 22:51 ` John Snow
2019-08-14  2:30   ` Shaju Abraham

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=ead0d49b-dcc0-9ace-870e-f7bd23819434@redhat.com \
    --to=jsnow@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shaju.abraham@nutanix.com \
    --cc=stefanha@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).