From: Mark McLoughlin <markmc@redhat.com>
To: "Han, Weidong" <weidong.han@intel.com>
Cc: "'Avi Kivity'" <avi@redhat.com>,
"'kvm@vger.kernel.org'" <kvm@vger.kernel.org>
Subject: Re: [PATCH 4/4] [v2] kvm: qemu: Assign irq in init_assigned_device
Date: Wed, 10 Dec 2008 13:27:33 +0000 [thread overview]
Message-ID: <1228915653.5384.50.camel@blaa> (raw)
In-Reply-To: <715D42877B251141A38726ABF5CABF2C018BF9AD4A@pdsmsx503.ccr.corp.intel.com>
On Wed, 2008-12-10 at 21:23 +0800, Han, Weidong wrote:
> diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
> index 03a52e6..160f001 100644
> --- a/qemu/hw/device-assignment.c
> +++ b/qemu/hw/device-assignment.c
> @@ -499,40 +561,13 @@ void assigned_dev_update_irqs()
>
> adev = LIST_FIRST(&adev_head);
> while (adev) {
> - AssignedDevInfo *next = LIST_NEXT(adev, next);
...
> + r = assign_irq(adev);
> + if (r < 0)
> + free_assigned_device(adev);
...
> - adev = next;
> + adev = LIST_NEXT(adev, next);
> }
> }
You're introducing the "use after free" issue here again.
Cheers,
Mark.
prev parent reply other threads:[~2008-12-10 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-10 13:23 [PATCH 4/4] [v2] kvm: qemu: Assign irq in init_assigned_device Han, Weidong
2008-12-10 13:27 ` Mark McLoughlin [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=1228915653.5384.50.camel@blaa \
--to=markmc@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=weidong.han@intel.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.