FreeBSD Bugzilla – Attachment 167814 Details for
Bug 207386
[PATCH] implementation of the /proc/<pid>/limits file for linprocfs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixed the improper access to the process limits
linprocfs_limits_patch.c (text/plain), 973 bytes, created by
Szymon
on 2016-03-07 14:23:35 UTC
(
hide
)
Description:
Fixed the improper access to the process limits
Filename:
MIME Type:
Creator:
Szymon
Created:
2016-03-07 14:23:35 UTC
Size:
973 bytes
patch
obsolete
>--- linprocfs.c_git 2016-02-22 01:18:28.165280000 +0100 >+++ linprocfs.c 2016-03-07 16:13:40.139988000 +0100 >@@ -1402,15 +1402,16 @@ > { > const struct limit_info *li; > struct rlimit li_rlimits; >- struct plimit *cur_proc_lim; >+ struct plimit *process_lim; > >- cur_proc_lim = lim_alloc(); >- lim_copy(cur_proc_lim, p->p_limit); >+ PROC_LOCK(p); >+ process_lim = lim_hold(p->p_limit); >+ PROC_UNLOCK(p); > sbuf_printf(sb, "%-26s%-21s%-21s%-10s\n", "Limit", "Soft Limit", > "Hard Limit", "Units"); > for (li = limits_info; li->desc != NULL; ++li) { > if (li->rlim_id != RLIM_INFINITY && li->rlim_id != RLIM_NONE) >- li_rlimits = cur_proc_lim->pl_rlimit[li->rlim_id]; >+ li_rlimits = process_lim->pl_rlimit[li->rlim_id]; > else { > li_rlimits.rlim_cur = 0; > li_rlimits.rlim_max = 0; >@@ -1424,7 +1425,7 @@ > li->desc, (long)li_rlimits.rlim_cur, > (long)li_rlimits.rlim_max, li->unit); > } >- lim_free(cur_proc_lim); >+ lim_free(process_lim); > return (0); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 207386
:
167233
|
167260
|
167315
| 167814