Subject: kern/21581: kernel panic when removing pc card
To: None <>
From: Andrew Brown <>
List: netbsd-bugs
Date: 05/15/2003 00:16:51
>Number:         21581
>Category:       kern
>Synopsis:       kernel panic when removing pc card
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 15 04:17:00 UTC 2003
>Originator:     TheMan
>Release:        1.6T (kernel and userland as of 20030511)

System: NetBSD this 1.6T NetBSD 1.6T (THAT) #182: Wed May 14 19:45:35 EDT 2003  andrew@this:/usr/src/sys/arch/i386/compile/THAT i386


	pop the card in, use it, pop it out, panic.  simple.

	gdb says this:

#8  0xc0102c58 in calltrap ()
#9  0xc0146586 in nd6_prefix_offlink (pr=0xc08d2200) at ../../../../netinet6/nd6_rtr.c:1713
#10 0xc0145b3d in prelist_remove (pr=0xc08d2200) at ../../../../netinet6/nd6_rtr.c:1096
#11 0xc0140a54 in nd6_purge (ifp=0xc0902438) at ../../../../netinet6/nd6.c:607
#12 0xc013697d in in6_ifdetach (ifp=0xc0902438) at ../../../../netinet6/in6_ifattach.c:672
#13 0xc01347c2 in in6_purgeif (ifp=0xc0902438) at ../../../../netinet6/in6.c:1393
#14 0xc0148ae3 in udp6_usrreq (so=0xcf459db0, req=22, m=0x0, addr6=0x0, control=0xc0902438, p=0xcf440680) at ../../../../netinet6/udp6_usrreq.c:296
#15 0xc0283f4c in if_detach (ifp=0xc0902438) at ../../../../net/if.c:609
#16 0xc0179857 in ep_detach (self=0xc0902400, flags=1) at ../../../../dev/ic/elink3.c:2109
#17 0xc03525df in ep_pcmcia_detach (self=0xc0902400, flags=1) at ../../../../dev/pcmcia/if_ep_pcmcia.c:404
#18 0xc024de13 in config_detach (dev=0xc0902400, flags=1) at ../../../../kern/subr_autoconf.c:961
#19 0xc034de2b in pcmcia_card_detach (dev=0xc086e400, flags=1) at ../../../../dev/pcmcia/pcmcia.c:235
#20 0xc0347926 in cardslot_event_thread (arg=0xc08d2e00) at ../../../../dev/cardbus/cardslot.c:427


	boot to single user, get to the shell prompt
	pop the card in
	ifconfig card up
	pop the card out

	as a workaround, delete all the ipv6 addresses from the
	interface before popping the card out