DragonFly bugs List (threaded) for 2009-04
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: panic: lockmgr: locking against myself
:Fresh build, full hammer setup and triggered by kdesu (KDE wrapper for su
:command). The panic is 100% reproduceable. Core is uploaded into leaf.
:
:...
I think I see what's going on here. It's double-closing the
tty vnode. It looks like the case can occur if the process doing
it is in the background and all other references have gone away.
Please try this patch and tell me if it solves the problem.
-Matt
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index ce27467..d013009 100644
--- a/sys/kern/tty_tty.c
+++ b/sys/kern/tty_tty.c
@@ -147,10 +147,12 @@ retry:
vdrop(ttyvp);
goto retry;
}
+ p->p_session->s_ttyvp = NULL;
vclrflags(ttyvp, VCTTYISOPEN);
error = VOP_CLOSE(ttyvp, FREAD|FWRITE);
vn_unlock(ttyvp);
vdrop(ttyvp);
+ vrele(ttyvp); /* ref from s_ttyvp */
} else {
error = 0;
}
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]