[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/8] vl.c: Fix off-by-one bug when handling "-nu
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 2/8] vl.c: Fix off-by-one bug when handling "-numa node" argument |
Date: |
Wed, 16 Jan 2013 11:00:17 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 01/16/2013 08:24 AM, Eduardo Habkost wrote:
> The numa_add() code was unconditionally adding 1 to the get_opt_name()
> return value, making it point after the end of the string if no ','
> separator is present.
>
> Example of weird behavior caused by the bug:
>
> $ qemu-img create -f qcow2
> this-file-image-has,cpus=5,mem=1000,in-its-name.qcow2 5G
> Formatting 'this-file-image-has,cpus=5,mem=1000,in-its-name.qcow2',
> fmt=qcow2 size=5368709120 encryption=off cluster_size=65536
> $ ./x86_64-softmmu/qemu-system-x86_64 -S -monitor stdio -numa node
> 'this-file-image-has,cpus=5,mem=1000,in-its-name.qcow2'
> QEMU 1.3.50 monitor - type 'help' for more information
> (qemu) info numa
> 1 nodes
> node 0 cpus: 0
> node 0 size: 1000 MB
> (qemu)
>
> This changes the code to nove the pointer only if ',' is found.
s/nove/move/
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> vl.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH 2/8] vl.c: Fix off-by-one bug when handling "-numa node" argument, Eduardo Habkost, 2013/01/16
- Re: [Qemu-devel] [PATCH 2/8] vl.c: Fix off-by-one bug when handling "-numa node" argument,
Eric Blake <=
[Qemu-devel] [PATCH 7/8] vl.c: Extract -numa "cpus" parsing to separate function, Eduardo Habkost, 2013/01/16
[Qemu-devel] [PATCH 3/8] vl.c: Abort on unknown -numa option type, Eduardo Habkost, 2013/01/16
[Qemu-devel] [PATCH 8/8] vl.c: validate -numa "cpus" parameter properly, Eduardo Habkost, 2013/01/16
[Qemu-devel] [PATCH 1/8] cutils: unsigned int parsing functions, Eduardo Habkost, 2013/01/16