Index: sys/miscfs/procfs/procfs_linux.c
===================================================================
RCS file: /cvsroot/src/sys/miscfs/procfs/procfs_linux.c,v
retrieving revision 1.71
diff -u -r1.71 procfs_linux.c
--- sys/miscfs/procfs/procfs_linux.c	24 Jul 2015 13:02:52 -0000	1.71
+++ sys/miscfs/procfs/procfs_linux.c	28 Mar 2016 15:37:30 -0000
@@ -366,10 +366,10 @@
 {
 	struct vmspace	*vm;
 	struct proc	*p = l->l_proc;
-	struct rusage	*ru = &p->p_stats->p_ru;
 	char		*bf;
 	int	 	 error;
 	int	 	 len;
+	struct kinfo_proc2 ki;
 
 	bf = malloc(LBFSZ, M_TEMP, M_WAITOK);
 
@@ -379,18 +379,27 @@
 		goto out;
 	}
 
-	len = snprintf(bf, LBFSZ,
-	        "%lu %lu %lu %lu %lu %lu %lu\n",
-		(unsigned long)(vm->vm_tsize + vm->vm_dsize + vm->vm_ssize), /* size */
-		(unsigned long)(vm->vm_rssize),	/* resident */
-		(unsigned long)(ru->ru_ixrss),	/* shared */
-		(unsigned long)(vm->vm_tsize),	/* text size in pages */
-		(unsigned long)(vm->vm_dsize),	/* data size in pages */
-		(unsigned long)(vm->vm_ssize),	/* stack size in pages */
-		(unsigned long) 0);
+	mutex_enter(proc_lock);
+	mutex_enter(p->p_lock);
+
+	/* retrieve RSS size */
+	fill_kproc2(p, &ki, false);
+
+	mutex_exit(p->p_lock);
+	mutex_exit(proc_lock);
 
 	uvmspace_free(vm);
 
+	len = snprintf(bf, LBFSZ,
+	        "%lu %lu %lu %lu %lu %lu %lu\n",
+		(unsigned long)(ki.p_vm_msize),	/* size */
+		(unsigned long)(ki.p_vm_rssize),/* resident */
+		(unsigned long)(ki.p_uru_ixrss),/* shared */
+		(unsigned long)(ki.p_vm_tsize),	/* text */
+		(unsigned long) 0,		/* library (unused) */
+		(unsigned long)(ki.p_vm_dsize + ki.p_vm_ssize),	/* data+stack */
+		(unsigned long) 0);		/* dirty */
+
 	if (len == 0)
 		goto out;
 
