Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/net Pull up following revision(s) (requested by chris...



details:   https://anonhg.NetBSD.org/src/rev/313a47c21666
branches:  netbsd-6
changeset: 774477:313a47c21666
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Aug 20 19:23:07 2012 +0000

description:
Pull up following revision(s) (requested by christos in ticket #517):
        sys/net/if_ethersubr.c: revision 1.190
PR/46587: Roger Pau Monne: Prevent panic on shutdown on bridge teardown ->
ifpromisc-> if_ioctl -> if_init. Idea from dyoung.
XXX: Pullup to 6.

diffstat:

 sys/net/if_ethersubr.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r dce0e9229844 -r 313a47c21666 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Mon Aug 20 19:15:36 2012 +0000
+++ b/sys/net/if_ethersubr.c    Mon Aug 20 19:23:07 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.188.8.1 2012/05/18 17:04:28 riz Exp $       */
+/*     $NetBSD: if_ethersubr.c,v 1.188.8.2 2012/08/20 19:23:07 riz Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.1 2012/05/18 17:04:28 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.2 2012/08/20 19:23:07 riz Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -1144,6 +1144,15 @@
        struct ether_multi *enm;
        int s;
 
+       /*
+        * Prevent further calls to ioctl (for example turning off
+        * promiscuous mode from the bridge code), which eventually can
+        * call if_init() which can cause panics because the interface
+        * is in the process of being detached. Return device not configured
+        * instead.
+        */
+       ifp->if_ioctl = (int (*)(struct ifnet *, u_long, void *))enxio;
+
 #if NBRIDGE > 0
        if (ifp->if_bridge)
                bridge_ifdetach(ifp);



Home | Main Index | Thread Index | Old Index