Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/4dc4f8ed7eb4
branches:  netbsd-6
changeset: 776422:4dc4f8ed7eb4
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Sep 07 16:01:03 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 160cc2ad319f -r 4dc4f8ed7eb4 sys/dev/pci/virtio.c
--- a/sys/dev/pci/virtio.c      Sat Sep 07 15:57:35 2013 +0000
+++ b/sys/dev/pci/virtio.c      Sat Sep 07 16:01:03 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.8.1 2013/09/07 16:01:03 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.8.1 2013/09/07 16:01:03 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