X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=probes%2Flttng-probe-user.c;h=d0b5cf297367ce3c209b69ecb491e969ec321270;hb=c1ee10d076b0fd69b649bcd9a5f4f8de77dc9294;hp=94ecf2f1cffb339d53d9c1dc4d62f58a13dc9ece;hpb=c3cd3de91a64e9f786e11658b1d05440e496352f;p=lttng-modules.git diff --git a/probes/lttng-probe-user.c b/probes/lttng-probe-user.c index 94ecf2f1..d0b5cf29 100644 --- a/probes/lttng-probe-user.c +++ b/probes/lttng-probe-user.c @@ -36,12 +36,12 @@ long lttng_strlen_user_inatomic(const char *addr) pagefault_disable(); for (;;) { char v; - long ret; + unsigned long ret; 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))