Date: Sat, 10 Oct 2009 22:14:28 +0200 From: Harald Schmalzbauer <h.schmalzbauer@omnilan.de> To: Kostik Belousov <kostikbel@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: shutdown not working with uart console Message-ID: <4AD0EB24.5020700@omnilan.de> In-Reply-To: <20091010175115.GC2259@deviant.kiev.zoral.com.ua> References: <4AD0BAFB.6020207@omnilan.de> <20091010175115.GC2259@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Kostik Belousov schrieb am 10.10.2009 19:51 (localtime):
...
> 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 :)
There's one LOR left at shutdown (vfs_mount+ffs_vfsops) and one at
startup (unionfs+ufs) but that's completele unrelated I guess.
Thanks,
-Harry
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (FreeBSD)
iEYEARECAAYFAkrQ6ysACgkQLDqVQ9VXb8izfACfYoLVRR5VuZXhIK2bKfYfpSeh
/toAn3BDNDKOEgu0D1PV5c5+RhwmgWHp
=07/d
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AD0EB24.5020700>
