[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 1/1] block/sheepdog: fix argument passed to q
From: |
Jeff Cody |
Subject: |
Re: [Qemu-devel] [PATCH v3 1/1] block/sheepdog: fix argument passed to qemu_strtoul() |
Date: |
Wed, 2 Mar 2016 11:36:09 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Mar 02, 2016 at 05:32:11PM +0100, Max Reitz wrote:
> On 02.03.2016 17:24, Jeff Cody wrote:
> > The function qemu_strtoul() reads 'unsigned long' sized data,
> > which is larger than uint32_t on 64-bit machines.
> >
> > Even though the snap_id field in the header is 32-bits, we must
> > accomodate the full size in qemu_strtoul().
> >
> > This patch also adds more meaningful error handling to the
> > qemu_strtoul() call, and subsequent results.
> >
> > Reported-by: Paolo Bonzini <address@hidden>
> > Signed-off-by: Jeff Cody <address@hidden>
> > ---
> > block/sheepdog.c | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
>
> Another problem with this function is that it doesn't always set errp on
> error. Actually, this patch introduces the first instance where it does.
>
> qemu-img will not print an error if errp is not set; it actually ignores
> bdrv_snapshot_delete_by_id_or_name()'s return value. So this is a real
> issue that should be fixed as well.
>
I'll (or perhaps one of the sheepdog maintainers?) will handle that in
subsequent patch(es).
- [Qemu-devel] [PATCH v3 1/1] block/sheepdog: fix argument passed to qemu_strtoul(), Jeff Cody, 2016/03/02
- Re: [Qemu-devel] [PATCH v3 1/1] block/sheepdog: fix argument passed to qemu_strtoul(), Max Reitz, 2016/03/02
- Re: [Qemu-devel] [PATCH v3 1/1] block/sheepdog: fix argument passed to qemu_strtoul(), Eric Blake, 2016/03/02
- Re: [Qemu-devel] [PATCH v3 1/1] block/sheepdog: fix argument passed to qemu_strtoul(), Max Reitz, 2016/03/02
- Re: [Qemu-devel] [PATCH v3 1/1] block/sheepdog: fix argument passed to qemu_strtoul(),
Jeff Cody <=
- Re: [Qemu-devel] [PATCH v3 1/1] block/sheepdog: fix argument passed to qemu_strtoul(), Hitoshi Mitake, 2016/03/02
- Re: [Qemu-devel] [PATCH v3 1/1] block/sheepdog: fix argument passed to qemu_strtoul(), Jeff Cody, 2016/03/09