[lttng-dev] [lttng-module PATCH] Fix last modifications to string_from_user operations
Mathieu Desnoyers
compudj at krystal.dyndns.org
Sat Dec 3 10:32:40 EST 2011
Yannick, I'm curious: does this fix the problem you experienced with
LTTng on -rt kernels recently (that was listed in my staging TODO) ?
Thanks,
Mathieu
* Mathieu Desnoyers (mathieu.desnoyers at efficios.com) wrote:
> * Yannick Brosseau (yannick.brosseau at gmail.com) wrote:
> > Signed-off-by: Yannick Brosseau <yannick.brosseau at gmail.com>
>
> Merged into lttng-modules. I'll prepare a patch for staging too. Very,
> very nice catch!
>
> Thanks,
>
> Mathieu
>
> > ---
> > probes/lttng-events.h | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/probes/lttng-events.h b/probes/lttng-events.h
> > index ff6273f..d486994 100644
> > --- a/probes/lttng-events.h
> > +++ b/probes/lttng-events.h
> > @@ -347,7 +347,7 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = {
> > #undef __string_from_user
> > #define __string_from_user(_item, _src) \
> > __event_len += __dynamic_len[__dynamic_len_idx++] = \
> > - min_t(size_t, strlen_user(_src), 1);
> > + max_t(size_t, strlen_user(_src), 1);
> >
> > #undef TP_PROTO
> > #define TP_PROTO(args...) args
> > @@ -557,7 +557,7 @@ __assign_##dest##_2: \
> > (void) __typemap.dest; \
> > lib_ring_buffer_align_ctx(&__ctx, ltt_alignof(__typemap.dest));\
> > __ustrlen = __get_dynamic_array_len(dest); \
> > - if (likely(__ustrlen) > 1) { \
> > + if (likely(__ustrlen > 1)) { \
> > __chan->ops->event_write_from_user(&__ctx, src, \
> > __ustrlen - 1); \
> > } \
> > --
> > 1.7.7.3
> >
>
> --
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list