Subject: port-sun3/21699: sun3 if_ie causes vm_fault in kernels built without BPFILTER
To: None <gnats-bugs@gnats.netbsd.org>
From: None <akropel1@rochester.rr.com>
List: netbsd-bugs
Date: 05/27/2003 21:01:23
>Number:         21699
>Category:       port-sun3
>Synopsis:       sun3 if_ie causes vm_fault in kernels built without BPFILTER
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sun3-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 28 01:02:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Adam Kropelin
>Release:        NetBSD 1.6.1
>Organization:
>Environment:
	
	
System: NetBSD bigmama 1.6.1 NetBSD 1.6.1 (INSTALL) #0: Sat May 24 17:35:07 EDT 2003 adk0212@netbsd:/home/adk0212/obj/sun3/sys/arch/sun3/compile/INSTALL sun3
Architecture: m68k
Machine: sun3
>Description:
	If a sun3 kernel is built without BPFILTER support, the if_ie device will
	cause a vm_fault whenever a rx packet is processed. Most importantly this
	affects the shipping versions of the miniroot and RAMDISK kernels, thus
	making network installs of 1.6 and 1.6.1 difficult on certain hardware.
>How-To-Repeat:
	Boot an affected kernel, ifconfig the interface, ping the test box from
	another machine on the network.
>Fix:
	The following is a minimal patch to solve the problem.

--- sys/arch/sun3/dev/if_ie.c.orig	Sat May 24 12:17:03 2003
+++ sys/arch/sun3/dev/if_ie.c	Sat May 24 12:17:49 2003
@@ -701,14 +701,11 @@
 	struct ether_header *eh;
 	int *to_bpf;
 {
-	struct ifnet *ifp;
-
-	ifp = &sc->sc_if;
 
 #if NBPFILTER > 0
+	struct ifnet *ifp;
+	ifp = &sc->sc_if;
 	*to_bpf = (ifp->if_bpf != 0);
-#else
-	*to_bpf = 0;
 #endif
 
 	/*


>Release-Note:
>Audit-Trail:
>Unformatted: