From: Kevin Wolf <kwolf@redhat.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Gerd Hoffmann <kraxel@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
linux-iscsi-target-dev@googlegroups.com,
Hannes Reinecke <hare@suse.de>
Subject: Re: [Qemu-devel] Re: [PATCH] scsi-generic: bugfixes for 'SCSIRequest' conversion
Date: Thu, 13 Jan 2011 15:59:13 +0100 [thread overview]
Message-ID: <4D2F1341.7000403@redhat.com> (raw)
In-Reply-To: <1293141514.4649.144.camel@haakon2.linux-iscsi.org>
Am 23.12.2010 22:58, schrieb Nicholas A. Bellinger:
> On Tue, 2010-12-21 at 12:49 +1100, Benjamin Herrenschmidt wrote:
>>> Yep, so it appears that commit 89c0f6438d16 did introduce the bogus
>>> 'double complete' in scsi_read_complete, which I think was intended to
>>> handle residual counts for TYPE_TYPE...
>>>
>>> /* Cancel a pending data transfer. */
>>> @@ -251,6 +257,8 @@ static void scsi_read_complete(void * opaque, int ret)
>>>
>>> r->len = -1;
>>> s->completion(s->opaque, SCSI_REASON_DATA, r->tag, len);
>>> + if (len == 0)
>>> + scsi_command_complete(r, 0);
>>> }
>>>
>>> I am currently under the assumption for this and bsg_read_complete that
>>> s->completion(..., len) is handling the residual count back to block.
>>>
>>> Is this correct..?
>>
>> So I just debugged a crash where loading my vscsi driver kills qemu
>> (segfault) after trying to complete a command twice with scsi-generic.
>>
>> Removing the above hunk fixes it. So this is a genuine fix that should
>> be applied (asap even :-)
>>
>
> Hi Ben,
>
> Thanks for verifying this one. Kevin, please make sure this original
> patch to drop the bogus double complete gets picked up.
Wasn't the original patch NACKed by Hannes in parts? Can you re-post a
patch that includes only this specific fix?
Kevin
prev parent reply other threads:[~2011-01-13 14:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-24 8:18 [Qemu-devel] [PATCH] scsi-generic: bugfixes for 'SCSIRequest' conversion Nicholas A. Bellinger
2010-11-24 8:57 ` [Qemu-devel] " Hannes Reinecke
2010-11-24 8:57 ` Nicholas A. Bellinger
2010-11-24 9:04 ` Kevin Wolf
2010-11-24 10:16 ` Hannes Reinecke
2010-11-24 10:34 ` Kevin Wolf
2010-11-24 10:46 ` Hannes Reinecke
2010-11-25 8:46 ` Benjamin Herrenschmidt
2010-11-25 8:50 ` Gerd Hoffmann
2010-11-25 9:01 ` Benjamin Herrenschmidt
2010-11-25 9:06 ` Hannes Reinecke
2010-11-25 9:07 ` Benjamin Herrenschmidt
2010-11-25 9:25 ` Gerd Hoffmann
2010-12-16 1:58 ` Benjamin Herrenschmidt
2010-11-24 10:53 ` Nicholas A. Bellinger
2010-12-21 1:49 ` Benjamin Herrenschmidt
2010-12-23 21:58 ` Nicholas A. Bellinger
2011-01-13 14:59 ` Kevin Wolf [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=4D2F1341.7000403@redhat.com \
--to=kwolf@redhat.com \
--cc=hare@suse.de \
--cc=kraxel@redhat.com \
--cc=linux-iscsi-target-dev@googlegroups.com \
--cc=nab@linux-iscsi.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--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).