All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] usb-storage: fix SYNCHRONIZE_CACHE
Date: Fri, 10 Aug 2012 15:13:29 +0400	[thread overview]
Message-ID: <5024ECD9.6020400@msgid.tls.msk.ru> (raw)
In-Reply-To: <1344329980-25015-3-git-send-email-kraxel@redhat.com>

On 07.08.2012 12:59, Gerd Hoffmann wrote:
> Commit 59310659073d85745854f2f10c4292555c5a1c51 is incomplete,
> we'll arrive in the scsi command complete callback in CSW state
> and must handle that case correctly.

It appears to be 1.1-stable material, rigt?
What's the outcome of the issue -- guest-triggerable qemu crashing?

Thanks,

/mjt

> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/usb/dev-storage.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
> index 976fe1a..ff48d91 100644
> --- a/hw/usb/dev-storage.c
> +++ b/hw/usb/dev-storage.c
> @@ -247,6 +247,9 @@ static void usb_msd_command_complete(SCSIRequest *req, uint32_t status, size_t r
>                 the status read packet.  */
>              usb_msd_send_status(s, p);
>              s->mode = USB_MSDM_CBW;
> +        } else if (s->mode == USB_MSDM_CSW) {
> +            usb_msd_send_status(s, p);
> +            s->mode = USB_MSDM_CBW;
>          } else {
>              if (s->data_len) {
>                  int len = (p->iov.size - p->result);

  reply	other threads:[~2012-08-10 11:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07  8:59 [Qemu-devel] [PULL 0/2] usb patch queue Gerd Hoffmann
2012-08-07  8:59 ` [Qemu-devel] [PATCH 1/2] usb-storage: improve debug logging Gerd Hoffmann
2012-08-07  8:59 ` [Qemu-devel] [PATCH 2/2] usb-storage: fix SYNCHRONIZE_CACHE Gerd Hoffmann
2012-08-10 11:13   ` Michael Tokarev [this message]
2012-08-07 15:36 ` [Qemu-devel] [PULL 0/2] usb patch queue Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2012-07-13  9:44 [Qemu-devel] [PATCH 1/2] usb-storage: improve debug logging Gerd Hoffmann
2012-07-13  9:44 ` [Qemu-devel] [PATCH 2/2] usb-storage: fix SYNCHRONIZE_CACHE Gerd Hoffmann

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=5024ECD9.6020400@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.