[DTrace-devel] [PATCH 02/04] options: ensure lockmem is set before retrieving probe info
Kris Van Hees
kris.van.hees at oracle.com
Thu Nov 23 05:04:18 UTC 2023
On Wed, Nov 22, 2023 at 09:52:50PM -0500, Eugene Loh via DTrace-devel wrote:
> Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
> subject to moving lockmem stuff from the previous patch into this one.
I disagree with that. That should go into the 3/4 patch instead.
> Also...
>
> On 11/22/23 10:49, Kris Van Hees via DTrace-devel wrote:
> > diff --git a/libdtrace/dt_open.c b/libdtrace/dt_open.c
> > @@ -1173,13 +1173,24 @@ dtrace_vopen(int version, int flags, int *errp,
> > int
> > dtrace_init(dtrace_hdl_t *dtp)
> > {
> > - int i;
> > + int i;
> > + dtrace_optval_t lockmem = dtp->dt_options[DTRACEOPT_LOCKMEM];
> > /*
> > * Initialize the BPF library handling.
> > */
> > dt_dlib_init(dtp);
> > + /*
> > + * Set the locked-memory limit if so directed by the user.
> > + */
> > + if (lockmem != DTRACEOPT_UNSET) {
> > + struct rlimit rl;
> > +
> > + rl.rlim_cur = rl.rlim_max = lockmem;
> > + setrlimit(RLIMIT_MEMLOCK, &rl);
> > + }
> > +
>
> Four of those lines have leading spaces rather than tabs.
>
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
More information about the DTrace-devel
mailing list