Subject: kern/34648: Kernel panic when using NFS root and configuring an interface that needs firmware
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <ndehne@gmail.com>
List: netbsd-bugs
Date: 09/28/2006 10:50:00
>Number:         34648
>Category:       kern
>Synopsis:       Kernel panic when using NFS root and configuring an interface that needs firmware
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 28 10:50:00 +0000 2006
>Originator:     Nino Dehne
>Release:        4.99.2
>Organization:
>Environment:
NetBSD build.[...] 4.99.2 NetBSD 4.99.2 (GENERIC) #7: Sun Sep 24 23:56:44 CEST 2006  build@[...]:/tmp/wrap/HEAD/obj/x/s/n/HEAD/src/sys/arch/i386/compile/GENERIC i386
>Description:
ifconfig panics when configuring ral0 which is a Gigabyte GN-WI01GS miniPCI card:

ral0 at pci0 dev 10 function 0: Ralink Technologies RT2561S 802.11b/g (rev. 0x00)
ral0: interrupting at irq 11
ral0: 802.11 address 00:14:85:ca:24:0b
ral0: MAC/BBP RT2661B, RF RT2527
ral0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ral0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

The card needs firmware from /libdata/firmware/ral/ which resides on NFS because an NFS root filesystem is used.

C&P from
http://mail-index.netbsd.org/current-users/2006/09/24/0003.html and
http://mail-index.netbsd.org/current-users/2006/09/24/0013.html

uvm_fault(0xcad4a700, 0, 1) -> 0xe
kernel: supervisor trap page fault, code=0
Stopped in pid 150.1 (ifconfig) at      netbsd:kauth_cred_ngroups+0x6:  movl 0x20(%eax),%eax

db> bt
kauth_cred_ngroups( )[1] [...]+0xd [2]
nfs_request( ) [...]+0xf7
nfs_getattr( ) [...]+0x110
VOP_GETATTR( ) [...]+0x2f
firmware_open( ) [...]+0x111
rt2661_init( ) [...]+0x571
ieee80211_ioctl( ) [...]+0x47b
rt2661_ioctl( ) [...]+0x4f
in6_update_ifa( ) [...]+0x0x5ab
in6_if_up( ) [...]+0x5b
ifioctl( ) [...]+0x1e7
sys_ioctl( ) [...]+0x15a
syscall_plain() [...]+0xae
--- syscall (number 54) ---
0xbbbb89f7:
db>

[1] I naively assume that a lot of hex codes are not much use in order to save myself some typing. I hope that's OK. 
[2] This is always "at netbsd:" plus the function name from the beginning of the line. Again, saving myself some typing.
>How-To-Repeat:
Boot with a root filesystem on NFS. ifconfig up an interface which needs firmware. I believe this affects only certain ral(4) devices at the moment. ifconfig then panics the kernel.
>Fix: