All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix
@ 2011-11-04  9:34 Markus Armbruster
  2011-11-09 12:33 ` Gerd Hoffmann
  2012-01-17  9:08 ` Markus Armbruster
  0 siblings, 2 replies; 6+ messages in thread
From: Markus Armbruster @ 2011-11-04  9:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel

Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/qxl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 84ffd45..c97bebe 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1006,7 +1006,7 @@ void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL pqxl, int group_id)
     case MEMSLOT_GROUP_HOST:
         return (void*)offset;
     case MEMSLOT_GROUP_GUEST:
-        PANIC_ON(slot > NUM_MEMSLOTS);
+        PANIC_ON(slot >= NUM_MEMSLOTS);
         PANIC_ON(!qxl->guest_slots[slot].active);
         PANIC_ON(offset < qxl->guest_slots[slot].delta);
         offset -= qxl->guest_slots[slot].delta;
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix
  2011-11-04  9:34 [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix Markus Armbruster
@ 2011-11-09 12:33 ` Gerd Hoffmann
  2012-01-17  9:08 ` Markus Armbruster
  1 sibling, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2011-11-09 12:33 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel

On 11/04/11 10:34, Markus Armbruster wrote:
> Spotted by Coverity.

Patch added to spice patch queue.

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix
  2011-11-04  9:34 [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix Markus Armbruster
  2011-11-09 12:33 ` Gerd Hoffmann
@ 2012-01-17  9:08 ` Markus Armbruster
  2012-01-17 11:57   ` Alon Levy
  2012-01-17 15:50   ` Gerd Hoffmann
  1 sibling, 2 replies; 6+ messages in thread
From: Markus Armbruster @ 2012-01-17  9:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel

Ping?

Markus Armbruster <armbru@redhat.com> writes:

> Spotted by Coverity.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  hw/qxl.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/qxl.c b/hw/qxl.c
> index 84ffd45..c97bebe 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -1006,7 +1006,7 @@ void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL pqxl, int group_id)
>      case MEMSLOT_GROUP_HOST:
>          return (void*)offset;
>      case MEMSLOT_GROUP_GUEST:
> -        PANIC_ON(slot > NUM_MEMSLOTS);
> +        PANIC_ON(slot >= NUM_MEMSLOTS);
>          PANIC_ON(!qxl->guest_slots[slot].active);
>          PANIC_ON(offset < qxl->guest_slots[slot].delta);
>          offset -= qxl->guest_slots[slot].delta;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix
  2012-01-17  9:08 ` Markus Armbruster
@ 2012-01-17 11:57   ` Alon Levy
  2012-01-17 15:50   ` Gerd Hoffmann
  1 sibling, 0 replies; 6+ messages in thread
From: Alon Levy @ 2012-01-17 11:57 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, kraxel

On Tue, Jan 17, 2012 at 10:08:47AM +0100, Markus Armbruster wrote:
> Ping?
> 
> Markus Armbruster <armbru@redhat.com> writes:
> 

Reviewed-by: Alon Levy <alevy@redhat.com>

> > Spotted by Coverity.
> >
> > Signed-off-by: Markus Armbruster <armbru@redhat.com>
> > ---
> >  hw/qxl.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/hw/qxl.c b/hw/qxl.c
> > index 84ffd45..c97bebe 100644
> > --- a/hw/qxl.c
> > +++ b/hw/qxl.c
> > @@ -1006,7 +1006,7 @@ void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL pqxl, int group_id)
> >      case MEMSLOT_GROUP_HOST:
> >          return (void*)offset;
> >      case MEMSLOT_GROUP_GUEST:
> > -        PANIC_ON(slot > NUM_MEMSLOTS);
> > +        PANIC_ON(slot >= NUM_MEMSLOTS);
> >          PANIC_ON(!qxl->guest_slots[slot].active);
> >          PANIC_ON(offset < qxl->guest_slots[slot].delta);
> >          offset -= qxl->guest_slots[slot].delta;
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix
  2012-01-17  9:08 ` Markus Armbruster
  2012-01-17 11:57   ` Alon Levy
@ 2012-01-17 15:50   ` Gerd Hoffmann
  1 sibling, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2012-01-17 15:50 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel

On 01/17/12 10:08, Markus Armbruster wrote:
> Ping?

Sitting lonely in the spice patch queue.
/me completely forgot that the spice patch queue isn't empty ...

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix
  2012-01-17 15:51 [Qemu-devel] [PULL] tiny spice patch queue Gerd Hoffmann
@ 2012-01-17 15:51 ` Gerd Hoffmann
  0 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2012-01-17 15:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Markus Armbruster, Gerd Hoffmann

From: Markus Armbruster <armbru@redhat.com>

Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/qxl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index ac81927..bdd36f9 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1020,7 +1020,7 @@ void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL pqxl, int group_id)
     case MEMSLOT_GROUP_HOST:
         return (void*)offset;
     case MEMSLOT_GROUP_GUEST:
-        PANIC_ON(slot > NUM_MEMSLOTS);
+        PANIC_ON(slot >= NUM_MEMSLOTS);
         PANIC_ON(!qxl->guest_slots[slot].active);
         PANIC_ON(offset < qxl->guest_slots[slot].delta);
         offset -= qxl->guest_slots[slot].delta;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-17 15:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-04  9:34 [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix Markus Armbruster
2011-11-09 12:33 ` Gerd Hoffmann
2012-01-17  9:08 ` Markus Armbruster
2012-01-17 11:57   ` Alon Levy
2012-01-17 15:50   ` Gerd Hoffmann
  -- strict thread matches above, loose matches on Subject: below --
2012-01-17 15:51 [Qemu-devel] [PULL] tiny spice patch queue Gerd Hoffmann
2012-01-17 15:51 ` [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix Gerd Hoffmann

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.