NetBSD Problem Report #279

From gnats  Sat Jun  4 17:09:05 1994
Received: from gandalf.bbb.no (root@gandalf.bbb.no [192.124.156.194]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id RAA01866 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 4 Jun 1994 17:08:52 -0700
Message-Id: <199406050008.CAA27649@gandalf.bbb.no>
Date: Sun, 5 Jun 1994 02:08:46 +0200
From: Thorsten Lockert <tholo@SigmaSoft.COM>
Reply-To: tholo@SigmaSoft.COM
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: msync(2) fails when size param is 0
X-Send-Pr-Version: 3.2

>Number:         279
>Category:       kern
>Synopsis:       msync(2) fails when size param is 0
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 04 17:20:01 +0000 1994
>Closed-Date:    Mon Jun 20 00:18:14 +0000 1994
>Last-Modified:  
>Originator:     Thorsten Lockert
>Release:        current
>Organization:
SigmaSoft, Th. Lockert
>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;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cgd 
State-Changed-When: Sun Jun 19 17:18:14 PDT 1994 
State-Changed-Why:  
this was caused by a "VERY STUPID!" bug. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.