Subject: kern/21067: smbfs mallocs with simple lock held
To: None <>
From: Martin Husemann <>
List: netbsd-bugs
Date: 04/08/2003 14:24:09
>Number:         21067
>Category:       kern
>Synopsis:       smbfs mallocs with simple lock held
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 08 05:25:00 PDT 2003
>Originator:     Martin Husemann
>Release:        NetBSD 1.6Q
System: NetBSD 1.6Q NetBSD 1.6Q (BEASTY) #0: Tue Apr 8 14:01:09 CEST 2003 i386
Architecture: i386
Machine: i386

Using smbfs on a SMP machine may lock it up. With a LOCKDEBUG kernel the 
reason is spotted easily:

malloc with held simple_lock 0xd4a09678 CPU 0 ../../../../kern/kern_descrip.c:141
malloc(500,c02e6f20,0,c013dc73,c0b8e600) at malloc+0x1f
smbfs_mount(c0b54a00,bfbfee90,bfbff2f4,d4a66e6c,d4a28cc0) at smbfs_mount+0x121
sys_mount(d4a23404,d4a66f80,d4a66f78,c023aec7,d4a23404) at sys_mount+0x4dc
syscall_plain(1f,1f,1f,1f,bfbfee90) at syscall_plain+0xc0
Stopped in pid 274.1 (mount_smbfs) at   cpu_Debugger+0x4:       leave


Do a mount_smbfs on a MP machine.