From: Paolo Bonzini <pbonzini@redhat.com>
To: Zhi Yong Wu <zwu.kernel@gmail.com>
Cc: mst@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 2/4] virtio-scsi: Add basic request processing infrastructure
Date: Wed, 16 Nov 2011 09:29:19 +0100 [thread overview]
Message-ID: <4EC3745F.2030309@redhat.com> (raw)
In-Reply-To: <CAEH94Lh2PnK0g1b8uGD8aHCcuKHcBEkXdG+VDmzvBckNKnXm7Q@mail.gmail.com>
On 11/16/2011 09:28 AM, Zhi Yong Wu wrote:
>> > +static void virtio_scsi_complete_req(VirtIOSCSIReq *req)
>> > +{
>> > + VirtQueue *vq = req->vq;
>> > + virtqueue_push(vq,&req->elem, req->qsgl.size + req->elem.in_sg[0].iov_len);
>> > + qemu_sglist_destroy(&req->qsgl);
>> > + if (req->sreq) {
>> > + req->sreq->hba_private = NULL;
>> > + scsi_req_unref(req->sreq);
>> > + }
>> > + g_free(req);
>> > + virtio_notify(&req->dev->vdev, vq);
> req is used-after-free?
Yes, thanks for spotting it.
Paolo
next prev parent reply other threads:[~2011-11-16 8:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-15 17:00 [Qemu-devel] [RFC PATCH 0/4] virtio-scsi device model Paolo Bonzini
2011-11-15 17:00 ` [Qemu-devel] [PATCH 1/4] virtio-scsi: Add virtio-scsi stub device Paolo Bonzini
2011-11-15 17:00 ` [Qemu-devel] [PATCH 2/4] virtio-scsi: Add basic request processing infrastructure Paolo Bonzini
2011-11-16 8:28 ` Zhi Yong Wu
2011-11-16 8:29 ` Paolo Bonzini [this message]
2011-11-15 17:00 ` [Qemu-devel] [PATCH 3/4] virtio-scsi: add basic SCSI bus operation Paolo Bonzini
2011-11-15 17:00 ` [Qemu-devel] [PATCH 4/4] virtio-scsi: process control queue requests Paolo Bonzini
2011-11-15 20:33 ` [Qemu-devel] [RFC PATCH 0/4] virtio-scsi device model Michael S. Tsirkin
2011-11-16 7:51 ` Paolo Bonzini
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=4EC3745F.2030309@redhat.com \
--to=pbonzini@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
--cc=zwu.kernel@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 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.