NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/45598: expanding uvmexp_sysctl makes top etc fail
The following reply was made to PR kern/45598; it has been noted by GNATS.
From: christos%zoulas.com@localhost (Christos Zoulas)
To: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/45598: expanding uvmexp_sysctl makes top etc fail
Date: Fri, 11 Nov 2011 10:14:16 -0500
On Nov 11, 10:10am, yamt%NetBSD.org@localhost (yamt%NetBSD.org@localhost)
wrote:
-- Subject: kern/45598: expanding uvmexp_sysctl makes top etc fail
| despite of the comments on the definition of uvmexp_sysctl,
| adding new members to the end of the structure actually breaks the abi.
|
| % top
| top: sysctl vm.uvmexp2 failed: Cannot allocate memory
|
| cf. http://mail-index.netbsd.org/tech-kern/2005/11/09/0002.html
|
Does this fix it?
christos
Index: uvm_meter.c
===================================================================
RCS file: /cvsroot/src/sys/uvm/uvm_meter.c,v
retrieving revision 1.56
diff -u -u -r1.56 uvm_meter.c
--- uvm_meter.c 2 Feb 2011 15:25:27 -0000 1.56
+++ uvm_meter.c 11 Nov 2011 15:13:47 -0000
@@ -180,6 +180,8 @@
node = *rnode;
node.sysctl_data = &u;
node.sysctl_size = sizeof(u);
+ if (oldp)
+ node.sysctl_size = min(*oldlenp, node.sysctl_size);
return (sysctl_lookup(SYSCTLFN_CALL(&node)));
}
Home |
Main Index |
Thread Index |
Old Index