Fix check in lttng_strlen_user_inatomic
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · * Simon Marchi ([email protected]) wrote:
__copy_from_user_inatomicreturns the number of bytes that could not be copied, not an error code. This fixes the test accordingly.
Merged with update (change ret type to unsigned long too) into master, stable-2.1, stable-2.0.
Good catch !
Mathieu
Quoted 27 lines
Signed-off-by Simon Marchi <[email protected]>--- probes/lttng-probe-user.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)probes/lttng-probe-user.c +1
-1@@ -41,7 +41,7 @@ long lttng_strlen_user_inatomic(const char *addr) ret =__copy_from_user_inatomic (&v, (__force const char __user *)(addr),sizeof (v)); -if (unlikely (ret == -EFAULT )) +if (unlikely (ret >0 ))break ; count++;if (unlikely (!v))Signature · 7 lines
1.7.1 _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com