Subject: kern/11972: ENOMEM problem at uvm_map_extract()
To: None <gnats-bugs@gnats.netbsd.org>
From: H.Saito <saito@densan.co.jp>
List: netbsd-bugs
Date: 01/15/2001 22:04:24
>Number: 11972
>Category: kern
>Synopsis: ENOMEM problen at uvm_map_extract()
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 15 22:04:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: H.Saito
>Release: 1.4.3
>Organization:
>Environment:
QED-R5200
System: NetBSD vw4 1.4.3 NetBSD 1.4.3 (GENERIC.opt) #7: Tue Jan 16 13:38:49 JST 2001 saito@vw4:/user5/NetBSD-1.4.3/usr/src/sys/arch/mips/compile/GENERIC.opt mips
>Description:
I found a uninitialized variable 'kva' in uvm_io() function at sys/uvm/uvm_io.c.
Kva is referd from this program.
error = uvm_map_extract(map, baseva, chunksz, kernel_map, &kva,
UVM_EXTRACT_QREF | UVM_EXTRACT_CONTIG |
UVM_EXTRACT_FIXPROT);
Dstaddr variable referd from uvm_map_extract() at sys/uvm/uvm_map.c
is undefined.
dstaddr = *dstaddrp;
if (uvm_map_reserve(dstmap, len, start, &dstaddr) == FALSE)
return(ENOMEM);
This problem fixed from NetBSD-1.5.
>How-To-Repeat:
>Fix:
--- uvm_map.c.orig Fri Dec 1 14:38:24 2000
+++ uvm_map.c Tue Jan 16 13:36:20 2001
@@ -1360,7 +1360,7 @@
* step 1: reserve space in the target map for the extracted area
*/
- dstaddr = *dstaddrp;
+ dstaddr = vm_map_min(dstmap);
if (uvm_map_reserve(dstmap, len, start, &dstaddr) == FALSE)
return(ENOMEM);
*dstaddrp = dstaddr; /* pass address back to caller */
>Release-Note:
>Audit-Trail:
>Unformatted: