Subject: Re: kern/279: msync(2) fails when size param is 0
To: Thorsten Lockert <tholo@SigmaSoft.COM>
From: Chris G. Demetriou <cgd@postgres.Berkeley.EDU>
List: netbsd-bugs
Date: 06/05/1994 09:47:57
> >Description:
> 	msync(2) fails when passed only the address and no size.
> 	When both are passed, it apparently works.

This isn't very specific; could you please clarify?

> >How-To-Repeat:
> 	Attach some file to a memory segment with mmap().  Change it in
> 	memory.  msync(address, 0);.  Watch it fail.

Could you supply some sample code, and instructions to use it?
I really don't have time to write the (rather short) test program,
and then come up with a test case for it...

> >Fix:
> 	
> 	I believe the following line in the msync(2) code, inside "if (size == 0)"
> 	is bogus:
> 
> 		addr = entry->start;

I don't _think_ that line is bogus -- conceptually, given what it's
trying to do, that'd be the right way to do it (i think 8-).



chris

------------------------------------------------------------------------------