Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Fix for virtios viomb memory balloon driver. The...



details:   https://anonhg.NetBSD.org/src/rev/2aebd5cf4dff
branches:  trunk
changeset: 949417:2aebd5cf4dff
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Wed Jan 13 19:46:49 2021 +0000

description:
Fix for virtios viomb memory balloon driver. The inflate_done() and
deflate_done() issued a wrong extent to bus_dmamap_sync() giving rise to
panics on aarch64s mmio backend.

diffstat:

 sys/dev/pci/viomb.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r c5ab5368c123 -r 2aebd5cf4dff sys/dev/pci/viomb.c
--- a/sys/dev/pci/viomb.c       Wed Jan 13 17:01:31 2021 +0000
+++ b/sys/dev/pci/viomb.c       Wed Jan 13 19:46:49 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: viomb.c,v 1.10 2019/12/10 18:00:17 ad Exp $    */
+/*     $NetBSD: viomb.c,v 1.11 2021/01/13 19:46:49 reinoud Exp $       */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.10 2019/12/10 18:00:17 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.11 2021/01/13 19:46:49 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -341,7 +341,7 @@
        b = &sc->sc_req;
        nvpages = b->bl_nentries;
        bus_dmamap_sync(virtio_dmat(vsc), b->bl_dmamap,
-                       offsetof(struct balloon_req, bl_pages),
+                       0,
                        sizeof(uint32_t)*nvpages,
                        BUS_DMASYNC_POSTWRITE);
        while (!TAILQ_EMPTY(&b->bl_pglist)) {
@@ -456,7 +456,7 @@
        b = &sc->sc_req;
        nvpages = b->bl_nentries;
        bus_dmamap_sync(virtio_dmat(vsc), b->bl_dmamap,
-                       offsetof(struct balloon_req, bl_pages),
+                       0,
                        sizeof(uint32_t)*nvpages,
                        BUS_DMASYNC_POSTWRITE);
 



Home | Main Index | Thread Index | Old Index