From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: virtualization@lists.linux-foundation.org,
Rusty Russell <rusty@rustcorp.com.au>,
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>,
Carsten Otte <carsteno@de.ibm.com>,
borntraeger@de.ibm.com, linux-s390@vger.kernel.org,
KVM list <kvm@vger.kernel.org>
Subject: Re: [PATCH 2/3] S390: Add virtio hotplug add support
Date: Wed, 25 Aug 2010 10:16:30 +0200 [thread overview]
Message-ID: <20100825081630.GE2153@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <1282657732-20902-2-git-send-email-agraf@suse.de>
On Tue, Aug 24, 2010 at 03:48:51PM +0200, Alexander Graf wrote:
> +static void hotplug_devices(struct work_struct *dummy)
> +{
> + unsigned int i;
> + struct kvm_device_desc *d;
> + struct device *dev;
> +
> + for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {
This should be
for (i = 0; i + desc_size(d) <= PAGE_SIZE; i += desc_size(d)) {
otherwise you might have memory accesses beyond the device page...
> + d = kvm_devices + i;
> +
> + /* end of list */
> + if (d->type == 0)
> + break;
...even if that should not happen if everything works.
But let's be paranoid.
next prev parent reply other threads:[~2010-08-25 8:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-24 13:48 [PATCH 1/3] S390: take a full byte as ext_param indicator Alexander Graf
2010-08-24 13:48 ` [PATCH 2/3] S390: Add virtio hotplug add support Alexander Graf
2010-08-25 8:16 ` Heiko Carstens [this message]
2010-08-25 8:20 ` Alexander Graf
2010-08-25 8:35 ` Heiko Carstens
2010-08-25 8:34 ` Alexander Graf
2010-08-25 8:48 ` Heiko Carstens
2010-08-25 8:52 ` Alexander Graf
2010-09-12 0:42 ` Alexander Graf
2010-09-12 9:00 ` Avi Kivity
2010-09-13 3:35 ` Rusty Russell
2010-09-13 7:41 ` Martin Schwidefsky
2010-09-13 9:41 ` Avi Kivity
2010-08-24 13:48 ` [PATCH 3/3] S390: Export kvm_virtio.h Alexander Graf
2010-08-25 21:20 ` [PATCH 1/3] S390: take a full byte as ext_param indicator Marcelo Tosatti
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=20100825081630.GE2153@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=carsteno@de.ibm.com \
--cc=ehrhardt@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox