All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
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:34:29 +0200	[thread overview]
Message-ID: <8A4DFC49-AAB9-4426-8124-583E448B6C98@suse.de> (raw)
In-Reply-To: <20100825083525.GF2153@osiris.boeblingen.de.ibm.com>


On 25.08.2010, at 10:35, Heiko Carstens wrote:

> On Wed, Aug 25, 2010 at 10:20:03AM +0200, Alexander Graf wrote:
>> On 25.08.2010, at 10:16, Heiko Carstens wrote:
>>> 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...
>> 
>> Oh, this is a simple copy&paste from the original search method.
>> Is d valid in the first part of the loop already?
> 
> No, you would need to initialize it with kvm_devices if you change
> the loop.

But even then it would take the size of the current entry, not the next one we're actually looking for, no? Maybe it'd be easier to just convert this into a while loop and explicitly open code everything.

Alex

  parent reply	other threads:[~2010-08-25  8:34 UTC|newest]

Thread overview: 27+ 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
2010-08-25  8:20     ` Alexander Graf
2010-08-25  8:20     ` Alexander Graf
2010-08-25  8:35       ` Heiko Carstens
2010-08-25  8:35       ` Heiko Carstens
2010-08-25  8:34         ` Alexander Graf
2010-08-25  8:34         ` Alexander Graf [this message]
2010-08-25  8:48           ` Heiko Carstens
2010-08-25  8:48           ` Heiko Carstens
2010-08-25  8:52             ` Alexander Graf
2010-08-25  8:52             ` Alexander Graf
2010-08-25  8:16   ` Heiko Carstens
2010-09-12  0:42   ` 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  7:41         ` Martin Schwidefsky
2010-09-13  9:41           ` Avi Kivity
2010-09-13  9:41           ` Avi Kivity
2010-09-13  3:35       ` Rusty Russell
2010-09-12  9:00     ` 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
2010-08-25 21:20 ` 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=8A4DFC49-AAB9-4426-8124-583E448B6C98@suse.de \
    --to=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=carsteno@de.ibm.com \
    --cc=ehrhardt@linux.vnet.ibm.com \
    --cc=heiko.carstens@de.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 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.