vnode lock violation in today's -CURRENT

From: Don Lewis <truckman_at_FreeBSD.org>
Date: Mon, 17 Nov 2003 23:37:34 -0800 (PST)
I just ran into this while running portupgrade.

VOP_GETATTR: 0xc741e000 is not locked but should be
Debugger("Lock violation.
")
Stopped at      Debugger+0x55:  xchgl   %ebx,in_Debugger.0
db> tr
Debugger(c08bf9aa,c9749c78,c741e000,c08bf9eb,e820c984) at Debugger+0x55
vfs_badlock(c08bf9eb,c9749c78,c741e000,c09590e0,c741e000) at vfs_badlock+0x45
assert_vop_locked(c741e000,c9749c78,e820c9dc,0,e820c9c0) at assert_vop_locked+0x62
getdents_common(c6ede500,e820cd10,1,e820cd40,c0848b70) at getdents_common+0xfa
linux_getdents64(c6ede500,e820cd10,c08d6778,3ee,3) at linux_getdents64+0x20
syscall(2f,2f,2f,5,0) at syscall+0x2c0
Xint0x80_syscall() at Xint0x80_syscall+0x1d
--- syscall (220, Linux ELF, linux_getdents64), eip = 0x805a028, esp = 0xbfbfdc5c, ebp = 0xbfbfdcb8 ---


It looks to me like the call to vn_lock() in getdents_common() needs to
be moved to before the call to VOP_GETATTR().  The malloc() call should
probably be moved as well, which means that the intervening error
handling needs to be tweaked.
Received on Mon Nov 17 2003 - 22:37:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:29 UTC