| Submitter | Stefan BOSAK |
|---|---|
| Date | July 8, 2011, 8:26 p.m. |
| Message ID | <4E1767E8.40803@feikar.sk> |
| Download | mbox | patch |
| Permalink | /patch/103941/ |
| State | New |
| Headers | show |
Comments
On 2011-07-08 22:26, Stefan BOSAK wrote: > Hello. > > Bug is in (xen-mapcache.c): > > Reported-by: Steve <stefan.bosak@gmail.com> > Signed-off-by: Steve <stefan.bosak@gmail.com> > > diff --git a/xen-mapcache.c b/xen-mapcache.c > index 57fe24d..1c3b5bf 100644 > --- a/xen-mapcache.c > +++ b/xen-mapcache.c > @@ -107,7 +107,7 @@ void qemu_map_cache_init(void) > size = mapcache->nr_buckets * sizeof (MapCacheEntry); > size = (size + XC_PAGE_SIZE - 1) & ~(XC_PAGE_SIZE - 1); > DPRINTF("qemu_map_cache_init, nr_buckets = %lx size %lu\n", > mapcache->nr_buckets, size); > - mapcache->entry = qemu_mallocz(size); > + mapcache->entry = qemu_mallocz(size*sizeof(MapCacheEntry)); This is obviously (see a few lines above) already correct and can't be related to your problems - the Xen bits aren't even executed in KVM mode. The bug you stumbled over finally cost my nerves today as well. The regression comes from commit 38bee5dc94. I'll poke the author. Jan
Patch
diff --git a/xen-mapcache.c b/xen-mapcache.c index 57fe24d..1c3b5bf 100644 --- a/xen-mapcache.c +++ b/xen-mapcache.c @@ -107,7 +107,7 @@ void qemu_map_cache_init(void) size = mapcache->nr_buckets * sizeof (MapCacheEntry); size = (size + XC_PAGE_SIZE - 1) & ~(XC_PAGE_SIZE - 1); DPRINTF("qemu_map_cache_init, nr_buckets = %lx size %lu\n", mapcache->nr_buckets, size); - mapcache->entry = qemu_mallocz(size); + mapcache->entry = qemu_mallocz(size*sizeof(MapCacheEntry)); }
Hello. Bug is in (xen-mapcache.c): Reported-by: Steve <stefan.bosak@gmail.com> Signed-off-by: Steve <stefan.bosak@gmail.com> static void qemu_remap_bucket(MapCacheEntry *entry, Should somebody commit this fix ? Thank you for your time.