nullfs and named pipes.

Robert Watson rwatson at FreeBSD.org
Mon Feb 19 14:29:11 UTC 2007


On Mon, 19 Feb 2007, Robert Watson wrote:

> On Mon, 19 Feb 2007, Robert Watson wrote:
>
>> On Sun, 18 Feb 2007, Josef Karthauser wrote:
>> 
>> Well, the worry would be that you would be replacing a clean error on 
>> failure with an occasional panic, the normal symptom of a race condition.
>> 
>> I think I'm alright with the VFIFO case above, but I'm quite uncomfortable 
>> with the VSOCK case.  In particular, I suspect that if the socket is 
>> closed, v_un will be reset in the lower layer, but continue to be a stale 
>> pointer in the upper layer, leading to accessing free'd or re-allocated 
>> kernel memory resulting in much badness.  I've noticed tested this, but you 
>> might give it a try and see what happens.
>
> Bad typing day.  Should read "not tested this".  In any case, you get the 
> idea: the problem here is a potential coherency issue on contents of v_un 
> between the two file system layers.

For some reason I was thinking of v_fifoinfo as being stable after it is 
initialized, but in fact, it is not, as it can be free'd later.  Also, the 
layers could become out of sync following a reboot.  So in conclusion, I think 
the fifo part of the patch also suffers from the same problem.

Robert N M Watson
Computer Laboratory
University of Cambridge


More information about the freebsd-hackers mailing list