Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jul 1995 11:09:16 -0700
From:      Matt Dillon <dillon@blob.best.net>
To:        Kirk McKusick <mckusick@McKusick.COM>
Cc:        davidg@root.com, bugs@freebsd.org
Subject:   Re: possible ffs_vget() race condition 
Message-ID:  <199507191809.LAA07002@blob.best.net>

next in thread | raw e-mail | index | archive | help
    I've got some kernel printf()'s in the two critical code areas
    along with my fix so by this time tomorrow I should know whether
    the hole is getting hit.

    Oh, there are also some pretty serious problems with the sysctl()
    stuff... mainly with all the list traversals the sysctl()'s do
    without locking and the copyout's inside the loops (which can
    block, causing the list being traverse and most specifically the
    'current' item to be ripped out from under sysctl())... I had
    to stop using pstat -T because of the problem (it would crash
    the machine every couple of hours).  Since I absolutely need ps, I wound
    up patched the proc stuff sysctl's adding a lock count to the process 
    structure which the exit/zombie code blocks on, but haven't
    posted the patches because the whole sysctl thing really needs
    a good going over to solve the problems.

					-Matt


:	To: arch@FreeBSD.org
:	cc: dillon@blob.best.net
:	Subject: possible ffs_vget() race condition
:	From: David Greenman <davidg@Root.COM>
:	Reply-To: davidg@Root.COM
:	Date: Wed, 19 Jul 1995 06:52:48 -0700
:
:	   Any comments, Kirk?
:
:	-DG
:
:This is a bug. I believe that the correct fix is to use a non-blocking
:malloc. If it fails, then do a blocking malloc, a free, and then restart
:with another call to ufs_ihashget. If another vnode has showed up while
:you were blocked in getnewvnode or malloc, free the previously allocated
:vnode, and return the one found by ufs_ihashget.
:
:	~Kirk
:




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