Subject: kern/7681: uvm_map_advice leaves map locked for some types of advice
To: None <gnats-bugs@gnats.netbsd.org>
From: None <soren@t.dk>
List: netbsd-bugs
Date: 05/31/1999 14:22:51
>Number:         7681
>Category:       kern
>Synopsis:       uvm_map_advice leaves map locked for some types of advice
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 31 14:05:00 1999
>Last-Modified:
>Originator:     Soren S. Jorvang
>Organization:
Soren
>Release:        NetBSD-current
>Environment:
System: NetBSD 1.4C i386


>Description:
In uvm_map_advice, for those of MADV_* which are not currently
implemented (#if 0), 'invalid argument' is returned, but the map
is not unlocked, causing the calling process to be stuck in the 'D'
state.


>How-To-Repeat:
Run e.g. the FreeBSD cvsup binary.


>Fix:
--- src/sys/uvm/uvm_map.c.orig	Mon May 31 20:34:07 1999
+++ src/sys/uvm/uvm_map.c	Mon May 31 20:34:51 1999
@@ -1975,6 +1975,7 @@
 #endif
 
 		default:
+			vm_map_unlock(map);
 			UVMHIST_LOG(maphist,"<- done (INVALID ARG)",0,0,0,0);
 			return (KERN_INVALID_ARGUMENT);
 		}
>Audit-Trail:
>Unformatted: