panic: Fatal trap 12

Matthew Dillon dillon at apollo.backplane.com
Fri May 15 00:54:10 PDT 2009


:I've got yet an other panic on my backup box.
:
:System is Opteron-170, 2GB RAM, em0 NIC.
:DragonFly-2.2.0
: 
:Panic messages I found on the console:
:
:Fatal trap 12: page fault while in kernel mode
:mp_lock = 00000001; cpuid = 1; lapic.id = 01000000
:
:fault virtual address = 0x7c
:fault code = supervisor write, page not present
:instruction pointer = 0x8:0xc0451953
:stack pointer		= 0x10:0xdf322a14
:frame pointer		= 0x10:0xdf322a34
:code segment		= base 0x0, limit 0xfffff, type 0x1b
:					= DPL 0, pres 1, def32 1, gran 1
:processor eflags	= interrupt enabled, resume, IOPL=0
:current process = 13142 (find)
:current thread = pri 10
: <- SMP: XXX
:
:kernel: type 12 trap, code = 2
:CPU1 stopping CPUs : 0x00000001
:  stopped
:
:Stopped at hammer_get_vnode+0x61:	movl $0x8, 0x7c
:
:-- 
:Francois Tigeot

    Got it.  Simple code bug, if hammer_get_vnode() races it does
    not properly clean-up the raced vnode.

    (I'm committing this now, it's an obvious fix)

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>

diff --git a/sys/vfs/hammer/hammer_inode.c b/sys/vfs/hammer/hammer_inode.c
index 7069c4b..a123dff 100644
--- a/sys/vfs/hammer/hammer_inode.c
+++ b/sys/vfs/hammer/hammer_inode.c
@@ -251,6 +251,7 @@ hammer_get_vnode(struct hammer_inode *ip, struct vnode **vpp)
 			hammer_lock_ex(&ip->lock);
 			if (ip->vp != NULL) {
 				hammer_unlock(&ip->lock);
+				vp = *vpp;
 				vp->v_type = VBAD;
 				vx_put(vp);
 				continue;





More information about the Bugs mailing list