Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2007 11:16:37 +0900
From:      "Hidetoshi Shimokawa" <simokawa@FreeBSD.ORG>
To:        gary.jennejohn@freenet.de
Cc:        attilio@freebsd.org, bruce@cran.org.uk, current@freebsd.org
Subject:   Re: console hangs after setting hostname
Message-ID:  <626eb4530709111916w55e04bcbp9da576bf6e60d171@mail.gmail.com>
In-Reply-To: <20070911112419.68e8ec0d@peedub.jennejohn.org>
References:  <3979a4b0707291120v4927a20cm357b845f6d1f3567@mail.gmail.com> <46BE1D6C.6040903@cran.org.uk> <626eb4530708221937h31c8f37fu9527e941ed4000b6@mail.gmail.com> <20070911112419.68e8ec0d@peedub.jennejohn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/11/07, Gary Jennejohn <gary.jennejohn@freenet.de> wrote:
> On Thu, 23 Aug 2007 11:37:20 +0900
> "Hidetoshi Shimokawa" <simokawa@FreeBSD.ORG> wrote:
>
> > It looks that the low level console is not locked though the high level console
> > is locked by Giant.
> >
> > Could you try the attached patch?
> >
>
> This patch solves the problem and should definitely be committed bfore 7.0.
>
> --
> Gary Jennejohn
>
>

Yes, it should be committed.
I sent a request for approval to re@ last week and waiting for approval.
I also have a plan to MFC.

Here is a detailed description of the patch.

Serialize output routine of  terminal emulator (te_puts()) by a lock.
- The output routine of low level console is not protected by any lock
by default.
- Increment and decrement of  sc->write_in_progress are not atomic and
this may cause console hang.
- We also have many other states used by emulator that should be
protected by the lock.
- This change does not fix interspersed messages which
PRINTF_BUFR_SIZE kernel option should fix.

MFC after: 1 week

-- 
/\ Hidetoshi Shimokawa
\/  simokawa@FreeBSD.ORG



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