Subject: kern/279: msync(2) fails when size param is 0
To: None <gnats-admin>
From: Thorsten Lockert <tholo@SigmaSoft.COM>
List: netbsd-bugs
Date: 06/04/1994 17:20:02
>Number:         279
>Category:       kern
>Synopsis:       msync(2) fails when size param is 0
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun  4 17:20:01 1994
>Originator:     Thorsten Lockert
>Organization:
SigmaSoft, Th. Lockert
>Release:        current
>Environment:
	
System: NetBSD gandalf.bbb.no 0.9B NetBSD 0.9B (GANDALF) #4: Sat Jun 4 00:50:35 MET DST 1994 tholo@gandalf.bbb.no:/usr/src/sys/arch/i386/compile/GANDALF i386


>Description:
	msync(2) fails when passed only the address and no size.
	When both are passed, it apparently works.
	
>How-To-Repeat:
	Attach some file to a memory segment with mmap().  Change it in
	memory.  msync(address, 0);.  Watch it fail.
	
>Fix:
	
	I believe the following line in the msync(2) code, inside "if (size == 0)"
	is bogus:

		addr = entry->start;
>Audit-Trail:
>Unformatted:


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