Date: Sun, 11 Oct 2009 00:04:20 +0200 From: Dimitry Andric <dimitry@andric.com> To: Harald Schmalzbauer <h.schmalzbauer@omnilan.de> Cc: Kostik Belousov <kostikbel@gmail.com>, freebsd-current@freebsd.org Subject: Re: shutdown not working with uart console Message-ID: <4AD104E4.2070009@andric.com> In-Reply-To: <4AD0EB24.5020700@omnilan.de> References: <4AD0BAFB.6020207@omnilan.de> <20091010175115.GC2259@deviant.kiev.zoral.com.ua> <4AD0EB24.5020700@omnilan.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2009-10-10 22:14, Harald Schmalzbauer wrote: >> I wondering whether I was too conservative in r195509. >> Please try this. >> >> diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c >> index 39b48e0..b96cdbf 100644 >> --- a/sys/kern/kern_exit.c >> +++ b/sys/kern/kern_exit.c >> @@ -340,10 +340,10 @@ exit1(struct thread *td, int rv) >> >> if (ttyvp != NULL) { >> sx_xunlock(&proctree_lock); >> - vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY); >> - if (ttyvp->v_type != VBAD) >> + if (vn_lock(ttyvp, LK_EXCLUSIVE) == 0) { >> VOP_REVOKE(ttyvp, REVOKEALL); >> - VOP_UNLOCK(ttyvp, 0); >> + VOP_UNLOCK(ttyvp, 0); >> + } >> sx_xlock(&proctree_lock); >> } >> } > > Great, thanks a lot, this fixes my problem :) I had seen this issue too, some time ago, but disregarded it as just some anomaly. In any case, the above patch also fixes it for me.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AD104E4.2070009>