Re: console hangs after setting hostname

From: Hidetoshi Shimokawa <simokawa_at_FreeBSD.ORG>
Date: Wed, 12 Sep 2007 11:16:37 +0900
On 9/11/07, Gary Jennejohn <gary.jennejohn_at_freenet.de> wrote:
> On Thu, 23 Aug 2007 11:37:20 +0900
> "Hidetoshi Shimokawa" <simokawa_at_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_at_ 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_at_FreeBSD.ORG
Received on Wed Sep 12 2007 - 00:16:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:17 UTC