Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2006 13:46:14 +0200 (CEST)
From:      Martin Blapp <mb@imp.ch>
To:        Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
Cc:        Robert Watson <rwatson@freebsd.org>, Patrick Guelat <patg@imp.ch>, "Wojciech A. Koszek" <wkoszek@freebsd.org>, freebsd-stable@freebsd.org
Subject:   Re: Crash with FreeBSD 6.1 STABLE of today
Message-ID:  <20060623133915.S14714@godot.imp.ch>
In-Reply-To: <1151056731.62769.2.camel@buffy.york.ac.uk>
References:  <20060621202508.S17514@godot.imp.ch> <20060621193941.Y8526@fledge.watson.org> <20060622205806.GA6542@FreeBSD.czest.pl> <20060622223630.V17514@godot.imp.ch> <1151056731.62769.2.camel@buffy.york.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi,

Maybe this is the solution ? IMHO there is a race window
open between the first tp->t_session test and the locking
of the proc tree.

Martin

+++ src/sys/kern/tty.c
--- src/sys/kern/tty.c

+                       sx_slock(&proctree_lock);
                         if (tp->t_session) {
-				sx_slock(&proctree_lock);
                                 if (tp->t_session->s_leader) {
                                         struct proc *p;

                                         p = tp->t_session->s_leader;
                                         PROC_LOCK(p);
                                         psignal(p, SIGHUP);
                                         PROC_UNLOCK(p);
                                 }
-				sx_sunlock(&proctree_lock);
                         }
+                       sx_sunlock(&proctree_lock);




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060623133915.S14714>