Date: Mon, 11 Sep 2006 10:48:18 -0400 From: John Baldwin <jhb@freebsd.org> To: Martin Blapp <mbr@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern tty.c Message-ID: <200609111048.19397.jhb@freebsd.org> In-Reply-To: <200609101651.k8AGpuqm069774@repoman.freebsd.org> References: <200609101651.k8AGpuqm069774@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 10 September 2006 12:51, Martin Blapp wrote: > mbr 2006-09-10 16:51:56 UTC > > FreeBSD src repository > > Modified files: > sys/kern tty.c > Log: > Fix locking race in ttymodem(). The locking of the proctree happens too > late and opens a small race window before tp->t_session->s_leader is > accessed. In case tp->t_session has just been set to NULL elsewhere, we > get a panic(). > > This fix is a bandaid until someone else fixes the whole locking in the > tty subsystem. Definitly more work needs to be done. > > MFC after: 1 week > Reviewed by: mlaier > PR: kern/103101 Did you ever try putting a 'mtx_assert(&Giant, MA_OWNED);' in place to see if Giant is held there? Until the tty system is locked, the proper fix is to put Giant back on top of it, not abuse the wrong lock. Abusing the wrong lock is only going to narrow the race, not fix it. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609111048.19397.jhb>