Source-Changes-HG archive

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

[src/netbsd-6-1]: src/sys/dev/pci Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/86922c0aa672
branches:  netbsd-6-1
changeset: 775830:86922c0aa672
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Sep 07 16:01:28 2013 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #931):
        sys/dev/pci/virtio.c: revision 1.4
Make sure to check if the driver has a valid intr handler in virtio_detach().
Fixes a panic during shutdown on KVM under ubuntu 13.04 with virtio,
as reported in PR kern/48105 by Richard Hansen.
Should be pulled up to netbsd-6 branches.

diffstat:

 sys/dev/pci/virtio.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 5fd8e2e5a718 -r 86922c0aa672 sys/dev/pci/virtio.c
--- a/sys/dev/pci/virtio.c      Sat Sep 07 15:58:31 2013 +0000
+++ b/sys/dev/pci/virtio.c      Sat Sep 07 16:01:28 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */
+/*     $NetBSD: virtio.c,v 1.3.22.1 2013/09/07 16:01:28 bouyer Exp $   */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.3.22.1 2013/09/07 16:01:28 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -199,8 +199,10 @@
        }
        KASSERT(sc->sc_child == 0 || sc->sc_child == (void*)1);
        KASSERT(sc->sc_vqs == 0);
-       pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
-       sc->sc_ih = 0;
+       if (sc->sc_ih != NULL) {
+               pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
+               sc->sc_ih = NULL;
+       }
        if (sc->sc_iosize)
                bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_iosize);
        sc->sc_iosize = 0;



Home | Main Index | Thread Index | Old Index