Re: kern/127446: [patch] fix race in sys/dev/kbdmux/kbdmux.c

From: Eygene Ryabinkin <rea-fbsd_at_codelabs.ru>
Date: Tue, 23 Sep 2008 14:02:50 +0400
Tue, Sep 23, 2008 at 01:09:03PM +0400, Eygene Ryabinkin wrote:
> New patch works on 7.0 and 7.0-PRERELEASE, but currently hangs my
> 7.1-PRERELEASE just before activation of the single-user mode.  I am
> investigating -- I did the original patch for the syscons.c 1.453.2.1.
> Changes in 1.453.2.2 look innocently, but 1.453.2.3 changed some
> functionality, may be it is the culprit.  Will inform on my findings.

It turned that locking inside sc_cnputc() was redundant and errorneous:
WITNESS quicky advised me not to do it.  Forgot to run locking subsystem
checks, sorry for that.

The attached patch was tested on two 7.1-PRERELEASE systems (i386 and
amd64, both with and without X), on 7.0-STABLE and 7.0-RELEASE-p3 (i386,
only console, no X) and on rather old 8-CURRENT from Jul 1, syscons.c
revision 1.459 (amd64 both with and without X).  Works fine for me.

8.x needs slightly modified patch due to the naming changes.  Also
attached it.  Will try a fresher -CURRENT in some hours: Ed did massive
changes due to the MPSAFE tty layer, so may be this patch won't be
needed for the modern 8-CURRENT.
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual   
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook 
    {_.-``-'         {_/            #

Received on Tue Sep 23 2008 - 08:02:54 UTC

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