Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 May 1999 23:34:15 -0500 (EST)
From:      "John S. Dyson" <dyson@iquest.net>
To:        dillon@apollo.backplane.com (Matthew Dillon)
Cc:        toasty@home.dragondata.com, hackers@FreeBSD.ORG
Subject:   Re: Possible race in pipe device driver, esp on multi-cpu machines.
Message-ID:  <199906010434.XAA01152@y.dyson.net>
In-Reply-To: <199905311724.KAA76020@apollo.backplane.com> from Matthew Dillon at "May 31, 99 10:24:55 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon said:
> 
>     Alan and I are working on it.  We are testing a fix for pipe_read() now
>     and I'm working on one for pipe_write().  The fixes basically involve
>     holding the pipe's lock throughout all calculations and I/O ops except 
>     when the code needs to explicitly tsleep() on a pipe-empty or pipe-full
>     condition.
> 
>     The race conditions in the pipe code can lead to a crash in the case
>     where you have multiple writers or multiple readers accessing the same
>     pipe, but should only lead to corruption in certain cases where one reader
>     and one writer exist.  It may or may not be related to your problem.
> 
You are doing the right thing.  Once the problem was brought up in
the mailing lists, after the quick inspection, the problem is obvious,
and the fix isn't too awful complex, when knowing that the problems
exists...

It is amazing how things like this can slip by.

-- 
John                  | Never try to teach a pig to sing,
dyson@iquest.net      | it makes one look stupid
jdyson@nc.com         | and it irritates the pig.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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