/[glibc-bsd]/trunk/kfreebsd-8/debian/patches/111_linprocfs_kthread.diff
ViewVC logotype

Contents of /trunk/kfreebsd-8/debian/patches/111_linprocfs_kthread.diff

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3458 - (show annotations) (download)
Fri Jun 17 08:00:49 2011 UTC (3 years, 3 months ago) by ps-guest
File size: 922 byte(s)
replace by version applied by upstream

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

  ViewVC Help
Powered by ViewVC 1.1.5