console hangs after setting hostname

Hidetoshi Shimokawa simokawa at FreeBSD.ORG
Tue Sep 11 19:16:39 PDT 2007


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@ 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


More information about the freebsd-current mailing list