Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Don't set SOFTINT_MPSAFE to vioif_rx_softint



details:   https://anonhg.NetBSD.org/src/rev/9dbcc4b4d86b
branches:  trunk
changeset: 330688:9dbcc4b4d86b
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Jul 18 02:10:55 2014 +0000

description:
Don't set SOFTINT_MPSAFE to vioif_rx_softint

vioif_rx_softint calls vioif_populate_rx_mbufs that is not MPSAFE.
vioif_populate_rx_mbufs is also called via vioif_ioctl and so can
be called by two LWPs simultaneously, resulting in kernel panic.

PR kern/49007

diffstat:

 sys/dev/pci/if_vioif.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 68a96c160a18 -r 9dbcc4b4d86b sys/dev/pci/if_vioif.c
--- a/sys/dev/pci/if_vioif.c    Fri Jul 18 00:00:51 2014 +0000
+++ b/sys/dev/pci/if_vioif.c    Fri Jul 18 02:10:55 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vioif.c,v 1.4 2013/05/09 12:23:17 minoura Exp $     */
+/*     $NetBSD: if_vioif.c,v 1.5 2014/07/18 02:10:55 ozaki-r Exp $     */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.4 2013/05/09 12:23:17 minoura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.5 2014/07/18 02:10:55 ozaki-r Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -557,7 +557,7 @@
                }
        }
 
-       sc->sc_rx_softint = softint_establish(SOFTINT_NET|SOFTINT_MPSAFE,
+       sc->sc_rx_softint = softint_establish(SOFTINT_NET,
                                              vioif_rx_softint, sc);
        if (sc->sc_rx_softint == NULL) {
                aprint_error_dev(self, "cannot establish softint\n");



Home | Main Index | Thread Index | Old Index