1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
See #630104
Submitted upstream as http://www.freebsd.org/cgi/query-pr.cgi?pr=157871
Fixed in HEAD in svn r223182.
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -1082,6 +1082,15 @@
PROC_UNLOCK(p);
return (0);
}
+
+ /*
+ * Mimic linux behavior and pass only processes with usermode
+ * address space as valid. Return zero silently otherwize.
+ */
+ if (p->p_vmspace == &vmspace0) {
+ PROC_UNLOCK(p);
+ return (0);
+ }
if (p->p_args != NULL) {
sbuf_bcpy(sb, p->p_args->ar_args, p->p_args->ar_length);
PROC_UNLOCK(p);
@@ -1108,6 +1117,15 @@
}
/*
+ * Mimic linux behavior and pass only processes with usermode
+ * address space as valid. Return zero silently otherwize.
+ */
+ if (p->p_vmspace == &vmspace0) {
+ PROC_UNLOCK(p);
+ return (0);
+ }
+
+ /*
* Mimic linux behavior and pass only processes with usermode
* address space as valid. Return zero silently otherwize.
*/
|